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
reorderisTrue(the default), identifying fields likeocidare moved to the top of objects, anddatamust be anOrderedDict. 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
partiesarray.
- ocdskit.upgrade.upgrade_amendments_10_11(release)[source]¶
Rename
amendmenttoamendmentsundertender,awardsandcontracts. Ifamendmentsalready exists, append theamendmentvalue to theamendmentsarray, unless it already contains it.
- ocdskit.upgrade.upgrade_transactions_10_11(release, *, reorder=True)[source]¶
Rename
providerOrganizationtopayer,receiverOrganizationtopayee, andamounttovalueundercontracts.implementation.transactions, unless they already exist.Convert
providerOrganizationandreceiverOrganizationfrom an Identifier to an OrganizationReference and fill in thepartiesarray.