@@ -20,13 +20,12 @@ Commands:
2020
2121The Python package is based on the following toolchain:
2222
23- * [ Pipenv ] ( https://pipenv.pypa.io/en/latest / ) for dependencies and virtual environment
23+ * [ uv ] ( https://docs.astral.sh/uv / ) for dependencies and virtual environment
2424* [ Sphinx] ( https://www.sphinx-doc.org/en/master/ ) for documentation
2525* [ Flake8] ( https://flake8.pycqa.org/en/latest/ ) for style guide enforcement
2626* [ mypy] ( https://mypy-lang.org/ ) for static type checking
2727* [ Pylint] ( https://www.pylint.org/ ) for static code analysis
2828* [ pytest] ( https://docs.pytest.org/en/stable/ ) for test creation and execution
29- * [ Twine] ( https://twine.readthedocs.io/en/stable/ ) for package deployment
3029
3130
3231## Directory structure
@@ -43,64 +42,52 @@ The Python package is based on the following toolchain:
4342
4443## Build, test and deploy instructions
4544
46- Create and activate the Python virtual environment:
45+ All steps required to build, test or deploy the Python package are wrapped in separate shell scripts.
4746
48- ``` bash
49- pipenv sync --dev # setup virtual environment including development dependencies
50- pipenv shell # activate virtual environment
51- ```
52-
53- Note: the Python virtual environment can be removed using ` pipenv --rm ` .
54-
55- ** IMPORTANT:** all of the following commands have to be executed within the Python virtual environment!
47+ Check the content of the corresponding scripts for details.
5648
5749### Build documentation
5850
59- Build the Sphinx documentation: ` ./tools/build-docs.sh `
51+ Build the Sphinx documentation:
6052
6153``` bash
62- pip install -e . # package installation is required for Git version
63- cd docs
64- make html
54+ ./tools/build-docs.sh
6555```
6656
6757### Build Python package
6858
69- Build the Python package: ` ./tools/build-package.sh `
59+ Build the Python package:
7060
7161``` bash
72- python -m build --wheel
62+ ./tools/ build-package.sh
7363```
7464
7565### Run Python linters
7666
77- Run static code analysis: ` ./tools/lint-package.sh `
67+ Run static code analysis:
7868
7969``` bash
80- mkdir -p build
81- flake8 src/python_training_project --format=pylint > build/flake8.txt
82- pylint src/python_training_project --msg-template=" {path}:{line}: [{msg_id}, {obj}] {msg} ({symbol})" > build/pylint.txt
83- mypy src/python_training_project > build/mypy.txt
70+ ./tools/lint-package.sh
8471```
8572
8673### Run Python tests
8774
88- Run Python tests: ` ./tools/test-package.sh `
75+ Run Python tests:
8976
9077``` bash
91- pip install -e . # package installation is required for path resolution
92- mkdir -p build
93- pytest
78+ ./tools/test-package.sh
9479```
9580
9681### Deploy Python package
9782
98- Deploy the Python package: ` ./tools/deploy-package.sh `
83+ Make sure the set the following environment variables before calling the deployment script:
84+
85+ * ` UV_PUBLISH_URL `
86+ * ` UV_PUBLISH_USERNAME `
87+ * ` UV_PUBLISH_PASSWORD `
88+
89+ Deploy the Python package:
9990
10091``` bash
101- # Make sure to set the following environment variables
102- # TWINE_REPOSITORY_URL
103- # TWINE_USERNAME
104- # TWINE_PASSWORD
105- twine upload dist/*
92+ ./tools/deploy-package.sh
10693```
0 commit comments