python-template-project 0.1.0__tar.gz → 0.1.18__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.
Files changed (82) hide show
  1. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/rename_project.sh +3 -2
  2. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/workflows/build.yml +1 -3
  3. python_template_project-0.1.18/.github/workflows/rename_project.yml +42 -0
  4. {python_template_project-0.1.0 → python_template_project-0.1.18}/HISTORY.md +37 -0
  5. {python_template_project-0.1.0 → python_template_project-0.1.18}/Makefile +26 -11
  6. python_template_project-0.1.18/PKG-INFO +86 -0
  7. python_template_project-0.1.18/README.md +57 -0
  8. python_template_project-0.1.18/docs/develop/01_getting_started_dev.md +29 -0
  9. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/getting-started/install.md +35 -14
  10. python_template_project-0.1.18/docs/index.md +55 -0
  11. {python_template_project-0.1.0 → python_template_project-0.1.18}/pyproject.toml +6 -6
  12. python_template_project-0.1.18/scripts/update_readme.py +21 -0
  13. python_template_project-0.1.18/setup.cfg +4 -0
  14. python_template_project-0.1.18/src/firewall_handler.py +198 -0
  15. python_template_project-0.1.18/src/python_template_project/_version.py +21 -0
  16. python_template_project-0.1.18/src/python_template_project/core/base.py +549 -0
  17. python_template_project-0.1.18/src/python_template_project.egg-info/PKG-INFO +86 -0
  18. python_template_project-0.1.18/src/python_template_project.egg-info/SOURCES.txt +74 -0
  19. python_template_project-0.1.18/src/python_template_project.egg-info/dependency_links.txt +1 -0
  20. python_template_project-0.1.18/src/python_template_project.egg-info/entry_points.txt +3 -0
  21. python_template_project-0.1.18/src/python_template_project.egg-info/requires.txt +23 -0
  22. python_template_project-0.1.18/src/python_template_project.egg-info/top_level.txt +4 -0
  23. {python_template_project-0.1.0 → python_template_project-0.1.18}/uv.lock +0 -1
  24. python_template_project-0.1.0/PKG-INFO +0 -92
  25. python_template_project-0.1.0/README.md +0 -64
  26. python_template_project-0.1.0/docs/index.md +0 -62
  27. python_template_project-0.1.0/scripts/update_readme.py +0 -11
  28. python_template_project-0.1.0/src/VERSION +0 -1
  29. python_template_project-0.1.0/src/python_template_project/core/base.py +0 -397
  30. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/FUNDING.yml +0 -0
  31. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  32. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  33. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  34. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/actions/setup-environment/action.yml +0 -0
  35. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/dependabot.yml +0 -0
  36. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/init.sh +0 -0
  37. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/release_message.sh +0 -0
  38. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/workflows/build-macos.yml +0 -0
  39. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/workflows/main.yml +0 -0
  40. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/workflows/release.yml +0 -0
  41. {python_template_project-0.1.0 → python_template_project-0.1.18}/.github/workflows/update-readme.yml +0 -0
  42. {python_template_project-0.1.0 → python_template_project-0.1.18}/.gitignore +0 -0
  43. {python_template_project-0.1.0 → python_template_project-0.1.18}/.idea/runConfigurations/config_generate.xml +0 -0
  44. {python_template_project-0.1.0 → python_template_project-0.1.18}/.idea/runConfigurations/module_cli.xml +0 -0
  45. {python_template_project-0.1.0 → python_template_project-0.1.18}/.idea/runConfigurations/module_gui.xml +0 -0
  46. {python_template_project-0.1.0 → python_template_project-0.1.18}/.pre-commit-config.yaml +0 -0
  47. {python_template_project-0.1.0 → python_template_project-0.1.18}/.readthedocs.yaml +0 -0
  48. {python_template_project-0.1.0 → python_template_project-0.1.18}/LICENSE +0 -0
  49. {python_template_project-0.1.0 → python_template_project-0.1.18}/config.yaml +0 -0
  50. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/.nav.yml +0 -0
  51. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/_static/img/favicon.png +0 -0
  52. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/_static/img/logo.png +0 -0
  53. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/css/custom.css +0 -0
  54. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/develop/contributing.md +0 -0
  55. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/develop/make_windows.md +0 -0
  56. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/develop/pypi_release.md +0 -0
  57. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/getting-started/virtual-environment.md +0 -0
  58. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/usage/cli.md +0 -0
  59. {python_template_project-0.1.0 → python_template_project-0.1.18}/docs/usage/config.md +0 -0
  60. {python_template_project-0.1.0 → python_template_project-0.1.18}/examples/kuhkopfsteig.gpx +0 -0
  61. {python_template_project-0.1.0 → python_template_project-0.1.18}/examples/rother_lilienstein.gpx +0 -0
  62. {python_template_project-0.1.0 → python_template_project-0.1.18}/examples/teneriffa.gpx +0 -0
  63. {python_template_project-0.1.0 → python_template_project-0.1.18}/mkdocs.yml +0 -0
  64. {python_template_project-0.1.0 → python_template_project-0.1.18}/scripts/show-filelist.ps1 +0 -0
  65. {python_template_project-0.1.0 → python_template_project-0.1.18}/scripts/show-tree.ps1 +0 -0
  66. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/__init__.py +0 -0
  67. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/main.py +0 -0
  68. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/__init__.py +0 -0
  69. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/__main__.py +0 -0
  70. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/cli/__init__.py +0 -0
  71. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/cli/__main__.py +0 -0
  72. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/cli/cli.py +0 -0
  73. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/config/__init__.py +0 -0
  74. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/config/config.py +0 -0
  75. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/core/__init__.py +0 -0
  76. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/core/logging.py +0 -0
  77. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/gui/__init__.py +0 -0
  78. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/gui/__main__.py +0 -0
  79. {python_template_project-0.1.0 → python_template_project-0.1.18}/src/python_template_project/gui/gui.py +0 -0
  80. {python_template_project-0.1.0 → python_template_project-0.1.18}/tests/__init__.py +0 -0
  81. {python_template_project-0.1.0 → python_template_project-0.1.18}/tests/test_generic_cli.py +0 -0
  82. {python_template_project-0.1.0 → python_template_project-0.1.18}/tests/test_gpx.py +0 -0
