OCDS Additions

Situation: Somebody wants to take OCDS (Open Contracting Data Standard) releases that are already published by another publisher. They have additional information to share and they want to publish new releases with that information into the existing contracting process.

For example: A provider of social care has won a contract from the government to provide social care. The “tender” stages of that contract are published in a national tender portal in OCDS format. However no further stages are published. The provider wants to publish their own “award”, “contract” and “implementation” releases to the same contracting process, so others can understand their work and the context it takes place in.

OCDS Additions can help! It is a tool to take releases from other portals, store them, and allow additional releases to be created and stored.

Interface: The tool is provided as a Python CLI tool that works on local files.

Data storage: The tool stores it’s data in a git repository. There are many places this can be easily hosted for free, thus making the data store sustainable over the long term.

Outputs: The tool creates a static website that can be served by many web hosts. This provides all OCDS releases, compiled records and helpful information. It provides machine readable links so that it is easy for data collection tools like Kingfisher Collect to scrape the data.

Install

Install stable version via Pypi

pip install ocdsadditions

Install latest development version via git

pip install git+https://github.com/OpenDataServices/ocds-additions.git@main#egg=ocdsadditions

Command Line Interface (CLI)

Create a repository

Call this command, passing only the directory path you want to create.

Once created, you will want to change to the repository to run further actions.

You will probably want to create a new git repository.

ocdsadditionsinit  my-new-data-repository-directory
cd my-new-data-repository-directory
git init

Repository actions

All these actions take place in a data repository. They should be run in the data directory - the directory with the ocdsadditions.json file in it.

Add Contracting Process

Every contracting process you want to work with needs to be added explicitly.

Call this command, passing the Contracting Process Identifier (ocid) of the process you want to work with.

ocdsadditions addocid ocds-h6vhtk-02c615

Add External Release Package

Goes to a URL, fetches a release package and adds all releases to the data repository.

ocdsadditions addexternalreleasepackage   https://www.find-tender.service.gov.uk/api/1.0/ocdsReleasePackages/016035-2021

Add Empty Release

Adds an empty release to an contracting process with sensible defaults. More information can then be added to the release by hand.

You must pass:

ocdsadditions addemptyrelease ocds-h6vhtk-02c615 rel-id-1

Create Release Spreadsheet

Turns a single release into a spreadsheet.

You must pass:

ocdsadditions createreleasespreadsheet ocds-h6vhtk-02c615 rel-id-1 output.xlsx

Import Spreadsheet

Currently only release package spreadsheets can be imported.

You must pass:

  • the filename to import. This must have a ‘.xlsx’ or ‘.ods’ extension.

ocdsadditions importspreadsheet spreadsheet.xlsx

Build site

Builds the static output site for this data repository.

Pass the output directory.

ocdsadditions buildsite  _site

Option parameters are

  • -u: Specify the base URL the site will be served from - eg “http://localhost:8000” (long form: url)

Data Repository Config

Once you have your data repository, you can edit parts of the ocdsadditions.json file to configure the site.

There should be a config key which is an object.

Publisher, License and Publication Policy

Under config add a package key, which is an object with the following keys:

  • Add a publisher key, which is a object.

  • Add a license key, which is a string.

  • Add a publicationPolicy key, which is a string.

The contents are defined in the OCDS Standard.

These are used when creating a new empty release - they are automatically set in the package for you.

Party

Under config add a party key, which is an object with the following keys:

Inserting Party to empty releases

Under config add a add_party_to_our_releases_with_party_id key, which is a string.

If party and this is set, when you make a new empty release the party data is automatically added for you.

Example

After adding the above, you may have an ocdsadditions.json that looks like:

{
    "config": {
        "package": {
            "publisher": {
                "name": "Example Co-op",
                "scheme": "example-scheme",
                "uid": "ecp",
                "uri": "https://www.example.coop/"
            },
            "publicationPolicy": "https://www.example.coop/publication-policy",
            "license": "https://www.example.coop/data-license"
        },
        "party": {
            "name": "Example Co-op",
            "identifier": {
                "scheme": "GB-COH",
                "id": "EXAMPLE"
            },
            "additionalIdentifiers": [],
            "address": {
                "streetAddress": "Example Co-op, 37 Example St",
                "locality": "London",
                "region": "",
                "postalCode": "NW1 1AA",
                "countryName": "United Kingdom of Great Britain and Northern Ireland"
            },
            "contactPoint": {
                "email": "hello@example.coop"
            }
        },
        "add_party_to_our_releases_with_party_id": "GB-COH-EXAMPLE"
    }
}