Dependency Manager
Project description
Rationale
These utilities are meant to solve a problem with related repositories and their dependency relationships
Projects may have hierarchical dependencies. See the following Pyut dependency diagram.
---
title: Pyut Dependency Graph
---
flowchart
direction RL
pyut(Pyut 9.6.0) --> oglio(oglio 2.3.4)
pyut(Pyut 9.6.0) --> pyutplugins(pyutplugins 3.2.3)
pyutplugins(pyutplugins 3.2.3) -.-> oglio(oglio 2.3.4)
pyutplugins(pyutplugins 3.2.3) & oglio(oglio 2.3.4) --> untanglepyut.2.6.3
pyut(Pyut 9.6.0) & oglio(oglio 2.3.4) & untanglepyut.2.6.3 --> ogl.3.6.7
pyut(Pyut 9.6.0) & pyutplugins(pyutplugins 3.2.3) & oglio(oglio 2.3.4) & untanglepyut.2.6.3 & ogl.3.6.7 -...-> pyutmodelv2.2.2.3
pyut(Pyut 9.6.0) & pyutplugins(pyutplugins 3.2.3) & ogl.3.6.7 ----> codeallybasic.1.9.0
style pyut fill:#ee4,stroke:#333,stroke-width:
%% linkStyle 1 stroke:#ff3,stroke-width:4px,color:red;
The above diagram illustrates how low-level dependencies ripple up the dependency tree.
Dependency Locations
Additionally, projects may specify dependencies in different places. Examples of the dependency locations are
- pyproject.toml
- setup.py
- requirements.txt
- .circleci/config.yml
- .travis.yml
Python Console Scripts
VersionOverlord means to handle this problem by providing a set of Python command line scripts to automate updating the first three of the above dependency specification locations
-
versionoverlord -- lists all the commands and their short names
-
querySlugs -- queries repositories for their latest release version
-
createSpecification -- creates a dependency specification for a project
-
updateDependencies -- updates the supported dependency locations using the generated specification
-
draftRelease -- This command creates draft release in the appropriate repository. You must provide a repository slug
-
bumpVersion -- Bump version looks for file in
src/<moduleName>/_version.py. It echoes it to stdout and asks the developer to provide an updated value. -
pickDependencies
- Reads pyproject.toml and picks the dependencies from the
dependenciessection. - It displays them in an editor.
- The developer removes dependencies he/she does not want to update.
- This command updates the dependency csv file in the same format as the
createSpecificationcommand. - It then invokes the
updateDependenciescommand to update the files. UnlikecreateSpecification, pickDependencies queries pypi to get the module versions
- Reads pyproject.toml and picks the dependencies from the
-
publishRelease -- Publishes a previously created draft release
Required Environment Variables
The above commands depend on the following environment variables.
GH_TOKEN - A personal GitHub access token necessary to read repository release information
PROJECTS_BASE - The local directory where the python projects are based
PROJECT - The name of the project; It should be a directory name
See the GitHub Documentation for instructions on how to create a usable access token. These scripts assume that a developer keeps all checked out repositories in a single directory. An example, of a PROJECTS_BASE is:
export PROJECTS_BASE="${HOME}/PycharmProjects"
This should be set in your shell startup script. For example .bash_profile.
The developer sets the PROJECT environment variable on a project by project basis.
I recommend you use direnv to manage these. An example of a .envrc follows:
export PROJECT=pyutmodel
export GH_TOKEN=DEADBEEF
source pyenv-3.10.6/bin/activate
Advanced Slugs
The command line options for querySlug and createSpecification are advanced GitHub slugs. For example, for the following repositories
https://github.com/hasii2011/pyutmodel
https://github.com/hasii2011/code-ally-basic
The slugs are hasii2011/pyutmodel and hasii2011/code-ally-basic,codeallybasic, respectively.
Note the advanced part of the third slugs because the package name does not match the repository name;
Usage
From the above dependency diagram assume the following:
Both the pyutmodel and code-ally-basic repositories releases have been updated. We need to update the ogl dependencies to match the latest of both. Assume both GH_TOKEN and PROJECTS_BASE are correctly set and PROJECT is set to 'ogl'. Use the following CLI invocation to create the specification file.
createSpecification -s hasii2011/pyutmodel -s hasii2011/code-ally-basic,codeallybasic
The command creates the file versionSpecification.csv with the following contents.
PackageName,OldVersion,NewVersion
pyutmodel,1.4.0,1.4.1
codeallybasic,0.0.7,0.1.0
Again assuming, the previously mentioned environment variables are set the following CLI invocation;
updateDependencies
correctly updates the following
- setup.py
- requirements.txt
- .circleci/config.yml
- .travis.yml
- pyproject.toml
Installation
pip install versionoverlord
or
pipx install versionoverlord
Written by Humberto A. Sanchez II (C) 2025
Note
For all kind of problems, requests, enhancements, bug reports, etc., drop me an e-mail.
I am concerned about GitHub's Copilot project
I urge you to read about the Give up GitHub campaign fromthe Software Freedom Conservancy.
While I do not advocate for all the issues listed there, I do not like that a company like Microsoft may profit from open source projects.
I continue to use GitHub because it offers the services I need for free. I continue to monitor their terms of service.
Any use of this project's code by GitHub Copilot, past or present, is done without my permission. I do not consent to GitHub's use of this project's code in Copilot.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file versionoverlord-2.5.0.tar.gz.
File metadata
- Download URL: versionoverlord-2.5.0.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef43ab5a90cc798715b000af2c1e7bfe75d7c31c9f1ec407ed88196bed995c30
|
|
| MD5 |
6a5944cfbf86da0f7b92a16d3f77c8a5
|
|
| BLAKE2b-256 |
7d00f7d4d6e5d9c1e8114dab297d7233141f0b2a2f00d37551804b943ee1570e
|
Provenance
The following attestation bundles were made for versionoverlord-2.5.0.tar.gz:
Publisher:
python-publish.yml on hasii2011/versionoverlord
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
versionoverlord-2.5.0.tar.gz -
Subject digest:
ef43ab5a90cc798715b000af2c1e7bfe75d7c31c9f1ec407ed88196bed995c30 - Sigstore transparency entry: 357673140
- Sigstore integration time:
-
Permalink:
hasii2011/versionoverlord@2819aa9ab42a68d2ed427b113448ddf1391659d6 -
Branch / Tag:
refs/tags/2.5.0 - Owner: https://github.com/hasii2011
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2819aa9ab42a68d2ed427b113448ddf1391659d6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file versionoverlord-2.5.0-py3-none-any.whl.
File metadata
- Download URL: versionoverlord-2.5.0-py3-none-any.whl
- Upload date:
- Size: 45.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8049979245c8fda9c88661ece1b2168d557a6576da764c4a1cbb803f09f86fed
|
|
| MD5 |
baac6995847a6d2313e177d4e3056b7a
|
|
| BLAKE2b-256 |
10f60d0034a926fd806a4a8228a46c19b9fdafbb9650b6d334e252b9f63d5aa7
|
Provenance
The following attestation bundles were made for versionoverlord-2.5.0-py3-none-any.whl:
Publisher:
python-publish.yml on hasii2011/versionoverlord
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
versionoverlord-2.5.0-py3-none-any.whl -
Subject digest:
8049979245c8fda9c88661ece1b2168d557a6576da764c4a1cbb803f09f86fed - Sigstore transparency entry: 357673162
- Sigstore integration time:
-
Permalink:
hasii2011/versionoverlord@2819aa9ab42a68d2ed427b113448ddf1391659d6 -
Branch / Tag:
refs/tags/2.5.0 - Owner: https://github.com/hasii2011
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2819aa9ab42a68d2ed427b113448ddf1391659d6 -
Trigger Event:
release
-
Statement type: