oe-python-template 0.0.1__tar.gz → 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.copier-answers.yml +1 -1
- oe_python_template-0.1.0/CHANGELOG.md +41 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/PKG-INFO +57 -20
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/README.md +56 -19
- oe_python_template-0.1.0/RELEASE_NOTES.md +41 -0
- oe_python_template-0.1.0/TEMPLATE.md +48 -0
- oe_python_template-0.1.0/VERSION +1 -0
- oe_python_template-0.1.0/bin/git-cliff +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/source/conf.py +2 -2
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/examples/jupyter.ipynb +6 -9
- oe_python_template-0.1.0/git-cliff-2.7.0/CHANGELOG.md +1513 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/LICENSE-APACHE +176 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/LICENSE-MIT +22 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/README.md +95 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/completions/_git-cliff +86 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/completions/_git-cliff.ps1 +84 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/completions/git-cliff.bash +190 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/completions/git-cliff.elv +78 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/completions/git-cliff.fish +39 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/git-cliff-completions +0 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/git-cliff-mangen +0 -0
- oe_python_template-0.1.0/git-cliff-2.7.0/man/git-cliff.1 +214 -0
- oe_python_template-0.1.0/git-cliff-2.7.0-x86_64-unknown-linux-gnu.tar.gz +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/noxfile.py +1 -1
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/pyproject.toml +4 -4
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/sonar-project.properties +2 -2
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/src/oe_python_template/__init__.py +1 -2
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/src/oe_python_template/cli.py +1 -1
- oe_python_template-0.0.1/.devcontainer/devcontainer.json → oe_python_template-0.1.0/template/.devcontainer/devcontainer.json.jinja +1 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.github/workflows/docker-image-build-publish.yml.jinja +1 -1
- {oe_python_template-0.0.1 → oe_python_template-0.1.0/template}/.vscode/extensions.json +1 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/pyproject.toml.jinja +3 -3
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/sonar-project.properties.jinja +1 -1
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/tests/cli_test.py.jinja +1 -4
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/tests/cli_test.py +6 -8
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/uv.lock +9 -9
- oe_python_template-0.0.1/TEMPLATE.md +0 -14
- oe_python_template-0.0.1/template/CHANGELOG.md +0 -0
- oe_python_template-0.0.1/template/VERSION +0 -1
- oe_python_template-0.0.1/template/examples/streamlit.webm +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.act-env +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.act-secret +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.devcontainer/Dockerfile +0 -0
- /oe_python_template-0.0.1/template/.devcontainer/devcontainer.json.jinja → /oe_python_template-0.1.0/.devcontainer/devcontainer.json +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.devcontainer/onCreateCommand +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.devcontainer/postAttachCommand +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.devcontainer/postCreateCommand +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.env.example +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.github/workflows/docker-image-build-publish.yml +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.github/workflows/package-build-publish-release.yml +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.github/workflows/test-and-report.yml +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.gitignore +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.pre-commit-config.yaml +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.python-version +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.readthedocs.yml +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.secrets.baseline +0 -0
- {oe_python_template-0.0.1/template → oe_python_template-0.1.0}/.vscode/extensions.json +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/.vscode/settings.json +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/CODEOWNERS +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/CONTRIBUTING.md +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/Dockerfile +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/LICENSE +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/_readme_footer.md +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/_readme_header.md +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/_readme_main.md +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/bump +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/codecov.yml +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/compose.yaml +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/copier.yml +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/Makefile +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/make.bat +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/source/_static/.keep +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/source/contributing.rst +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/source/index.rst +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/source/latexmkrc +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/source/main.rst +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/source/reference.rst +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/docs/source/release-notes.rst +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/examples/__init__.py +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/examples/script.py +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/examples/streamlit.py +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/github-action-run +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/latexmkrc +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/logo.png +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/src/oe_python_template/constants.py +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/src/oe_python_template/service.py +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.act-env.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.act-secret.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.devcontainer/Dockerfile.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.devcontainer/onCreateCommand.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.devcontainer/postAttachCommand.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.devcontainer/postCreateCommand.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.env.example.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.github/workflows/package-build-publish-release.yml.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.github/workflows/test-and-report.yml.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.gitignore.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.pre-commit-config.yaml.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.python-version +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.readthedocs.yml.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/.vscode/settings.json +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0/template}/CHANGELOG.md +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/CODEOWNERS.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/CONTRIBUTING.md.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/Dockerfile.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/LICENSE.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0/template}/VERSION +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/_readme_footer.md.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/_readme_header.md.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/_readme_main.md.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/bump.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/codecov.yml.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/compose.yaml.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/Makefile.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/make.bat.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/source/_static/.keep +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/source/conf.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/source/contributing.rst.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/source/index.rst.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/source/latexmkrc.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/source/main.rst.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/source/reference.rst.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/docs/source/release-notes.rst.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/examples/__init__.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/examples/jupyter.ipynb.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/examples/script.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/examples/streamlit.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/github-action-run.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/latexmkrc.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/logo.png +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/noxfile.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/src/{{ project_name_snake_case }}/__init__.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/src/{{ project_name_snake_case }}/cli.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/src/{{ project_name_snake_case }}/constants.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/src/{{ project_name_snake_case }}/service.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/tests/__init__.py.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/tests/fixtures/.keep +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/template/{{_copier_conf.answers_file}}.jinja +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/tests/__init__.py +0 -0
- {oe_python_template-0.0.1 → oe_python_template-0.1.0}/tests/fixtures/.keep +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[🧠 OE Python Template](https://oe-python-template.readthedocs.io/)
|
|
2
|
+
|
|
3
|
+
## [0.1.0](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/compare/v0.0.2..0.1.0) - 2025-03-02
|
|
4
|
+
|
|
5
|
+
### ⚙️ Miscellaneous Tasks
|
|
6
|
+
|
|
7
|
+
- Fix in arch for docker images - ([be8de5b](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/be8de5b1d13587017cdb5b7ecc1bba63ea8245fb))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [0.0.2] - 2025-03-02
|
|
11
|
+
|
|
12
|
+
### ⛰️ Features
|
|
13
|
+
|
|
14
|
+
- Various - ([5b74351](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/5b74351e71e2ca6cb7305bcabdbe802df55c4bae))
|
|
15
|
+
- Spike - ([21607c9](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/21607c955cd789dbee6171d287e21f45f039c392))
|
|
16
|
+
|
|
17
|
+
### 🐛 Bug Fixes
|
|
18
|
+
|
|
19
|
+
- *(Docker)* Runnability - ([164ab1f](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/164ab1fd7ec517d52587cf7f27f0051bdb6ce319))
|
|
20
|
+
- Initial semver - ([9f6fc12](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/9f6fc125c0e24cc0e31580de94db8beb926c8e36))
|
|
21
|
+
- Test - ([52faa74](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/52faa74b2d448b13dc12a4d8f706b34334643d00))
|
|
22
|
+
- Various - ([f99445f](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/f99445f85b346e0eb69a13c98c2ed311fd4cfafe))
|
|
23
|
+
- Chugging along - ([d59fa54](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/d59fa548abc38e88a4605f9588d57bbf9d70d1dc))
|
|
24
|
+
|
|
25
|
+
### 🚜 Refactor
|
|
26
|
+
|
|
27
|
+
- *(gitignore)* Section header - ([4ec3972](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/4ec39725978a1e2a3a6138136313365a7f7ee792))
|
|
28
|
+
- .gitignore - ([ed7d503](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/ed7d503f3c8b6ff0be55b149e1a02729b4097629))
|
|
29
|
+
|
|
30
|
+
### ⚙️ Miscellaneous Tasks
|
|
31
|
+
|
|
32
|
+
- *(SonarQube)* Wire - ([be10859](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/be108592780cc12c3e6784737a70921c8b65c966))
|
|
33
|
+
- Deps - ([99fba1c](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/99fba1cba195dbbf5bb14c617c1a3bd4124771c5))
|
|
34
|
+
- Clean post self-updating - ([4a8615a](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/4a8615a9a33d61a7b71d7a8ceff2695de6bf94bd))
|
|
35
|
+
- Act - ([650a1ba](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/650a1bac5a76ebafded4fda7f98e6e81cc7a8426))
|
|
36
|
+
|
|
37
|
+
## New Contributors ❤️
|
|
38
|
+
|
|
39
|
+
* @helmut-hoffer-von-ankershoffen made their first contribution
|
|
40
|
+
|
|
41
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oe-python-template
|
|
3
|
-
Version: 0.0
|
|
3
|
+
Version: 0.1.0
|
|
4
4
|
Summary: 🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling.
|
|
5
5
|
Project-URL: Homepage, https://oe-python-template.readthedocs.io/
|
|
6
6
|
Project-URL: Documentation, https://oe-python-template.readthedocs.io/
|
|
@@ -126,9 +126,9 @@ uvx oe-python-template command --help # all options for command
|
|
|
126
126
|
|
|
127
127
|
* Copier template to scaffold Python projects compliant with best practices and modern tooling.
|
|
128
128
|
* Various Examples:
|
|
129
|
+
- [Simple Python script]https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py)
|
|
129
130
|
- [Streamlit web application](https://oe-python-template.streamlit.app/) deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
|
|
130
131
|
- [Jupyter notebook](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/jupyter.ipynb)
|
|
131
|
-
- [Simple Python script]https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py)
|
|
132
132
|
* [Complete reference documenation](https://oe-python-template.readthedocs.io/en/latest/reference.html) on Read the Docs
|
|
133
133
|
* [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template) including unit and E2E tests (reported on Codecov)
|
|
134
134
|
* Matrix tested with [multiple python versions](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/noxfile.py) to ensure compatibility (powered by [Nox](https://nox.thea.codes/en/stable/))
|
|
@@ -140,28 +140,51 @@ uvx oe-python-template command --help # all options for command
|
|
|
140
140
|
|
|
141
141
|
## Usage Examples
|
|
142
142
|
|
|
143
|
-
###
|
|
143
|
+
### Minimal Python Script:
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
```python
|
|
146
|
+
"""Example script demonstrating the usage of the service provided by OE Python Template."""
|
|
146
147
|
|
|
148
|
+
from dotenv import load_dotenv
|
|
149
|
+
from rich.console import Console
|
|
147
150
|
|
|
148
|
-
|
|
151
|
+
from oe_python_template import Service
|
|
149
152
|
|
|
150
|
-
|
|
151
|
-
"""
|
|
152
|
-
Example script demonstrating the usage of OE Python Template.
|
|
153
|
+
console = Console()
|
|
153
154
|
|
|
154
|
-
|
|
155
|
+
load_dotenv()
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
message = Service.get_hello_world()
|
|
158
|
+
console.print(f"[blue]{message}[/blue]")
|
|
157
159
|
```
|
|
158
160
|
|
|
159
161
|
[Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py) - [Read the reference documentation](https://oe-python-template.readthedocs.io/en/latest/reference.html)
|
|
160
162
|
|
|
163
|
+
### Streamlit App
|
|
164
|
+
|
|
165
|
+
Serve the functionality provided by OE Python Template in the web by easily integrating the service into a Streamlit application.
|
|
166
|
+
|
|
167
|
+
[Try it out!](https://oe-python-template.streamlit.app) - [Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/streamlit.py)
|
|
168
|
+
|
|
169
|
+
... or serve the app locally
|
|
170
|
+
```shell
|
|
171
|
+
uv sync --all-extras # Install streamlit dependency part of the examples extra, see pyproject.toml
|
|
172
|
+
uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
|
|
173
|
+
```
|
|
174
|
+
|
|
161
175
|
## Jupyter Notebook
|
|
162
176
|
|
|
163
177
|
[Show notebook code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/jupyter.ipynb)
|
|
164
178
|
|
|
179
|
+
... or run within VSCode
|
|
180
|
+
|
|
181
|
+
```shell
|
|
182
|
+
uv sync --all-extras # Install ipykernel dependency part of the examples extra, see pyproject.toml
|
|
183
|
+
```
|
|
184
|
+
Install the [Jupyter extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
|
|
185
|
+
|
|
186
|
+
Click on `examples/jupyter.ipynb` in VSCode and run it.
|
|
187
|
+
|
|
165
188
|
## Command Line Interface (CLI)
|
|
166
189
|
|
|
167
190
|
### Run with [uvx](https://docs.astral.sh/uv/guides/tools/)
|
|
@@ -172,33 +195,47 @@ Show available commands:
|
|
|
172
195
|
uvx oe-python-template --help
|
|
173
196
|
```
|
|
174
197
|
|
|
175
|
-
Execute
|
|
198
|
+
Execute commands:
|
|
176
199
|
|
|
177
200
|
```shell
|
|
178
|
-
uvx oe-python-template
|
|
201
|
+
uvx oe-python-template hello-world
|
|
202
|
+
uvx oe-python-template hello-world --json
|
|
203
|
+
uvx oe-python-template echo "Lorem Ipsum"
|
|
179
204
|
```
|
|
180
205
|
|
|
181
|
-
###
|
|
206
|
+
### Environment
|
|
182
207
|
|
|
183
|
-
|
|
208
|
+
The service loads environment variables including support for .env files.
|
|
184
209
|
|
|
185
|
-
|
|
210
|
+
```shell
|
|
211
|
+
cp .env.example .env # copy example file
|
|
212
|
+
echo "THE_VAR=MY_VALUE" > .env # overwrite with your values
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Now run the usage examples again.
|
|
216
|
+
|
|
217
|
+
### Run with Docker
|
|
186
218
|
|
|
187
|
-
|
|
219
|
+
You can as well run the CLI within Docker.
|
|
220
|
+
|
|
221
|
+
```shell
|
|
188
222
|
docker run helmuthva/oe-python-template --help
|
|
223
|
+
docker run helmuthva/oe-python-template hello-world
|
|
224
|
+
docker run helmuthva/oe-python-template hello-world --json
|
|
225
|
+
docker run helmuthva/oe-python-template echo "Lorem"
|
|
189
226
|
```
|
|
190
227
|
|
|
191
228
|
Execute command:
|
|
192
229
|
|
|
193
|
-
```
|
|
194
|
-
docker run --env
|
|
230
|
+
```shell
|
|
231
|
+
docker run --env THE_VAR=MY_VALUE helmuthva/oe-python-template echo "Lorem Ipsum"
|
|
195
232
|
```
|
|
196
233
|
|
|
197
234
|
Or use docker compose
|
|
198
235
|
|
|
199
|
-
|
|
236
|
+
The .env is passed through from the host to the Docker container.
|
|
200
237
|
|
|
201
|
-
```
|
|
238
|
+
```shell
|
|
202
239
|
docker compose up
|
|
203
240
|
docker compose run oe-python-template --help
|
|
204
241
|
```
|
|
@@ -67,9 +67,9 @@ uvx oe-python-template command --help # all options for command
|
|
|
67
67
|
|
|
68
68
|
* Copier template to scaffold Python projects compliant with best practices and modern tooling.
|
|
69
69
|
* Various Examples:
|
|
70
|
+
- [Simple Python script]https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py)
|
|
70
71
|
- [Streamlit web application](https://oe-python-template.streamlit.app/) deployed on [Streamlit Community Cloud](https://streamlit.io/cloud)
|
|
71
72
|
- [Jupyter notebook](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/jupyter.ipynb)
|
|
72
|
-
- [Simple Python script]https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py)
|
|
73
73
|
* [Complete reference documenation](https://oe-python-template.readthedocs.io/en/latest/reference.html) on Read the Docs
|
|
74
74
|
* [Transparent test coverage](https://app.codecov.io/gh/helmut-hoffer-von-ankershoffen/oe-python-template) including unit and E2E tests (reported on Codecov)
|
|
75
75
|
* Matrix tested with [multiple python versions](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/noxfile.py) to ensure compatibility (powered by [Nox](https://nox.thea.codes/en/stable/))
|
|
@@ -81,28 +81,51 @@ uvx oe-python-template command --help # all options for command
|
|
|
81
81
|
|
|
82
82
|
## Usage Examples
|
|
83
83
|
|
|
84
|
-
###
|
|
84
|
+
### Minimal Python Script:
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
```python
|
|
87
|
+
"""Example script demonstrating the usage of the service provided by OE Python Template."""
|
|
87
88
|
|
|
89
|
+
from dotenv import load_dotenv
|
|
90
|
+
from rich.console import Console
|
|
88
91
|
|
|
89
|
-
|
|
92
|
+
from oe_python_template import Service
|
|
90
93
|
|
|
91
|
-
|
|
92
|
-
"""
|
|
93
|
-
Example script demonstrating the usage of OE Python Template.
|
|
94
|
+
console = Console()
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
load_dotenv()
|
|
96
97
|
|
|
97
|
-
|
|
98
|
+
message = Service.get_hello_world()
|
|
99
|
+
console.print(f"[blue]{message}[/blue]")
|
|
98
100
|
```
|
|
99
101
|
|
|
100
102
|
[Show script code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/script.py) - [Read the reference documentation](https://oe-python-template.readthedocs.io/en/latest/reference.html)
|
|
101
103
|
|
|
104
|
+
### Streamlit App
|
|
105
|
+
|
|
106
|
+
Serve the functionality provided by OE Python Template in the web by easily integrating the service into a Streamlit application.
|
|
107
|
+
|
|
108
|
+
[Try it out!](https://oe-python-template.streamlit.app) - [Show the code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/streamlit.py)
|
|
109
|
+
|
|
110
|
+
... or serve the app locally
|
|
111
|
+
```shell
|
|
112
|
+
uv sync --all-extras # Install streamlit dependency part of the examples extra, see pyproject.toml
|
|
113
|
+
uv run streamlit run examples/streamlit.py # Serve on localhost:8501, opens browser
|
|
114
|
+
```
|
|
115
|
+
|
|
102
116
|
## Jupyter Notebook
|
|
103
117
|
|
|
104
118
|
[Show notebook code](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/blob/main/examples/jupyter.ipynb)
|
|
105
119
|
|
|
120
|
+
... or run within VSCode
|
|
121
|
+
|
|
122
|
+
```shell
|
|
123
|
+
uv sync --all-extras # Install ipykernel dependency part of the examples extra, see pyproject.toml
|
|
124
|
+
```
|
|
125
|
+
Install the [Jupyter extension for VSCode](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
|
|
126
|
+
|
|
127
|
+
Click on `examples/jupyter.ipynb` in VSCode and run it.
|
|
128
|
+
|
|
106
129
|
## Command Line Interface (CLI)
|
|
107
130
|
|
|
108
131
|
### Run with [uvx](https://docs.astral.sh/uv/guides/tools/)
|
|
@@ -113,33 +136,47 @@ Show available commands:
|
|
|
113
136
|
uvx oe-python-template --help
|
|
114
137
|
```
|
|
115
138
|
|
|
116
|
-
Execute
|
|
139
|
+
Execute commands:
|
|
117
140
|
|
|
118
141
|
```shell
|
|
119
|
-
uvx oe-python-template
|
|
142
|
+
uvx oe-python-template hello-world
|
|
143
|
+
uvx oe-python-template hello-world --json
|
|
144
|
+
uvx oe-python-template echo "Lorem Ipsum"
|
|
120
145
|
```
|
|
121
146
|
|
|
122
|
-
###
|
|
147
|
+
### Environment
|
|
123
148
|
|
|
124
|
-
|
|
149
|
+
The service loads environment variables including support for .env files.
|
|
125
150
|
|
|
126
|
-
|
|
151
|
+
```shell
|
|
152
|
+
cp .env.example .env # copy example file
|
|
153
|
+
echo "THE_VAR=MY_VALUE" > .env # overwrite with your values
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Now run the usage examples again.
|
|
157
|
+
|
|
158
|
+
### Run with Docker
|
|
127
159
|
|
|
128
|
-
|
|
160
|
+
You can as well run the CLI within Docker.
|
|
161
|
+
|
|
162
|
+
```shell
|
|
129
163
|
docker run helmuthva/oe-python-template --help
|
|
164
|
+
docker run helmuthva/oe-python-template hello-world
|
|
165
|
+
docker run helmuthva/oe-python-template hello-world --json
|
|
166
|
+
docker run helmuthva/oe-python-template echo "Lorem"
|
|
130
167
|
```
|
|
131
168
|
|
|
132
169
|
Execute command:
|
|
133
170
|
|
|
134
|
-
```
|
|
135
|
-
docker run --env
|
|
171
|
+
```shell
|
|
172
|
+
docker run --env THE_VAR=MY_VALUE helmuthva/oe-python-template echo "Lorem Ipsum"
|
|
136
173
|
```
|
|
137
174
|
|
|
138
175
|
Or use docker compose
|
|
139
176
|
|
|
140
|
-
|
|
177
|
+
The .env is passed through from the host to the Docker container.
|
|
141
178
|
|
|
142
|
-
```
|
|
179
|
+
```shell
|
|
143
180
|
docker compose up
|
|
144
181
|
docker compose run oe-python-template --help
|
|
145
182
|
```
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[🧠 OE Python Template](https://oe-python-template.readthedocs.io/)
|
|
2
|
+
|
|
3
|
+
## [0.1.0](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/compare/v0.0.2..v0.1.0) - 2025-03-02
|
|
4
|
+
|
|
5
|
+
### ⚙️ Miscellaneous Tasks
|
|
6
|
+
|
|
7
|
+
- Fix in arch for docker images - ([be8de5b](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/be8de5b1d13587017cdb5b7ecc1bba63ea8245fb))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [0.0.2] - 2025-03-02
|
|
11
|
+
|
|
12
|
+
### ⛰️ Features
|
|
13
|
+
|
|
14
|
+
- Various - ([5b74351](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/5b74351e71e2ca6cb7305bcabdbe802df55c4bae))
|
|
15
|
+
- Spike - ([21607c9](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/21607c955cd789dbee6171d287e21f45f039c392))
|
|
16
|
+
|
|
17
|
+
### 🐛 Bug Fixes
|
|
18
|
+
|
|
19
|
+
- *(Docker)* Runnability - ([164ab1f](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/164ab1fd7ec517d52587cf7f27f0051bdb6ce319))
|
|
20
|
+
- Initial semver - ([9f6fc12](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/9f6fc125c0e24cc0e31580de94db8beb926c8e36))
|
|
21
|
+
- Test - ([52faa74](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/52faa74b2d448b13dc12a4d8f706b34334643d00))
|
|
22
|
+
- Various - ([f99445f](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/f99445f85b346e0eb69a13c98c2ed311fd4cfafe))
|
|
23
|
+
- Chugging along - ([d59fa54](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/d59fa548abc38e88a4605f9588d57bbf9d70d1dc))
|
|
24
|
+
|
|
25
|
+
### 🚜 Refactor
|
|
26
|
+
|
|
27
|
+
- *(gitignore)* Section header - ([4ec3972](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/4ec39725978a1e2a3a6138136313365a7f7ee792))
|
|
28
|
+
- .gitignore - ([ed7d503](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/ed7d503f3c8b6ff0be55b149e1a02729b4097629))
|
|
29
|
+
|
|
30
|
+
### ⚙️ Miscellaneous Tasks
|
|
31
|
+
|
|
32
|
+
- *(SonarQube)* Wire - ([be10859](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/be108592780cc12c3e6784737a70921c8b65c966))
|
|
33
|
+
- Deps - ([99fba1c](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/99fba1cba195dbbf5bb14c617c1a3bd4124771c5))
|
|
34
|
+
- Clean post self-updating - ([4a8615a](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/4a8615a9a33d61a7b71d7a8ceff2695de6bf94bd))
|
|
35
|
+
- Act - ([650a1ba](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/commit/650a1bac5a76ebafded4fda7f98e6e81cc7a8426))
|
|
36
|
+
|
|
37
|
+
## New Contributors ❤️
|
|
38
|
+
|
|
39
|
+
* @helmut-hoffer-von-ankershoffen made their first contribution
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Readme of the template
|
|
2
|
+
|
|
3
|
+
## Setup service connections
|
|
4
|
+
|
|
5
|
+
### Reporting code coverage via CodeCov
|
|
6
|
+
|
|
7
|
+
1. Sign-Up at https://app.codecov.io/
|
|
8
|
+
2. Configure via https://app.codecov.io/gh/{{ github_repository_owner }}
|
|
9
|
+
3. Copy value of `CODECOV_TOKEN` into your clipboard
|
|
10
|
+
4. Goto {{ github_repository_url_https }}/settings/secrets/actions/new and create a new repository secret called `CODECOV_TOKEN`, pasting the token from your clipboard as value
|
|
11
|
+
5. Re-run the `CI / test` GitHub job in case you tried before and it failed as Codecov was not yet wired up
|
|
12
|
+
|
|
13
|
+
### Analyzing code quality and security analysis via SonarQube cloud
|
|
14
|
+
|
|
15
|
+
1. Sign-Up at https://sonarcloud.io
|
|
16
|
+
2. Grant access to your new repo via https://github.com/settings/installations -> Configure
|
|
17
|
+
3. Goto https://sonarcloud.io/projects/create and select the repo
|
|
18
|
+
4. Select Previous Code when prompted
|
|
19
|
+
5. Configure by going to https://sonarcloud.io/project/configuration?id={{ sonarqube_key }} and clicking on "With GitHub Actions". Copy the value of `SONAR_TOKEN` into your clipboard.
|
|
20
|
+
6. Goto {{ github_repository_url_https }}/settings/secrets/actions/new and create a new repository secret called `SONAR_TOKEN`, pasting the token from your clipboard as the value
|
|
21
|
+
7. Goto https://sonarcloud.io/project/settings?id={{ sonarqube_key }} and select "Quality Gate" in the left menu. Select "Sonar way" as default quality gate.
|
|
22
|
+
8. Re-run the `CI / test` GitHub job in case you tried before and it failed as SonarQube was not yet wired up
|
|
23
|
+
|
|
24
|
+
### Publishing package to Python Package Index (PyPI)
|
|
25
|
+
|
|
26
|
+
1. Execute `uv run build`. This will generate the build files (wheel and tar.gz) in the `dist` folder
|
|
27
|
+
2. Sign-Up at https://pypi.org/
|
|
28
|
+
3. Goto https://pypi.org/manage/account/ and create an API token of scope "Entire account", calling it {{ github_repository_name }}. Copy the value of the token into your clipboard.
|
|
29
|
+
4. Execute `uv run publish`, entering __token__ as username and paste the token from your clipboard as password. This will register your package on PyPI and upload the build files
|
|
30
|
+
5. Goto https://pypi.org/manage/account/ again and delete the previously created token {{ github_repository_name }} of scope "Entire account".
|
|
31
|
+
6. Now create an new API token, again called {{ github_repository_name }}, but this time of scope "Project: {{ github_repository_name }}". Copy the token into your clipboard.
|
|
32
|
+
7. Goto {{ github_repository_url_https }}/settings/secrets/actions/new and delete the previously created token.
|
|
33
|
+
8. Then create a new repository secret called `UV_PUBLISH_TOKEN`, pasting the token from your clipboard as value
|
|
34
|
+
9. In case your `CI / test` job passed, and you are ready to release and publish, bump the version of your project by executing `bump`. In case you tried before completing this setup script, you can as well go to {{ github_repository_url_https }}/actions/workflows/package-build-publish-release.yml, click on the failed job, and re-run.
|
|
35
|
+
|
|
36
|
+
### Publishing Docker images to Docker Hub (docker.io)
|
|
37
|
+
|
|
38
|
+
1. Sign-Up at https://hub.docker.com/
|
|
39
|
+
2. Click on your avatar or profile pic and copy the username belwo that into your clipboard.
|
|
40
|
+
3. Goto {{ github_repository_url_https }}/settings/secrets/actions/new and create a new repository secret called `DOCKER_LOGIN`, setting your username at Docker Hub as the value
|
|
41
|
+
4. Goto https://app.docker.com/settings/personal-access-tokens/create and create a new access token setting the description to {{ github_repository_name }}, permissions Read & Write & Delete. Copy the value of the token into your clipboard.
|
|
42
|
+
5. Goto {{ github_repository_url_https }}/settings/secrets/actions/new and create a new repository secret called `DOCKER_PASSWORD`, pasting the token from your clipboard as the value
|
|
43
|
+
6. In case your `CI / test` job passed, and you are ready to release and publish, bump the version of your project by executing `bump`. In case you tried before completing this setup script, you can as well go to {{ github_repository_url_https }}/actions/workflows/package-build-publish-release.yml, click on the failed job, and re-run.
|
|
44
|
+
|
|
45
|
+
### Publishing Docker images to GitHub Container Registry (ghcr.io)
|
|
46
|
+
|
|
47
|
+
1. This just works, no further setup required.
|
|
48
|
+
2. Just `bump` to release and publish.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.1.0
|
|
Binary file
|
|
@@ -25,7 +25,7 @@ extensions = [
|
|
|
25
25
|
project = "oe-python-template"
|
|
26
26
|
author = "Helmut Hoffer von Ankershoffen"
|
|
27
27
|
copyright = f" (c) 2025-{datetime.now(UTC).year}, {author}" # noqa: A001
|
|
28
|
-
version = "0.0
|
|
28
|
+
version = "0.1.0"
|
|
29
29
|
release = version
|
|
30
30
|
github_username = "helmut-hoffer-von-ankershoffen"
|
|
31
31
|
github_repository = "oe-python-template"
|
|
@@ -74,7 +74,7 @@ html_static_path = ["_static"]
|
|
|
74
74
|
html_logo = "../../logo.png"
|
|
75
75
|
html_theme_options = {
|
|
76
76
|
"announcement": (
|
|
77
|
-
'<a target="_blank" href="https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template">GitHub</a> - '
|
|
77
|
+
'<a target="_blank" href="https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template">GitHub</a> - '
|
|
78
78
|
'<a target="_blank" href="https://pypi.org/project/oe-python-template">PyPI</a> - '
|
|
79
79
|
'<a target="_blank" href="https://hub.docker.com/r/helmuthva/oe-python-template/tags">Docker</a> - '
|
|
80
80
|
'<a target="_blank" href="https://sonarcloud.io/summary/new_code?id=helmut-hoffer-von-ankershoffen_oe-python-template">SonarQube</a> - ' # noqa: E501
|
|
@@ -2,18 +2,15 @@
|
|
|
2
2
|
"cells": [
|
|
3
3
|
{
|
|
4
4
|
"cell_type": "code",
|
|
5
|
-
"execution_count":
|
|
5
|
+
"execution_count": 1,
|
|
6
6
|
"metadata": {},
|
|
7
7
|
"outputs": [
|
|
8
8
|
{
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"execution_count": 13,
|
|
15
|
-
"metadata": {},
|
|
16
|
-
"output_type": "execute_result"
|
|
9
|
+
"name": "stdout",
|
|
10
|
+
"output_type": "stream",
|
|
11
|
+
"text": [
|
|
12
|
+
"Hello, world! The value of THE_VAR is not defined\n"
|
|
13
|
+
]
|
|
17
14
|
}
|
|
18
15
|
],
|
|
19
16
|
"source": [
|