Upgrade#

ocdskit.upgrade.upgrade_10_10(data)[source]#

Upgrades a record package, release package, record or release from 1.0 to 1.0 (no-op).

ocdskit.upgrade.upgrade_11_11(data)[source]#

Upgrades a record package, release package, record or release from 1.1 to 1.1 (no-op).

ocdskit.upgrade.upgrade_10_11(data)[source]#

Upgrades a record package, release package, record or release from 1.0 to 1.1.

Retains the deprecated Amendment.changes, Budget.source and Milestone.documents fields.

data must be an OrderedDict. If you have only the parsed JSON, re-parse it with:

upgrade_10_11(json.loads(json.dumps(data), object_pairs_hook=OrderedDict))

ocdskit.upgrade.upgrade_record_10_11(record)[source]#

Upgrades a record from 1.0 to 1.1.

ocdskit.upgrade.upgrade_release_10_11(release)[source]#

Applies upgrades for organization handling, amendment handling and transactions terminology.

ocdskit.upgrade.upgrade_parties_10_to_11(release)[source]#

Converts organizations to organization references and fills in the parties array.

ocdskit.upgrade.upgrade_amendments_10_11(release)[source]#

Renames amendment to amendments under tender, awards and contracts. If amendments already exists, it appends the amendment value to the amendments array, unless it already contains it.

ocdskit.upgrade.upgrade_transactions_10_11(release)[source]#

Renames providerOrganization to payer, receiverOrganization to payee, and amount to value under contracts.implementation.transactions, unless they already exist.

Converts providerOrganization and receiverOrganization from an Identifier to an OrganizationReference and fills in the parties array.