@@ -18,19 +18,20 @@ echo "Renaming project..."
18
18
 
19
19
  original_author="pamagister"
20
20
  original_name="python-template-project"
21
+ original_package_name="python_template_project"
21
22
  original_urlname="python-template-project"
22
23
  original_description="Awesome python-template-project created by pamagister"
23
24
  # for filename in $(find . -name "*.*")
24
25
  for filename in $(git ls-files)
25
26
  do
26
27
  sed -i "s/$original_author/$author/g" $filename
27
- sed -i "s/$original_name/$name/g" $filename
28
+ sed -i "s/$original_package_name/$name/g" $filename
28
29
  sed -i "s/$original_urlname/$urlname/g" $filename
29
30
  sed -i "s/$original_description/$description/g" $filename
30
31
  echo "Renamed $filename"
31
32
  done
32
33
 
33
- mv python-template-project $name
34
+ mv original_name $name
34
35
 
35
36
  # This command runs only once on GHA!
36
37
  rm -rf .github/template.yml
@@ -29,9 +29,7 @@ jobs:
29
29
  python-version: ${{ matrix.python-version }}
30
30
 
31
31
  - name: Build Unified EXE with PyInstaller
32
- run: |
33
- echo "Building unified CLI/GUI application"
34
- uv run pyinstaller --onefile src/main.py --name python-template-project --add-data "config.yaml;." --hidden-import python_template_project.cli.cli --hidden-import python_template_project.gui.gui
32
+ run: make build-win
35
33
 
36
34
  - name: Prepare ZIP file for release
37
35
  run: |
