Project
Building
Building the ndice project requires the following tools:
Makefile Targets
By default, running make in the project root directory has the same effect as
running make check: it will install dependencies, run unit tests with code
coverage, check formatting and types, build documentation and build the package
distribution. All output will be placed in the directory specified by the
make variable TMP, which defaults to ./tmp/ in the project root.
Code coverage reports are written to $(TMP)/coverage-report, docs are written
to $(TMP)/docs and the built package distribution is written to $(TMP)/dist.
The clean target removes the TMP directory; the clobber target runs clean
and also removes the .venv directory.
Other useful targets include pub-pkg and pub-test-pkg for publishing the
built package to PyPI and TestPyPI respectively, bump for incrementing the
package version, and reformat for reformatting the source code.
Secrets
The pub-pkg and pub-test-pkg targets will look for API keys for pypi.org and
test.pypi.org respectively in the secrets/ directory.
Releasing
These are the steps and considerations for preparing a release.
Check that dependencies are up to date
Check that the “Unreleased” section of
CHANGELOG.mdis up to dateRun
make bumpoptionally withNEW_VERSION=X.Y.Z, which does the following:make cleanupdate the version in
pyproject.tomlupdate the version in
src/ndice/__init__.pyupdate the release in
docs/conf.pyadd a new version section to
CHANGELOG.mdmake check, which will updateuv.lockgit add .to add all changed filesgit commit --file tmp/commit_message.txtgit tag -a $(<tmp/tag_name.txt) --file tmp/tag_message.txt
Review and validate the new commit and tag
Run
git pushand check that CI ran successfullygit push origin $(<tmp/tag_name.txt)Build and publish the new package version
make cleanmake checkmake pub-test-pkgmake check-pub-test-pkgmake pub-pkgmake check-pub-pkgmake pub-docsmake check-pub-docs