This repo is a sandbox to try out using hatch to publish multiple
related python packages from a single monorepo.
Main idea:
- have a library that contains production code
- have an auxiliary library that contains non-production code, e.g. test factories, debug helpers asf.
- version of auxiliary lib matches version of production lib
- when testing the production library, use the auxiliary library too
Structure of this repo:
my-sandbox-libholds the project configuration for the production library.my-sandbox-lib-addonholds the project configuration for the auxiliary library.my-sandbox-toolan arbitrary project configuration that makes use ofmy-sandbox-lib&my-sandbox-lib-addon. I.e. this is how other projects would typically usemy-sandbox-lib&my-sandbox-lib-addon.srcholds the source code- project configuration for an environment that combines all of the following
- production library
my-sandbox-lib - auxiliary library
my-sandbox-lib-addon - test code
tests
Typical development activity ( updating the libs with new functionality, adding bugfixes ) would involve commands from the repo root directory, like
make reset_envto rebuild the python environment.make formatto format sources of the libs & test code.make lintto lint sources of the libs & test code.make testto run tests on libs.
Once development is finished, the updated libs can be build & published, using
make build_lib_packageto build production librarymy-sandbox-lib.make build_lib_addon_packageto build auxiliary librarymy-sandbox-lib-addon.make build_and_publishto build the libs and publish them to a PyPi repository.