Imagine I have:
- Library Z
- Library Y, which depends on Library Z
- Application A, which depends on Library Y
To fully test out changes to Library Z, I'd like to run the tests of Application A with any Development releases of Library Z.
To do this I can set up Library Z to publish packages to some package index for development releases under the versioning scheme {major}.{minor}.{micro}.dev{build}
, then have Library Y specify it's dependency range for Library Z as >={major},<{major+1}
for instance and use pip install --pre ...
on Application A to ensure the Development releases of Library Z are picked up.
This all works fine, until we have > 1 maintainer of Library Z making changes, likely in different git
branches, and effectively competing on the {build}
number. Wondering how folks have solved this problem?
This problem gets potentially worse as well if in Application A you are also in a situation where > 1 maintainer are making changes and not everyone wants to ingest the Development release, so ensure the --pre
flag is optionally passed and ideally synced up with just the dependency in question (possible with poetry
via the more granular allow-prereleases
flag, see docs here).
Editable installs are likely considered out of scope, this set up is a trivial case. In reality this dependency graph could be deeper, and is often pared with Docker to make it commercially viable when pared with C dependencies so the complexity of hooking up volume mounts very hard. Also the user developing Library Z, may be different than the person testing Application A.
Whilst I used pip
in the examples here, in reality our system uses poetry
(and pip
in places).