@@ -0,0 +1,42 @@
1
+ name: Rename the project from template
2
+
3
+ on: [push]
4
+
5
+ permissions: write-all
6
+
7
+ jobs:
8
+ rename-project:
9
+ if: ${{ !contains (github.repository, '/python-template-project') }}
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ with:
14
+ # by default, it uses a depth of 1
15
+ # this fetches all history so that we can read each commit
16
+ fetch-depth: 0
17
+ ref: ${{ github.head_ref }}
18
+
19
+ - run: echo "REPOSITORY_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}' | tr '-' '_' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
20
+ shell: bash
21
+
22
+ - run: echo "REPOSITORY_URLNAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
23
+ shell: bash
24
+
25
+ - run: echo "REPOSITORY_OWNER=$(echo '${{ github.repository }}' | awk -F '/' '{print $1}')" >> $GITHUB_ENV
26
+ shell: bash
27
+
28
+ - name: Is this still a template
29
+ id: is_template
30
+ run: echo "::set-output name=is_template::$(ls .github/template.yml &> /dev/null && echo true || echo false)"
31
+
32
+ - name: Rename the project
33
+ if: steps.is_template.outputs.is_template == 'true'
34
+ run: |
35
+ echo "Renaming the project with -a(author) ${{ env.REPOSITORY_OWNER }} -n(name) ${{ env.REPOSITORY_NAME }} -u(urlname) ${{ env.REPOSITORY_URLNAME }}"
36
+ .github/rename_project.sh -a ${{ env.REPOSITORY_OWNER }} -n ${{ env.REPOSITORY_NAME }} -u ${{ env.REPOSITORY_URLNAME }} -d "Awesome ${{ env.REPOSITORY_NAME }} created by ${{ env.REPOSITORY_OWNER }}"
37
+
38
+ - uses: pamagister/git-auto-commit-action@v4
39
+ with:
40
+ commit_message: "✅ Ready to clone and code."
41
+ # commit_options: '--amend --no-edit'
42
+ push_options: --force
@@ -4,6 +4,43 @@ Changelog
4
4
 
5
5
  (unreleased)
6
6
  ------------
7
+ - Feat #30: fix link issue by modifying link in README.md. [Paul
8
+ Magister]
9
+
10
+
11
+ 0.1.16 (2025-06-20)
12
+ -------------------
13
+ - Fix #29: more rubust usage of srtm in case of connection issues. [Paul
14
+ Magister]
15
+ - Feat #30: exclude _version.py from check. [Paul Magister]
16
+ - Feat #31: doc on how to generate. [Paul Magister]
17
+ - Feat #30: exclude _version.py from check. [Paul Magister]
18
+ - Feat #31: enable project to be copied #31. [Paul Magister]
19
+ - Feat #27: move build logic into make file #27. [Paul Magister]
20
+ - Feat #30: improve README.md, fix utf8-issues on copying. [Paul
21
+ Magister]
22
+ - Feat #30: correct doc how to install and use this project. [Paul
23
+ Magister]
24
+ - Feat #30: add _version.py instead of VERSION. [Paul Magister]
25
+ - Update README.md from docs/index.md. [github-actions]
26
+
27
+
28
+ 0.1.15 (2025-06-20)
29
+ -------------------
30
+ - Feat #30: switch build system to setuptools_scm. [Paul Magister]
31
+ - Feat #30: add some links to the doc. [Paul Magister]
32
+
33
+
34
+ 0.1.14 (2025-06-20)
35
+ -------------------
36
+ - Feat #30: release project on pypi: deploy section in release.yml.
37
+ [Paul Magister]
38
+ - Feat #30: release project on pypi: rename contributing section, add
39
+ pypi_release.md doc. [Paul Magister]
40
+
41
+
42
+ 0.1.13 (2025-06-19)
43
+ -------------------
7
44
  - Feat #16: fix installer link and name. [Paul Magister]
8
45
  - Feat #16: release. [Paul Magister]
9
46
 
@@ -55,6 +55,11 @@ test: lint ## Run tests and generate coverage report.
55
55
  uv run coverage xml
56
56
  uv run coverage html
57
57
 
58
+ .PHONY: build-win
59
+ build-win: ## Build the Windows executable.
60
+ echo "Building unified CLI/GUI application"
61
+ uv run pyinstaller --onefile src/main.py --name python-template-project --add-data "config.yaml;." --hidden-import python_template_project.cli.cli --hidden-import python_template_project.gui.gui
62
+
58
63
  .PHONY: watch
59
64
  watch: ## Run tests on every change.
