OCDS Merge 0.6.4

PyPI Version Build Status Lint Status Coverage Status Python Version

This Python package creates records that conform to the Open Contracting Data Standard. Specifically, it provides classes for merging OCDS releases with the same OCID into either a compiled release or a versioned release (collectively called “merged releases”), as described in the OCDS documentation.

Instead of using this library directly, it is easier to create merged releases using either:

If you are viewing this on GitHub or PyPi, open the full documentation for additional details.

To install:

pip install ocdsmerge

You can either create a new merged release from a list of individual releases, or update an existing merged release with one or more individual releases.

If the data you are working with has bad id values, use the features for handling bad data.

Reference implementation

This library serves as a reference implementation of OCDS’ merge routine. You can read the commented code on GitHub.

Test cases

We provide test cases for other implementations of the merge routine under the tests/fixtures directory. The 1.0 and 1.1 directories contain files like simple.json, which contain a list of OCDS releases as JSON; the suffixed simple-compiled.json and simple-versioned.json files contain the expected compiled release and versioned release, respectively. To test your implementation, provide as input a file like simple.json as well as the appropriate version of the OCDS release schema, and compare your output to files like simple-compiled.json and simple-versioned.json.

To prepare your implementation for future versions and third-party extensions, you can test your implementation using the files under the schema directory and using the schema in the schema.json file.

In future, we can consider providing a more formal test suite, like that of CSV on the Web. Please contact data@open-contracting.org if interested.

Copyright (c) 2015 Open Contracting Partnership, released under the BSD license