versionoverlord


Nameversionoverlord JSON
Version 1.4.0 PyPI version JSON
download
home_page
SummaryDependency Manager
upload_time2024-03-10 20:34:18
maintainer
docs_urlNone
author
requires_python
licenseGNU AFFERO GENERAL PUBLIC LICENSE
keywords version management dependencies python
VCS
bugtrack_url
requirements wheel setuptools twine build types-setuptools mypy html-testRunner PyGithub click buildlackey semantic-version codeallybasic
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![CircleCI](https://dl.circleci.com/status-badge/img/gh/hasii2011/versionoverlord/tree/master.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/hasii2011/versionoverlord/tree/master)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)
[![PyPI version](https://badge.fury.io/py/versionoverlord.svg)](https://badge.fury.io/py/versionoverlord)

## 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](https://github.com/hasii2011/PyUt) dependency diagram. 



```mermaid
---
title: Pyut Dependency Graph
---
flowchart
	direction LR
	
  pyut(Pyut 7.7.0) --> oglio(oglio 0.5.80)
  pyut(Pyut 7.7.0) --> pyutplugins(pyutplugins 0.8.40)
  
  pyutplugins(pyutplugins 0.8.40) -.-> oglio(oglio 0.5.80)
  pyutplugins(pyutplugins 0.8.40) & oglio(oglio 0.5.80) --> untanglepyut.0.6.40

   pyut(Pyut 7.7.0) & oglio(oglio 0.5.80) & untanglepyut.0.6.40 --> ogl.0.70.20
   
   pyut(Pyut 7.7.0) &  pyutplugins(pyutplugins 0.8.40) &  oglio(oglio 0.5.80) &  untanglepyut.0.6.40 &  ogl.0.70.20 -...-> pyutmodel.1.4.2
   pyut(Pyut 7.7.0) & pyutplugins(pyutplugins 0.8.40) & ogl.0.70.20 ----> hasiicommon.0.2.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

* 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

* 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



## Required Environment Variables

The above commands depend on the following environment variables.

```bash
GITHUB_ACCESS_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](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) 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:

```bash
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](https://direnv.net) to manage these.  
An example of a .envrc follows:

```bash
export PROJECT=pyutmodel
source pyenv-3.10.6/bin/activate
```

## Advanced Slugs

The command line options for querySlug and createSpec are advanced GitHub slugs.  For example, for the following repositories

https://github.com/hasii2011/pyutmodel

https://github.com/hasii2011/hasiicommon

https://github.com/hasii2011/code-ally-basic

The slugs are `hasii2011/pyutmodel` and `hasii2011/hasiicommon` 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 `hasiicommon` repositories have been updated.  We need to update the `ogl` dependencies to match the latest of both.  Assume both `GITHUB_ACCESS_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/hasiicommon
```

The command creates the file `versionSpecification.csv` with the following contents.

```
PackageName,OldVersion,NewVersion
pyutmodel,1.4.0,1.4.1
hasiicommon,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

## Installation

```
pip install versionoverlord
```
___

Written by <a href="mailto:email@humberto.a.sanchez.ii@gmail.com?subject=Hello Humberto">Humberto A. Sanchez II</a>  (C) 2023


## Note
For all kind of problems, requests, enhancements, bug reports, etc.,
Drop me an e-mail.


---
I am concerned about GitHub's Copilot project

![](https://github.com/hasii2011/code-ally-basic/blob/master/developer/SillyGitHub.png)

I urge you to read about the
[Give up GitHub](https://GiveUpGitHub.org) campaign from
[the Software Freedom Conservancy](https://sfconservancy.org).

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.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "versionoverlord",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "\"Humberto A. Sanchez II\" <Humbert.A.Sanchez.II@gmail.com>",
    "keywords": "version management,dependencies,python",
    "author": "",
    "author_email": "\"Humberto A. Sanchez II\" <Humbert.A.Sanchez.II@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/c7/67/f4ec01948bc8d0ac88f5205c03dc22914330d1bbf5437eb1890f83b72ef0/versionoverlord-1.4.0.tar.gz",
    "platform": null,
    "description": "[![CircleCI](https://dl.circleci.com/status-badge/img/gh/hasii2011/versionoverlord/tree/master.svg?style=shield)](https://dl.circleci.com/status-badge/redirect/gh/hasii2011/versionoverlord/tree/master)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity)\n[![PyPI version](https://badge.fury.io/py/versionoverlord.svg)](https://badge.fury.io/py/versionoverlord)\n\n## Rationale\n\nThese utilities are meant to solve a problem with related repositories and their dependency relationships\n\nProjects may have hierarchical dependencies.  See the following [Pyut](https://github.com/hasii2011/PyUt) dependency diagram. \n\n\n\n```mermaid\n---\ntitle: Pyut Dependency Graph\n---\nflowchart\n\tdirection LR\n\t\n  pyut(Pyut 7.7.0) --> oglio(oglio 0.5.80)\n  pyut(Pyut 7.7.0) --> pyutplugins(pyutplugins 0.8.40)\n  \n  pyutplugins(pyutplugins 0.8.40) -.-> oglio(oglio 0.5.80)\n  pyutplugins(pyutplugins 0.8.40) & oglio(oglio 0.5.80) --> untanglepyut.0.6.40\n\n   pyut(Pyut 7.7.0) & oglio(oglio 0.5.80) & untanglepyut.0.6.40 --> ogl.0.70.20\n   \n   pyut(Pyut 7.7.0) &  pyutplugins(pyutplugins 0.8.40) &  oglio(oglio 0.5.80) &  untanglepyut.0.6.40 &  ogl.0.70.20 -...-> pyutmodel.1.4.2\n   pyut(Pyut 7.7.0) & pyutplugins(pyutplugins 0.8.40) & ogl.0.70.20 ----> hasiicommon.0.2.0\n\n    style pyut fill:#ee4,stroke:#333,stroke-width:\n    %% linkStyle 1 stroke:#ff3,stroke-width:4px,color:red;\n```\n\nThe above diagram illustrates how low-level dependencies ripple up the dependency tree.  \n\n## Dependency Locations\n\nAdditionally, projects may specify dependencies in different places.  Examples of the dependency locations are\n\n* setup.py\n* requirements.txt\n* .circleci/config.yml\n* .travis.yml\n\n\n\n## Python Console Scripts\n\nVersionOverlord 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\n\n* querySlugs          -- queries repositories for their latest release version\n* createSpecification -- creates a dependency specification for a project \n* updateDependencies  -- updates the supported dependency locations using the generated specification\n\n\n\n## Required Environment Variables\n\nThe above commands depend on the following environment variables.\n\n```bash\nGITHUB_ACCESS_TOKEN - A personal GitHub access token necessary to read repository release information\nPROJECTS_BASE             - The local directory where the python projects are based\nPROJECT                          - The name of the project;  It should be a directory name\n```\n\nSee the [GitHub Documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) 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:\n\n```bash\nexport PROJECTS_BASE=\"${HOME}/PycharmProjects\" \n```\n\nThis should be set in your shell startup script.  For example `.bash_profile`.\n\nThe developer sets the PROJECT environment variable on a project by project basis.  \nI recommend you use [direnv](https://direnv.net) to manage these.  \nAn example of a .envrc follows:\n\n```bash\nexport PROJECT=pyutmodel\nsource pyenv-3.10.6/bin/activate\n```\n\n## Advanced Slugs\n\nThe command line options for querySlug and createSpec are advanced GitHub slugs.  For example, for the following repositories\n\nhttps://github.com/hasii2011/pyutmodel\n\nhttps://github.com/hasii2011/hasiicommon\n\nhttps://github.com/hasii2011/code-ally-basic\n\nThe slugs are `hasii2011/pyutmodel` and `hasii2011/hasiicommon` and `hasii2011/code-ally-basic,codeallybasic`, respectively.\nNote the advanced part of the third slugs because the package name does not match the repository name;  \n\n\n\n## Usage\n\nFrom the above dependency diagram assume the following:\n\nBoth the `pyutmodel` and `hasiicommon` repositories have been updated.  We need to update the `ogl` dependencies to match the latest of both.  Assume both `GITHUB_ACCESS_TOKEN` and `PROJECTS_BASE` are correctly set and `PROJECT` is set to `'ogl'`.  Use the following CLI invocation to create the specification file.\n\n```\ncreateSpecification -s hasii2011/pyutmodel -s hasii2011/hasiicommon\n```\n\nThe command creates the file `versionSpecification.csv` with the following contents.\n\n```\nPackageName,OldVersion,NewVersion\npyutmodel,1.4.0,1.4.1\nhasiicommon,0.0.7,0.1.0                   \n```\n\nAgain assuming, the previously mentioned environment variables are set the following CLI invocation;\n\n```\nupdateDependencies\n```\n\ncorrectly updates the following\n\n* setup.py\n* requirements.txt\n* .circleci/config.yml\n\n## Installation\n\n```\npip install versionoverlord\n```\n___\n\nWritten by <a href=\"mailto:email@humberto.a.sanchez.ii@gmail.com?subject=Hello Humberto\">Humberto A. Sanchez II</a>  (C) 2023\n\n\n## Note\nFor all kind of problems, requests, enhancements, bug reports, etc.,\nDrop me an e-mail.\n\n\n---\nI am concerned about GitHub's Copilot project\n\n![](https://github.com/hasii2011/code-ally-basic/blob/master/developer/SillyGitHub.png)\n\nI urge you to read about the\n[Give up GitHub](https://GiveUpGitHub.org) campaign from\n[the Software Freedom Conservancy](https://sfconservancy.org).\n\nWhile I do not advocate for all the issues listed there, I do not like that\na company like Microsoft may profit from open source projects.\n\nI continue to use GitHub because it offers the services I need for free.  \nI continue to monitor their terms of service.\n\nAny use of this project's code by GitHub Copilot, past or present, is done\nwithout my permission.  I do not consent to GitHub's use of this project's\ncode in Copilot.\n",
    "bugtrack_url": null,
    "license": "GNU AFFERO GENERAL PUBLIC LICENSE",
    "summary": "Dependency Manager",
    "version": "1.4.0",
    "project_urls": {
        "Repository": "https://github.com/hasii2011/versionoverlord"
    },
    "split_keywords": [
        "version management",
        "dependencies",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fd4185f3ddc081aade5df7126fa29c2cbd0540fb9069fdbade71f1695b457489",
                "md5": "b076f7ac0e64ed3139e1caf8d57ff51d",
                "sha256": "d5f0364a144c70f7ae4f43e3c66d42df1d20dc4617ef55d57226c3275b1d17d6"
            },
            "downloads": -1,
            "filename": "versionoverlord-1.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b076f7ac0e64ed3139e1caf8d57ff51d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 33406,
            "upload_time": "2024-03-10T20:34:17",
            "upload_time_iso_8601": "2024-03-10T20:34:17.104807Z",
            "url": "https://files.pythonhosted.org/packages/fd/41/85f3ddc081aade5df7126fa29c2cbd0540fb9069fdbade71f1695b457489/versionoverlord-1.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c767f4ec01948bc8d0ac88f5205c03dc22914330d1bbf5437eb1890f83b72ef0",
                "md5": "f1c39aaa44e66e6dc0b97c10105f5293",
                "sha256": "ec1818367ae876c9dc63d1d4c3b8913e11f42cc42bddd2080ba384ef7469c0f1"
            },
            "downloads": -1,
            "filename": "versionoverlord-1.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f1c39aaa44e66e6dc0b97c10105f5293",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27573,
            "upload_time": "2024-03-10T20:34:18",
            "upload_time_iso_8601": "2024-03-10T20:34:18.877442Z",
            "url": "https://files.pythonhosted.org/packages/c7/67/f4ec01948bc8d0ac88f5205c03dc22914330d1bbf5437eb1890f83b72ef0/versionoverlord-1.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-10 20:34:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hasii2011",
    "github_project": "versionoverlord",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "requirements": [
        {
            "name": "wheel",
            "specs": [
                [
                    "==",
                    "0.42.0"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "==",
                    "69.1.1"
                ]
            ]
        },
        {
            "name": "twine",
            "specs": [
                [
                    "==",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.1.1"
                ]
            ]
        },
        {
            "name": "types-setuptools",
            "specs": [
                [
                    "==",
                    "69.1.0.20240310"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "==",
                    "1.9.0"
                ]
            ]
        },
        {
            "name": "html-testRunner",
            "specs": [
                [
                    "~=",
                    "1.2.1"
                ]
            ]
        },
        {
            "name": "PyGithub",
            "specs": [
                [
                    "==",
                    "2.2.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.7"
                ]
            ]
        },
        {
            "name": "buildlackey",
            "specs": [
                [
                    "==",
                    "1.6.3"
                ]
            ]
        },
        {
            "name": "semantic-version",
            "specs": [
                [
                    "==",
                    "2.10.0"
                ]
            ]
        },
        {
            "name": "codeallybasic",
            "specs": [
                [
                    "==",
                    "1.3.0"
                ]
            ]
        }
    ],
    "lcname": "versionoverlord"
}
        
Elapsed time: 0.20165s