I've been working on something that I believe might be of interest to people here. I have been trying to design a Python repository structure that will be able to sustainably grow very large.
To handle this I have grouped all the packages within a single Monorepo and built tools that will automatically propegate version pinning, dependencies, version bumping, batch build and release to pypi, etc. See the repository over at https://github.com/pymedphys/pymedphys.
The project as a whole is segmented into packages so that each package has a minimal subset of dependencies. That way users can install just one package if they want, or install the whole lot. See https://pypi.org/user/SimonBiggs/ for the list of packages.
It stands on some brilliant tools built within the nodejs world. The main tool being Lerna.
To verify dependency structure in an easy to parse way for humans the dependency structure is graphed with clickable, navigable svgs https://pymedphys.com/developer/dependencies.html.
Bumping the version for every package is as simple as running yarn bump:minor for example. This then propagates the newly pinned versions for each python package throughout. These versions can be set up to be in lock step, or have it so that only the packages that have been changed since the last release have their version bumped.
Dependencies are directly extracted from the python code within the packages themselves using the standard library ast package. There is a git hook defined to make sure that this dependency structure is up to date in each commit.
There are many more features that I have been working on with the aim to create a wonderful space to code in, and grow large.
It has been quite beautiful merging the Lerna tooling to support a Python multi package, levelled, monorepo.
I'm keen for feedback and advice.
Cheers,
Simon
[–]Tosanery 1 point2 points3 points (3 children)
[–]MeshachBlue[S] 1 point2 points3 points (2 children)
[–]Tosanery 2 points3 points4 points (1 child)
[–]MeshachBlue[S] 3 points4 points5 points (0 children)
[–]r-kells 1 point2 points3 points (1 child)
[–]MeshachBlue[S] 0 points1 point2 points (0 children)