BODS docs are published on readthedocs.
Using the development environment means that you needn’t maintain relevant python versions and libraries on your system. Plus the environment can be updated to support common schema development practices. Install the ODSC development environment by following the instructions at https://github.com/OpenDataServices/development-environment
The setup process guides you through several options
See https://docs.github.com/en/get-started/getting-started-with-git/managing-remote-repositories#switching-remote-urls-from-https-to-ssh for advice on configuring the ssh authentication in the development environment.
Open a terminal and navigate to the development environment
cd development-environment
connect to the environment
bin/connect
navigate to the directory containing the data standard, e.g.:
cd development/data-standard/
run sphinx build
sphinx-build docs/ _build
navigate to _build
cd _build
open the docs in a server
python3 -m http.server
then open http://0.0.0.0:8000/ in a browser window to view the docs
The latest version of the BODS docs automatically uses the lastest version of the theme from the repo. Older versions of the docs may be pinned to specific commits or branches of the theme.
If you need to work on the docs and test how they build, you can use a Python virtual environment, as outlined in the data standard ReadMe.
If you need to work on the docs theme and test changes to it, you can use the vagrant virtual box provided in the theme repository.
[ Data standard ReadMe | Theme repository ] |
OCDSkit provides command line tools for common development tasks, which can also be used with BODS.
[ OCDSkit documentation | Repository ] |
Flatten-Tool enables a dataset to be round-tripped between structured JSON and tabular data packages, CSV files, or spreadsheets.
[ Flatten Tool documentation | Repository ] |
BODSkit used to contain various software tools which could be used when working on the field mapping spreadsheet.
That repository has since been archived, because all of the tools could be found elsewhere, either in other open-source packages or in OCDSkit.
Here are the replacements for the existing tooling:
Before:
bodskit mapping-sheet ~/work/openownership-data-standard/schema/person-statement.json > out.csv
Now:
ocdskit mapping-sheet --order-by path ~/work/openownership-data-standard/schema/person-statement.json > out.csv
Before:
bodskit all-codes ~/work/openownership-data-standard/schema/codelists > out.csv
Now:
pip install csvkit
cd path/to/data-standard
csvstack --filenames -n codelist schema/codelists/* | sed s/\.csv// | in2csv -f csv
Before:
bodskit schema-codelist-report ~/work/openownership-data-standard/schema/person-statement.json
Now:
ocdskit schema-report --no-definitions ~/work/openownership-data-standard/schema/person-statement.json
(Note the type
column now becomes a boolean openCodeList
column, but the
meaning is identical)
This is a hacky way of doing things. Please edit with any improved process
Goal: run command line validation and additional checks of example data against dev version of schema.
pip install -e .
;compiletojsonschema path/to/bods-package.json > path/to/lib-cove-bods/data/schema-X-Y-Z.json
X-Y-Z should be version number of the schema. You can temporarily alter the schema for an existing version, or make a new version of the schema.schema_versions
setting maps the value of the bodsVersion field in the data to the schema file the tool will check it against.schema_latest_version
to point to the schema name defined earlier.libcovebods path/to/example.json