Upgrade

ocdskit.upgrade.upgrade_10_10(data, **kwargs)[source]

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

ocdskit.upgrade.upgrade_11_11(data, **kwargs)[source]

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

ocdskit.upgrade.upgrade_10_11(data, *, reorder=True)[source]

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

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

If reorder is True (the default), identifying fields like ocid are moved to the top of objects, and 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, *, reorder=True)[source]

Upgrade a record from 1.0 to 1.1.

ocdskit.upgrade.upgrade_release_10_11(release, *, reorder=True)[source]

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

ocdskit.upgrade.upgrade_parties_10_to_11(release, *, reorder=True)[source]

Convert organizations to organization references and fill in the parties array.

ocdskit.upgrade.upgrade_amendments_10_11(release)[source]

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

ocdskit.upgrade.upgrade_transactions_10_11(release, *, reorder=True)[source]

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

Convert providerOrganization and receiverOrganization from an Identifier to an OrganizationReference and fill in the parties array.