data-utils
is a library to support the work of the Data Team at Our World in Data.
Currently no release has been published. You can install the version under development directly from GitHub:
pip install git+https://github.com/owid/data-utils-py
You need Python 3.8+, poetry
and make
installed.
# Install poetry
pip install poetry
poetry install
Run:
# run all unit tests and CI checks
make test
make report
Generate coverage and linting reportings. It is equivalent to running first make report-coverage
and then
make report-linting
. It also launches a local server so you can access the reports via localhost:8000 URL.
The generated reports are saved as ./reports/coverage
and ./reports/linting
(both HTML directories).
make report-coverage
This will print how much of the source code is covered by the implemented tests. Additionally, it generates an HTML
directory (.reports/coverage
), which provides a frendly view of the source code coverage.
make report-linting
Check if the source code passes all flake8 styling tests. Additionally, it generages an HTML directory
(.reports/linting
), which provides a friendly view of the style issues (if any).
Flake8 configuration can be tweaked in .flake8 file.
make bump [part]
Upgrade version in all files where it appears. [part]
can be patch
, minor
ad major
.