For package version and requirment management we currently use 2 different tools:
- Poetry is used to version/manage/lockdown the direct dependencies for Epicli and to generate a
requirements.txt
used by PIP. - PIP and the
requirements.txt
is used to provision the devcontainer and release containers.
The main reasons for this 2-way approach:
- Managing dependencies with PIP and a
requirements.txt
is a nightmare. - We need
requirements.txt
to generate license information and documentation requirements.txt
is used by BlackDuck scan to scan our license usage in the project from the package perspective.
-
Open a shell in your devcontainer in the
.devcontainer
folder. -
Then run the following command to install packages defined in
poetry.lock
:poetry install
-
Now use the following commands to manage your packages:
poetry update ...
poetry install ...
pip uninstall ...
More info here.
-
After that run the following to generate a new
requirements.txt
:./gen-requirements.sh
-
Now you can rebuild your devcontainer to use the new
requirements.txt
.
-
Open a shell in your devcontainer in the
.devcontainer
folder. -
Run the following to update the
license.py
and generate theDEPENDENCIES.md
file:python3 gen-dependency-info.py YOUR-GITHUB-PAT
For obtaining a GitHub Personal Access Token, check here. Only
public\_repo
scope is required. -
Copy the table content from the generated
DEPENDENCIES.md
toepiphany\docs\home\COMPONENTS.md
replacing the content under theEpicli Python dependencies
section. Always check if theDEPENDENCIES.md
entries have empty orUNKNOWN
values in the table that might need manual additions.