60
65
  ls **/**.py | entr uv run pytest -s -vvv -l --tb=long --maxfail=1 tests/
@@ -89,19 +94,29 @@ virtualenv: ## Create a virtual environment.
89
94
  release: ## Create a new tag for release.
90
95
  @echo "WARNING: This operation will create a version tag and push to GitHub"
91
96
 
92
- @CURRENT_VERSION=$$(cat src/VERSION)
93
- IFS=. read -r MAJOR MINOR PATCH <<< "$$CURRENT_VERSION"
94
- @NEXT_VERSION="$$MAJOR.$$MINOR.$$((PATCH + 1))"
95
- echo "Current version: $$CURRENT_VERSION"
96
- read -e -i "$$NEXT_VERSION" -p "Version? (provide the next x.y.z semver) : " TAG
97
- echo "$${TAG}" > src/VERSION
97
+ # Get the latest Git tag if it exists, otherwise default to 0.0.0 for calculations
98
+ # 'git describe --tags --abbrev=0' gets the most recent tag
99
+ # '|| echo 0.0.0' provides a fallback if no tags exist yet
100
+ @CURRENT_TAG=$$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0")
101
+ @echo "Current (latest) Git tag: $$CURRENT_TAG"
102
+
103
+ # Suggest next patch version based on the current tag
104
+ IFS=. read -r MAJOR MINOR PATCH <<< "$$CURRENT_TAG"
105
+ @NEXT_PATCH_VERSION="$$MAJOR.$$MINOR.$$((PATCH + 1))"
106
+
107
+ # Prompt the user for the new tag, suggesting the next patch version by default
108
+ read -e -i "$$NEXT_PATCH_VERSION" -p "Enter the new release tag (e.g., 1.0.0, 1.1.0, 1.1.1): " NEW_TAG
109
+
110
+ # Generate changelog *before* tagging, based on existing history up to the new tag point
98
111
  uv run gitchangelog > HISTORY.md
99
- git add src/VERSION HISTORY.md
100
- git commit -m "release: version $${TAG} 🚀"
101
- echo "creating git tag : $${TAG}"
102
- git tag $${TAG}
112
+ git add HISTORY.md
113
+ git commit -m "docs: Update HISTORY.md for release $${NEW_TAG}"
114
+
115
+ echo "Creating git tag : $${NEW_TAG}"
116
+ git tag "$${NEW_TAG}"
103
117
  git push -u origin HEAD --tags
104
- echo "GitHub Actions will detect the new tag and release the new version."
118
+
119
+ echo "GitHub Actions will detect the new tag and trigger the release workflows."
105
120
  echo "Add modified files to commit and push them to main"
106
121
 
107
122
  .PHONY: docs
@@ -0,0 +1,86 @@
1
+ Metadata-Version: 2.4
2
+ Name: python-template-project
3
+ Version: 0.1.18
4
+ Summary: Feature-rich Python project template designed for robustness and ease of use.
5
+ Author: pamagister
6
+ Requires-Python: <3.12,>=3.10
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: gpxpy>=1.6.2
10
+ Requires-Dist: pydantic>=2.11.7
11
+ Requires-Dist: pyyaml>=6.0.2
12
+ Requires-Dist: srtm-py>=0.3.7
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=8.4.0; extra == "dev"
15
+ Requires-Dist: pytest-mock>=3.14.1; extra == "dev"
16
+ Requires-Dist: coverage>=7.8.2; extra == "dev"
17
+ Requires-Dist: flake8>=7.2.0; extra == "dev"
18
+ Requires-Dist: black>=25.1.0; extra == "dev"
19
+ Requires-Dist: isort>=6.0.1; extra == "dev"
20
+ Requires-Dist: pytest-cov>=6.1.1; extra == "dev"
21
+ Requires-Dist: mypy>=1.16.0; extra == "dev"
22
+ Requires-Dist: gitchangelog>=3.0.4; extra == "dev"
23
+ Requires-Dist: pyinstaller>=5.8; extra == "dev"
24
+ Requires-Dist: pre-commit>=4.2.0; extra == "dev"
25
+ Requires-Dist: ruff>=0.11.13; extra == "dev"
26
+ Provides-Extra: docs
27
+ Requires-Dist: mkdocs>=1.6.1; extra == "docs"
28
+ Requires-Dist: mkdocs-awesome-nav>=2.6.1; extra == "docs"
29
+ Requires-Dist: pygments>=2.19.1; extra == "docs"
30
+ Dynamic: license-file
31
+
32
+ # Welcome to python-template-project
33
+
34
+ A feature-rich Python project template with with auto-generated CLI, GUI and parameterized configuration.
35
+
36
+ [![Github CI Status](https://github.com/pamagister/python-template-project/actions/workflows/main.yml/badge.svg)](https://github.com/pamagister/python-template-project/actions)
37
+ [![GitHub release](https://img.shields.io/github/v/release/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/releases)
38
+ [![Read the Docs](https://readthedocs.org/projects/python-template-project/badge/?version=stable)](https://python-template-project.readthedocs.io/en/stable/)
39
+ [![License](https://img.shields.io/github/license/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/blob/main/LICENSE)
40
+ [![GitHub issues](https://img.shields.io/github/issues/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/issues)
41
+ [![PyPI](https://img.shields.io/pypi/v/python-template-project)](https://pypi.org/project/python-template-project/)
42
+
43
+
44
+ This template provides a solid foundation for your next Python project, incorporating best practices for testing, automation, and distribution. It streamlines the development process with a comprehensive set of pre-configured tools and workflows, allowing you to focus on writing code.
45
+
46
+ ## Installation
47
+
48
+ Download from [PyPI](https://pypi.org/).
49
+
50
+ 💾 For more installation options see [install](getting-started/install.md).
51
+
52
+ ```bash
53
+ pip install python-template-project
54
+ ```
55
+
56
+ Run GUI from command line
57
+
58
+ ```bash
59
+ python-template-project-gui
60
+ ```
61
+
62
+ ## How to use this template
63
+
64
+ 🐍 For details, see the [Getting Started](develop/01_getting_started_dev.md) guide.
65
+
66
+
67
+ ## Feature overview
68
+
69
+ * 📦 **Package Management:** Utilizes [uv](https://docs.astral.sh/uv/getting-started/), an extremely fast Python package manager, with dependencies managed in `pyproject.toml`.
70
+ * ✅ **Code Formatting and Linting:** Pre-commit hook with the [RUFF auto-formatter](https://docs.astral.sh/ruff/) to ensure consistent code style.
71
+ * 🧪 **Testing:** Unit testing framework with [pytest](https://docs.pytest.org/en/latest/).
72
+ * 📊 **Code coverage reports** using [codecov](https://about.codecov.io/sign-up/)
73
+ * 🔄 **CI/CD:** [GitHub Actions](https://github.com/features/actions) for automated builds (Windows, macOS), unit tests, and code checks.
74
+ * 💾 **Automated Builds:** GitHub pipeline for automatically building a Windows executable and a macOS installer.
75
+ * 💬 **Parameter-Driven Automation:**
76
+ * Automatic generation of a configuration file from parameter definitions.
77
+ * Automatic generation of a Command-Line Interface (CLI) from the same parameters.
78
+ * Automatic generation of CLI API documentation.
79
+ * Automatic generation of change log using **gitchangelog** to keep a HISTORY.md file up to date.
80
+ * 📃 **Documentation:** Configuration for publishing documentation on [Read the Docs](https://about.readthedocs.com/) using [mkdocs](https://www.mkdocs.org/) .
81
+ * 🖼️ **Minimalist GUI:** Comes with a basic GUI based on [tkinker](https://tkdocs.com/tutorial/index.html) that includes an auto-generated settings menu based on your defined parameters.
82
+ * 🖥️ **Workflow Automation:** A `Makefile` is included to simplify and automate common development tasks.
83
+ * 🛳️ **Release pipeline:** Automated releases unsing the Makefile `make release` command, which creates a new tag and pushes it to the remote repo. The `release` pipeline will automatically create a new release on GitHub and trigger a release on [PyPI](https://pypi.org.
84
+ * **[setuptools](https://pypi.org/project/setuptools/)** is used to package the project and manage dependencies.
85
+ * **[setuptools-scm](https://pypi.org/project/setuptools-scm/)** is used to automatically generate the `_version.py` file from the `pyproject.toml` file.
86
+
@@ -0,0 +1,57 @@
1
+ <!-- This README.md is auto-generated from docs/index.md -->
2
+
3
+ # Welcome to python-template-project
4
+
5
+ A feature-rich Python project template with with auto-generated CLI, GUI and parameterized configuration.
6
+
7
+ [![Github CI Status](https://github.com/pamagister/python-template-project/actions/workflows/main.yml/badge.svg)](https://github.com/pamagister/python-template-project/actions)
8
+ [![GitHub release](https://img.shields.io/github/v/release/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/releases)
9
+ [![Read the Docs](https://readthedocs.org/projects/python-template-project/badge/?version=stable)](https://python-template-project.readthedocs.io/en/stable/)
10
+ [![License](https://img.shields.io/github/license/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/blob/main/LICENSE)
11
+ [![GitHub issues](https://img.shields.io/github/issues/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/issues)
12
+ [![PyPI](https://img.shields.io/pypi/v/python-template-project)](https://pypi.org/project/python-template-project/)
13
+
14
+
15
+ This template provides a solid foundation for your next Python project, incorporating best practices for testing, automation, and distribution. It streamlines the development process with a comprehensive set of pre-configured tools and workflows, allowing you to focus on writing code.
16
+
17
+ ## Installation
18
+
19
+ Download from [PyPI](https://pypi.org/).
20
+
21
+ 💾 For more installation options see [install](getting-started/install.md).
22
+
23
+ ```bash
24
+ pip install python-template-project
25
+ ```
26
+
27
+ Run GUI from command line
28
+
29
+ ```bash
30
+ python-template-project-gui
31
+ ```
32
+
33
+ ## How to use this template
34
+
35
+ 🐍 For details, see the [Getting Started](develop/01_getting_started_dev.md) guide.
36
+
37
+
38
+ ## Feature overview
39
+
40
+ * 📦 **Package Management:** Utilizes [uv](https://docs.astral.sh/uv/getting-started/), an extremely fast Python package manager, with dependencies managed in `pyproject.toml`.
41
+ * ✅ **Code Formatting and Linting:** Pre-commit hook with the [RUFF auto-formatter](https://docs.astral.sh/ruff/) to ensure consistent code style.
42
+ * 🧪 **Testing:** Unit testing framework with [pytest](https://docs.pytest.org/en/latest/).
43
+ * 📊 **Code coverage reports** using [codecov](https://about.codecov.io/sign-up/)
44
+ * 🔄 **CI/CD:** [GitHub Actions](https://github.com/features/actions) for automated builds (Windows, macOS), unit tests, and code checks.
45
+ * 💾 **Automated Builds:** GitHub pipeline for automatically building a Windows executable and a macOS installer.
46
+ * 💬 **Parameter-Driven Automation:**
47
+ * Automatic generation of a configuration file from parameter definitions.
48
+ * Automatic generation of a Command-Line Interface (CLI) from the same parameters.
49
+ * Automatic generation of CLI API documentation.
50
+ * Automatic generation of change log using **gitchangelog** to keep a HISTORY.md file up to date.
51
+ * 📃 **Documentation:** Configuration for publishing documentation on [Read the Docs](https://about.readthedocs.com/) using [mkdocs](https://www.mkdocs.org/) .
52
+ * 🖼️ **Minimalist GUI:** Comes with a basic GUI based on [tkinker](https://tkdocs.com/tutorial/index.html) that includes an auto-generated settings menu based on your defined parameters.
53
+ * 🖥️ **Workflow Automation:** A `Makefile` is included to simplify and automate common development tasks.
54
+ * 🛳️ **Release pipeline:** Automated releases unsing the Makefile `make release` command, which creates a new tag and pushes it to the remote repo. The `release` pipeline will automatically create a new release on GitHub and trigger a release on [PyPI](https://pypi.org.
55
+ * **[setuptools](https://pypi.org/project/setuptools/)** is used to package the project and manage dependencies.
56
+ * **[setuptools-scm](https://pypi.org/project/setuptools-scm/)** is used to automatically generate the `_version.py` file from the `pyproject.toml` file.
57
+
@@ -0,0 +1,29 @@
1
+
2
+ # Getting started developing
3
+
4
+ ## Setup your project development environment
5
+
6
+ Getting started on developing your own project based on this template
7
+
8
+ > **DO NOT FORK** this is meant to be used from **[Use this template](https://github.com/pamagister/python-template-project/generate)** feature.
9
+
10
+ 1. Click on **[Use this template](https://github.com/pamagister/python-template-project/generate)**
11
+ 3. Give a name to your project
12
+ (e.g. `my_python_project` recommendation is to use all lowercase and underscores separation for repo names.)
13
+ 3. Wait until the first run of CI finishes
14
+ (Github Actions will process the template and commit to your new repo)
15
+
16
+ ## Troubleshooting
17
+
18
+ ### Problems with release pipeline
19
+
20
+ If you get this error below:
21
+ ```bash
22
+ /home/runner/work/_temp/xxxx_xxx.sh: line 1: .github/release_message.sh: Permission denied
23
+ ```
24
+
25
+ You have to run these commands in your IDE Terminal or the git bash and then push the changes.
26
+ ```bash
27
+ git update-index --chmod=+x ./.github/release_message.sh
28
+ ```
29
+
@@ -1,45 +1,66 @@
1
1
  # Installation
2
2
 
3
3
 
4
+ ## 🐍 PyPI
4
5
 
5
- ## 🐍 Install from PyPI
6
+ ### Install the package from PyPI
7
+
8
+ Download from [PyPI](https://pypi.org/):
6
9
 
7
10
  ```bash
8
- python -m pip install python_template_project
11
+ pip install python-template-project
9
12
  ```
10
13
 
14
+ ### Run CLI from command line
15
+ ```bash
16
+ python-template-project [OPTIONS] path/to/file
17
+ ```
11
18
 
12
- ## 🔽 Download installer
19
+ ### Run GUI from command line
20
+ ```bash
21
+ python-template-project-gui
22
+ ```
23
+
24
+ ## 🔽 Executable
25
+
26
+ Download the latest executable:
13
27
 
14
28
  - [⬇️ Download for Windows](https://github.com/pamagister/python-template-project/releases/latest/download/installer-win.zip)
15
29
  - [⬇️ Download for macOS](https://github.com/pamagister/python-template-project/releases/latest/download/package-macos.zip)
16
30
 
17
31
 
32
+ ## 👩🏼‍💻 Run from source
18
33
 
19
- ## Run from source
20
-
21
- ### Run with CLI from source
34
+ ### Clone the repository
22
35
 
23
36
  ```bash
24
- python -m python_template_project.cli [OPTIONS] path/to/file
37
+ git clone
25
38
  ```
26
39
 
40
+ ### Navigate to the project directory
27
41
 
28
- ### Run with GUI from source
42
+ ```bash
43
+ cd python-template-project
44
+ ```
45
+
46
+ ### Install dependencies
29
47
 
30
48
  ```bash
31
- python -m python_template_project.gui
49
+ uv venv
50
+ uv pip install -e .[dev,docs]
32
51
  ```
33
52
 
34
53
 
35
- ## Run from command line:
54
+ ### Run with CLI from source
36
55
 
37
- ### Run CLI from command line
38
56
  ```bash
39
- python-template-project [OPTIONS] path/to/file
57
+ python -m python_template_project.cli [OPTIONS] path/to/file
40
58
  ```
41
59
 
42
- ### Run GUI from command line
60
+
61
+ ### Run with GUI from source
62
+
43
63
  ```bash
44
- python-template-project-gui
64
+ python -m python_template_project.gui
45
65
  ```
66
+
@@ -0,0 +1,55 @@
1
+ # Welcome to python-template-project
2
+
3
+ A feature-rich Python project template with with auto-generated CLI, GUI and parameterized configuration.
4
+
5
+ [![Github CI Status](https://github.com/pamagister/python-template-project/actions/workflows/main.yml/badge.svg)](https://github.com/pamagister/python-template-project/actions)
6
+ [![GitHub release](https://img.shields.io/github/v/release/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/releases)
7
+ [![Read the Docs](https://readthedocs.org/projects/python-template-project/badge/?version=stable)](https://python-template-project.readthedocs.io/en/stable/)
8
+ [![License](https://img.shields.io/github/license/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/blob/main/LICENSE)
9
+ [![GitHub issues](https://img.shields.io/github/issues/pamagister/python-template-project)](https://github.com/pamagister/python-template-project/issues)
10
+ [![PyPI](https://img.shields.io/pypi/v/python-template-project)](https://pypi.org/project/python-template-project/)
11
+
12
+
13
+ This template provides a solid foundation for your next Python project, incorporating best practices for testing, automation, and distribution. It streamlines the development process with a comprehensive set of pre-configured tools and workflows, allowing you to focus on writing code.
14
+
15
+ ## Installation
16
+
17
+ Download from [PyPI](https://pypi.org/).
18
+
19
+ 💾 For more installation options see [install](getting-started/install.md).
20
+
21
+ ```bash
22
+ pip install python-template-project
23
+ ```
24
+
25
+ Run GUI from command line
26
+
27
+ ```bash
28
+ python-template-project-gui
29
+ ```
30
+
31
+ ## How to use this template
32
+
33
+ 🐍 For details, see the [Getting Started](develop/01_getting_started_dev.md) guide.
34
+
35
+
36
+ ## Feature overview
37
+
38
+ * 📦 **Package Management:** Utilizes [uv](https://docs.astral.sh/uv/getting-started/), an extremely fast Python package manager, with dependencies managed in `pyproject.toml`.
39
+ * ✅ **Code Formatting and Linting:** Pre-commit hook with the [RUFF auto-formatter](https://docs.astral.sh/ruff/) to ensure consistent code style.
40
+ * 🧪 **Testing:** Unit testing framework with [pytest](https://docs.pytest.org/en/latest/).
41
+ * 📊 **Code coverage reports** using [codecov](https://about.codecov.io/sign-up/)
42
+ * 🔄 **CI/CD:** [GitHub Actions](https://github.com/features/actions) for automated builds (Windows, macOS), unit tests, and code checks.
43
+ * 💾 **Automated Builds:** GitHub pipeline for automatically building a Windows executable and a macOS installer.
44
+ * 💬 **Parameter-Driven Automation:**
45
+ * Automatic generation of a configuration file from parameter definitions.
46
+ * Automatic generation of a Command-Line Interface (CLI) from the same parameters.
47
+ * Automatic generation of CLI API documentation.
48
+ * Automatic generation of change log using **gitchangelog** to keep a HISTORY.md file up to date.
49
+ * 📃 **Documentation:** Configuration for publishing documentation on [Read the Docs](https://about.readthedocs.com/) using [mkdocs](https://www.mkdocs.org/) .
50
+ * 🖼️ **Minimalist GUI:** Comes with a basic GUI based on [tkinker](https://tkdocs.com/tutorial/index.html) that includes an auto-generated settings menu based on your defined parameters.
51
+ * 🖥️ **Workflow Automation:** A `Makefile` is included to simplify and automate common development tasks.
52
+ * 🛳️ **Release pipeline:** Automated releases unsing the Makefile `make release` command, which creates a new tag and pushes it to the remote repo. The `release` pipeline will automatically create a new release on GitHub and trigger a release on [PyPI](https://pypi.org.
53
+ * **[setuptools](https://pypi.org/project/setuptools/)** is used to package the project and manage dependencies.
54
+ * **[setuptools-scm](https://pypi.org/project/setuptools-scm/)** is used to automatically generate the `_version.py` file from the `pyproject.toml` file.
55
+
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-template-project"
3
- version = "0.1.0"
3
+ dynamic = ["version"]
4
4
  description = "Feature-rich Python project template designed for robustness and ease of use."
5
5
  authors = [
6
6
  {name = "pamagister"}
@@ -42,12 +42,11 @@ python-template-project = "python_template_project.cli.cli:main"
42
42
  python-template-project-gui = "python_template_project.gui.gui:main"
43
43
 
44
44
  [build-system]
45
- requires = ["hatchling"]
46
- build-backend = "hatchling.build"
45
+ requires = ["setuptools>=61.0", "wheel", "setuptools_scm[toml]>=6.2"]
46
+ build-backend = "setuptools.build_meta"
47
47
 
48
- # Hatchling-spezifische Konfiguration für src-Layout
49
- [tool.hatch.build.targets.wheel]
50
- packages = ["src/python_template_project"]
48
+ [tool.setuptools_scm]
49
+ write_to = "src/python_template_project/_version.py"
51
50
 
52
51
  [tool.deptry]
53
52
  pep621_dev_dependency_groups = ["dev", "docs"]
@@ -55,6 +54,7 @@ pep621_dev_dependency_groups = ["dev", "docs"]
55
54
  [tool.ruff]
56
55
  line-length = 100
57
56
  target-version = "py310"
57
+ exclude = ["src/python_template_project/_version.py"]
58
58
 
59
59
  [tool.ruff.lint]
60
60
  select = [
@@ -0,0 +1,21 @@
1
+ # scripts/update_readme.py
2
+ from pathlib import Path
3
+
4
+ src = Path("docs/index.md")
5
+ dst = Path("README.md")
6
+
7
+ # Optional: prepend a note that it's generated
8
+ prefix = "<!-- This README.md is auto-generated from docs/index.md -->\n\n"
9
+
10
+ # Lese die Quelldatei explizit mit UTF-8 Kodierung
11
+ source_content = src.read_text(encoding="utf-8")
12
+
13
+ # Schreibe den Inhalt in die Zieldatei, ebenfalls mit UTF-8 Kodierung
14
+ dst.write_text(
15
+ prefix
16
+ + source_content.replace("](getting-started\/", "](docs/getting-started/").replace(
17
+ "](develop\/", "](docs/develop/"
18
+ ),
19
+ encoding="utf-8",
20
+ )
21
+ print(f"DONE - {dst} updated from {src}")
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+