Simple reusable python classes and functions for digital publishing.
The key word is simple. If the desired functionality is more than a script or two (or existing functionality sprawls beyond that) please consider separating it into its own repository.
Given this pattern, each distinct tool should be clearly separated out within ./dpytools
, with each tool having its own README with example usage.
TLDR: Try and enforce decent logical separation between the tools in this toolbag against the eventuality/likelyhood of separating them out at a later date.
This repository is provided as an installable python package.
To install the package
Open your terminal and run the following command:
pip install git+https://github.com/ONSdigital/dp-python-tools.git
All commits that make it to PR should have had black
and ruff
already run against them, you can do this via make fmt
and you can lint via make lint
.
Given this is a lower level resource to be relied on by other things, all classes and functions should have good unit test coverage. You can run the unit tests via make test
.
This package follows standard semantic versioning for its release process. Releases are tagged as vX.Y.Z, where:
To release a new version of dpytools
:
[tool.poetry]
section of pyproject.toml
, update the version
number as appropriate, following the semantic versioning rules listed above.pyproject.toml
changes to git, and merge to the develop
branch.pyproject.toml
. Click "Create new tag".Copyright © 2024, Office for National Statistics (https://www.ons.gov.uk)
Released under MIT license, see LICENSE for details.