Development
{:
target=”
blank”}
{:
target=”
blank”}
{:
target=”_blank”}
📥 Install for development
Clone the repository and go in the project folder:
To install the project for development you can use poetry.
If you don’t have it installed, first install it following the official installation guide.
Once poetry is installed, you can install all the project dependencies by running:
Optionally, install pre-commit to enable automated formatting and linting of the code at each commit:
🧑💻 Development workflow
Try to sign a nanopublication with the code defined in scripts/dev.py to test your changes:
The code will be automatically formatted when you commit your changes using pre-commit. But you can also run the
script to format the code yourself:
Check the code for errors, and if it is in accordance with the PEP8 style guide, by running flake8 and mypy:
✅ Run the tests
Tests are automatically run by a GitHub Actions workflow when new code is pushed to the GitHub repository.
The tests use the nanopub-java tool for validating the signing
process implemented in python produces similar nanopublications. This is automatically installed by the library, just
make sure java is available where you run the tests.
📖 Generate docs
The documentation (this website) is automatically generated from the markdown files in the docs folder and python
docstring comments, and published by a GitHub Actions workflow.
Serve the docs on http://localhost:8008
🏷️ Publish a new release
The release are automatically triggered using the semantic-release plugin together with conventional commits.