python-template-project 0.1.21__tar.gz → 0.2.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.
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/workflows/build-macos.yml +8 -1
- {python_template_project-0.1.21 → python_template_project-0.2.0}/HISTORY.md +8 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/Makefile +4 -4
- {python_template_project-0.1.21/src/python_template_project.egg-info → python_template_project-0.2.0}/PKG-INFO +127 -13
- {python_template_project-0.1.21 → python_template_project-0.2.0}/README.md +126 -12
- python_template_project-0.2.0/config.yaml +96 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/index.md +126 -12
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/usage/cli.md +14 -24
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/usage/config.md +1 -1
- python_template_project-0.2.0/scripts/show_tree.py +175 -0
- python_template_project-0.2.0/src/generic_config_cli_gui/cli_generator.py +177 -0
- python_template_project-0.2.0/src/generic_config_cli_gui/config_framework.py +362 -0
- python_template_project-0.2.0/src/generic_config_cli_gui/gui_generator.py +225 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project/_version.py +2 -2
- python_template_project-0.2.0/src/python_template_project/cli/cli.py +132 -0
- python_template_project-0.2.0/src/python_template_project/config/config.py +209 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project/core/base.py +1 -1
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project/core/logging.py +9 -9
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project/gui/gui.py +13 -265
- {python_template_project-0.1.21 → python_template_project-0.2.0/src/python_template_project.egg-info}/PKG-INFO +127 -13
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project.egg-info/SOURCES.txt +5 -1
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project.egg-info/top_level.txt +1 -0
- python_template_project-0.2.0/tests/__init__.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/tests/test_generic_cli.py +24 -27
- python_template_project-0.1.21/config.yaml +0 -22
- python_template_project-0.1.21/docs/develop/01_getting_started_dev.md +0 -29
- python_template_project-0.1.21/src/python_template_project/cli/cli.py +0 -217
- python_template_project-0.1.21/src/python_template_project/config/config.py +0 -557
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/FUNDING.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/actions/setup-environment/action.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/dependabot.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/init.sh +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/release_message.sh +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/rename_project.sh +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/template.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/workflows/build.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/workflows/main.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/workflows/release.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/workflows/rename_project.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.github/workflows/update_readme.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.gitignore +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.idea/runConfigurations/config_generate.xml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.idea/runConfigurations/module_cli.xml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.idea/runConfigurations/module_gui.xml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.pre-commit-config.yaml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/.readthedocs.yaml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/LICENSE +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/.nav.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/_static/img/favicon.png +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/_static/img/logo.png +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/css/custom.css +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/develop/contributing.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/develop/make_windows.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/develop/naming_convention.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/develop/pypi_release.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/getting-started/install.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/docs/getting-started/virtual-environment.md +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/examples/kuhkopfsteig.gpx +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/examples/rother_lilienstein.gpx +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/examples/teneriffa.gpx +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/mkdocs.yml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/pyproject.toml +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/scripts/show_filelist.ps1 +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/scripts/show_tree.ps1 +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/scripts/update_readme.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/setup.cfg +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/__init__.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/firewall_handler.py +0 -0
- {python_template_project-0.1.21/src/python_template_project → python_template_project-0.2.0/src/generic_config_cli_gui}/__init__.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/main.py +0 -0
- {python_template_project-0.1.21/src/python_template_project/cli → python_template_project-0.2.0/src/python_template_project}/__init__.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project/__main__.py +0 -0
- {python_template_project-0.1.21/src/python_template_project/config → python_template_project-0.2.0/src/python_template_project/cli}/__init__.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project/cli/__main__.py +0 -0
- {python_template_project-0.1.21/src/python_template_project/core → python_template_project-0.2.0/src/python_template_project/config}/__init__.py +0 -0
- {python_template_project-0.1.21/src/python_template_project/gui → python_template_project-0.2.0/src/python_template_project/core}/__init__.py +0 -0
- {python_template_project-0.1.21/tests → python_template_project-0.2.0/src/python_template_project/gui}/__init__.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project/gui/__main__.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project.egg-info/dependency_links.txt +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project.egg-info/entry_points.txt +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/src/python_template_project.egg-info/requires.txt +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/template.yml.url +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/tests/test_gpx.py +0 -0
- {python_template_project-0.1.21 → python_template_project-0.2.0}/uv.lock +0 -0
{python_template_project-0.1.21 → python_template_project-0.2.0}/.github/workflows/build-macos.yml
RENAMED
|
@@ -30,7 +30,14 @@ jobs:
|
|
|
30
30
|
python-version: ${{ matrix.python-version }}
|
|
31
31
|
|
|
32
32
|
- name: Build Unified Executable and App Bundle with PyInstaller
|
|
33
|
-
run:
|
|
33
|
+
run: |
|
|
34
|
+
make build-macos
|
|
35
|
+
|
|
36
|
+
- name: Prepare ZIP file for release
|
|
37
|
+
run: |
|
|
38
|
+
echo "Create the ZIP archive from the contents of the release folder"
|
|
39
|
+
cd release
|
|
40
|
+
zip -r ../package-macOS.zip .
|
|
34
41
|
|
|
35
42
|
- name: Upload ZIP to GitHub Release
|
|
36
43
|
uses: softprops/action-gh-release@v2
|
|
@@ -4,6 +4,14 @@ Changelog
|
|
|
4
4
|
|
|
5
5
|
(unreleased)
|
|
6
6
|
------------
|
|
7
|
+
- Feat #33: Support kml files for input and display output files as
|
|
8
|
+
clickable links #33. [Paul Magister]
|
|
9
|
+
- Feat #31: move project specific namings into makefile so that it can
|
|
10
|
+
be renamed. [Paul Magister]
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
0.1.20 (2025-06-20)
|
|
14
|
+
-------------------
|
|
7
15
|
- Feat #31: move project specific namings into makefile so that it can
|
|
8
16
|
be renamed. [Paul Magister]
|
|
9
17
|
- Feat #31: move project specific namings into makefile so that it can
|
|
@@ -87,10 +87,6 @@ build-macos: ## Build the macOS executable.
|
|
|
87
87
|
cp README.md release/
|
|
88
88
|
echo "Create usage instructions"
|
|
89
89
|
|
|
90
|
-
echo "Create the ZIP archive from the contents of the release folder"
|
|
91
|
-
cd release
|
|
92
|
-
zip -r ../package-macOS.zip .
|
|
93
|
-
|
|
94
90
|
.PHONY: watch
|
|
95
91
|
watch: ## Run tests on every change.
|
|
96
92
|
ls **/**.py | entr uv run pytest -s -vvv -l --tb=long --maxfail=1 tests/
|
|
@@ -166,6 +162,10 @@ list: ## Show project file list (excluding ignored folders)
|
|
|
166
162
|
tree: ## Show project tree (excluding ignored folders)
|
|
167
163
|
@powershell -NoProfile -ExecutionPolicy Bypass -File ./scripts/show_tree.ps1
|
|
168
164
|
|
|
165
|
+
.PHONY: pytree
|
|
166
|
+
pytree: ## Show project tree (excluding ignored folders)
|
|
167
|
+
@uv run ./scripts/show_tree.py
|
|
168
|
+
|
|
169
169
|
.PHONY: init
|
|
170
170
|
init: ## Initialize the project based on an application template.
|
|
171
171
|
@./.github/init.sh
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-template-project
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: Feature-rich Python project template designed for robustness and ease of use.
|
|
5
5
|
Author: pamagister
|
|
6
6
|
Requires-Python: <3.12,>=3.10
|
|
@@ -41,30 +41,98 @@ A feature-rich Python project template with with auto-generated CLI, GUI and par
|
|
|
41
41
|
[](https://github.com/pamagister/python-template-project/blob/main/LICENSE)
|
|
42
42
|
[](https://github.com/pamagister/python-template-project/issues)
|
|
43
43
|
[](https://pypi.org/project/python-template-project/)
|
|
44
|
+
[](https://pepy.tech/project/python-template-project/)
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
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.
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
---
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
## How to use this template
|
|
51
52
|
|
|
52
|
-
|
|
53
|
+
Getting started on developing your own project based on this template
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
```
|
|
55
|
+
> **DO NOT FORK**
|
|
56
|
+
> This project is meant to be used from **[Use this template](https://github.com/pamagister/python-template-project/generate)** feature.
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
---
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
python-template-project
|
|
62
|
-
```
|
|
60
|
+
1. **Create a new repository using GitHub template**
|
|
61
|
+
Click on **[Use this template](https://github.com/pamagister/python-template-project/generate)**.
|
|
63
62
|
|
|
64
|
-
|
|
63
|
+
2. **Give a name to your project**
|
|
64
|
+
For example: `my-python-project`
|
|
65
|
+
*(Hyphens may ne used as project name; they are converted during renaming internally to underscores for packages.)*
|
|
66
|
+
|
|
67
|
+
3. **Set write permissions**
|
|
68
|
+
Go to: `Repository -> Settings -> Actions -> General -> Workflow permissions`
|
|
69
|
+
Select: `Read and write permissions`, then click **Save**.
|
|
70
|
+
|
|
71
|
+
4. **Trigger rename workflow**
|
|
72
|
+
Navigate to `Actions` tab → Select **Rename Action** → Run workflow on the `main` branch.
|
|
73
|
+
|
|
74
|
+
5. **Wait for the workflow to finish**
|
|
75
|
+
|
|
76
|
+
6. **Clone the repository**
|
|
77
|
+
Run:
|
|
78
|
+
```bash
|
|
79
|
+
git clone [your-github-url]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
7. **Open the project in your IDE**
|
|
65
83
|
|
|
66
|
-
|
|
84
|
+
8. **Install dependencies and create virtual environment**
|
|
85
|
+
Run:
|
|
67
86
|
|
|
87
|
+
```bash
|
|
88
|
+
make install
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
9. **Configure your IDE**
|
|
92
|
+
Set `.venv` as the local Python virtual environment.
|
|
93
|
+
|
|
94
|
+
10. **Adjust project metadata**
|
|
95
|
+
Modify `pyproject.toml` (e.g., project description, authors, license, etc.)
|
|
96
|
+
|
|
97
|
+
11. **Clean up template scripts**
|
|
98
|
+
Delete the files:
|
|
99
|
+
|
|
100
|
+
* `rename_project.yml`
|
|
101
|
+
* `rename_project.sh`
|
|
102
|
+
|
|
103
|
+
12. **Format your codebase**
|
|
104
|
+
Run:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
make fmt
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
This will auto-format your files and reorder imports (based on any name changes).
|
|
111
|
+
|
|
112
|
+
13. **Enable pre-commit hooks**
|
|
113
|
+
Run:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
uv run pre-commit install
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
14. **Add repository to ReadTheDocs**
|
|
120
|
+
Visit: [https://app.readthedocs.org/dashboard/import/](https://app.readthedocs.org/dashboard/import/)
|
|
121
|
+
|
|
122
|
+
15. **Configure PyPI publishing**
|
|
123
|
+
|
|
124
|
+
* Generate a **PyPI API token** from your PyPI account.
|
|
125
|
+
* Go to **GitHub → Settings → Secrets and variables → Actions**.
|
|
126
|
+
* Add the secret as `PYPI_API_TOKEN`.
|
|
127
|
+
|
|
128
|
+
16. **Release your first version**
|
|
129
|
+
Run:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
make release
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
68
136
|
|
|
69
137
|
## Feature overview
|
|
70
138
|
|
|
@@ -86,3 +154,49 @@ python-template-project-gui
|
|
|
86
154
|
* **[setuptools](https://pypi.org/project/setuptools/)** is used to package the project and manage dependencies.
|
|
87
155
|
* **[setuptools-scm](https://pypi.org/project/setuptools-scm/)** is used to automatically generate the `_version.py` file from the `pyproject.toml` file.
|
|
88
156
|
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Installation
|
|
160
|
+
|
|
161
|
+
Get an impression of how your own project could be installed and look like.
|
|
162
|
+
|
|
163
|
+
Download from [PyPI](https://pypi.org/).
|
|
164
|
+
|
|
165
|
+
💾 For more installation options see [install](getting-started/install.md).
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
pip install python-template-project
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Run GUI from command line
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
python-template-project-gui
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Run application from command line using CLI
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
python -m python_template_project.cli [OPTIONS] path/to/file
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
python-template-project-cli [OPTIONS] path/to/file
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## Troubleshooting
|
|
190
|
+
|
|
191
|
+
### Problems with release pipeline
|
|
192
|
+
|
|
193
|
+
If you get this error below:
|
|
194
|
+
```bash
|
|
195
|
+
/home/runner/work/_temp/xxxx_xxx.sh: line 1: .github/release_message.sh: Permission denied
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
You have to run these commands in your IDE Terminal or the git bash and then push the changes.
|
|
199
|
+
```bash
|
|
200
|
+
git update-index --chmod=+x ./.github/release_message.sh
|
|
201
|
+
```
|
|
202
|
+
|
|
@@ -10,30 +10,98 @@ A feature-rich Python project template with with auto-generated CLI, GUI and par
|
|
|
10
10
|
[](https://github.com/pamagister/python-template-project/blob/main/LICENSE)
|
|
11
11
|
[](https://github.com/pamagister/python-template-project/issues)
|
|
12
12
|
[](https://pypi.org/project/python-template-project/)
|
|
13
|
+
[](https://pepy.tech/project/python-template-project/)
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
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
|
|
|
17
|
-
|
|
18
|
+
---
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
## How to use this template
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
Getting started on developing your own project based on this template
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
```
|
|
24
|
+
> **DO NOT FORK**
|
|
25
|
+
> This project is meant to be used from **[Use this template](https://github.com/pamagister/python-template-project/generate)** feature.
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
---
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
python-template-project
|
|
31
|
-
```
|
|
29
|
+
1. **Create a new repository using GitHub template**
|
|
30
|
+
Click on **[Use this template](https://github.com/pamagister/python-template-project/generate)**.
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
2. **Give a name to your project**
|
|
33
|
+
For example: `my-python-project`
|
|
34
|
+
*(Hyphens may ne used as project name; they are converted during renaming internally to underscores for packages.)*
|
|
35
|
+
|
|
36
|
+
3. **Set write permissions**
|
|
37
|
+
Go to: `Repository -> Settings -> Actions -> General -> Workflow permissions`
|
|
38
|
+
Select: `Read and write permissions`, then click **Save**.
|
|
39
|
+
|
|
40
|
+
4. **Trigger rename workflow**
|
|
41
|
+
Navigate to `Actions` tab → Select **Rename Action** → Run workflow on the `main` branch.
|
|
42
|
+
|
|
43
|
+
5. **Wait for the workflow to finish**
|
|
44
|
+
|
|
45
|
+
6. **Clone the repository**
|
|
46
|
+
Run:
|
|
47
|
+
```bash
|
|
48
|
+
git clone [your-github-url]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
7. **Open the project in your IDE**
|
|
34
52
|
|
|
35
|
-
|
|
53
|
+
8. **Install dependencies and create virtual environment**
|
|
54
|
+
Run:
|
|
36
55
|
|
|
56
|
+
```bash
|
|
57
|
+
make install
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
9. **Configure your IDE**
|
|
61
|
+
Set `.venv` as the local Python virtual environment.
|
|
62
|
+
|
|
63
|
+
10. **Adjust project metadata**
|
|
64
|
+
Modify `pyproject.toml` (e.g., project description, authors, license, etc.)
|
|
65
|
+
|
|
66
|
+
11. **Clean up template scripts**
|
|
67
|
+
Delete the files:
|
|
68
|
+
|
|
69
|
+
* `rename_project.yml`
|
|
70
|
+
* `rename_project.sh`
|
|
71
|
+
|
|
72
|
+
12. **Format your codebase**
|
|
73
|
+
Run:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
make fmt
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
This will auto-format your files and reorder imports (based on any name changes).
|
|
80
|
+
|
|
81
|
+
13. **Enable pre-commit hooks**
|
|
82
|
+
Run:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
uv run pre-commit install
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
14. **Add repository to ReadTheDocs**
|
|
89
|
+
Visit: [https://app.readthedocs.org/dashboard/import/](https://app.readthedocs.org/dashboard/import/)
|
|
90
|
+
|
|
91
|
+
15. **Configure PyPI publishing**
|
|
92
|
+
|
|
93
|
+
* Generate a **PyPI API token** from your PyPI account.
|
|
94
|
+
* Go to **GitHub → Settings → Secrets and variables → Actions**.
|
|
95
|
+
* Add the secret as `PYPI_API_TOKEN`.
|
|
96
|
+
|
|
97
|
+
16. **Release your first version**
|
|
98
|
+
Run:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
make release
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
37
105
|
|
|
38
106
|
## Feature overview
|
|
39
107
|
|
|
@@ -55,3 +123,49 @@ python-template-project-gui
|
|
|
55
123
|
* **[setuptools](https://pypi.org/project/setuptools/)** is used to package the project and manage dependencies.
|
|
56
124
|
* **[setuptools-scm](https://pypi.org/project/setuptools-scm/)** is used to automatically generate the `_version.py` file from the `pyproject.toml` file.
|
|
57
125
|
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Installation
|
|
129
|
+
|
|
130
|
+
Get an impression of how your own project could be installed and look like.
|
|
131
|
+
|
|
132
|
+
Download from [PyPI](https://pypi.org/).
|
|
133
|
+
|
|
134
|
+
💾 For more installation options see [install](docs/getting-started/install.md).
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
pip install python-template-project
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Run GUI from command line
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
python-template-project-gui
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Run application from command line using CLI
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
python -m python_template_project.cli [OPTIONS] path/to/file
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
python-template-project-cli [OPTIONS] path/to/file
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Troubleshooting
|
|
159
|
+
|
|
160
|
+
### Problems with release pipeline
|
|
161
|
+
|
|
162
|
+
If you get this error below:
|
|
163
|
+
```bash
|
|
164
|
+
/home/runner/work/_temp/xxxx_xxx.sh: line 1: .github/release_message.sh: Permission denied
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
You have to run these commands in your IDE Terminal or the git bash and then push the changes.
|
|
168
|
+
```bash
|
|
169
|
+
git update-index --chmod=+x ./.github/release_message.sh
|
|
170
|
+
```
|
|
171
|
+
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Configuration File
|
|
2
|
+
# This file was auto-generated. Modify as needed.
|
|
3
|
+
|
|
4
|
+
# CLI Configuration
|
|
5
|
+
cli:
|
|
6
|
+
# Path to input (file or folder)
|
|
7
|
+
# Type: str
|
|
8
|
+
input: ''
|
|
9
|
+
|
|
10
|
+
# Path to output destination
|
|
11
|
+
# Type: str
|
|
12
|
+
output: ''
|
|
13
|
+
|
|
14
|
+
# Maximum distance between two waypoints
|
|
15
|
+
# Type: int
|
|
16
|
+
min_dist: 20
|
|
17
|
+
|
|
18
|
+
# Extract starting points of each track as waypoint
|
|
19
|
+
# Choices: [True, False]
|
|
20
|
+
# Type: bool
|
|
21
|
+
extract_waypoints: True
|
|
22
|
+
|
|
23
|
+
# Include elevation data in waypoints
|
|
24
|
+
# Choices: [True, False]
|
|
25
|
+
# Type: bool
|
|
26
|
+
elevation: True
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# APP Configuration
|
|
30
|
+
app:
|
|
31
|
+
# Date format to use
|
|
32
|
+
# Type: str
|
|
33
|
+
date_format: '%Y-%m-%d'
|
|
34
|
+
|
|
35
|
+
# Logging level for the application
|
|
36
|
+
# Choices: ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
|
|
37
|
+
# Type: str
|
|
38
|
+
log_level: 'INFO'
|
|
39
|
+
|
|
40
|
+
# Maximum log file size in MB before rotation
|
|
41
|
+
# Type: int
|
|
42
|
+
log_file_max_size: 10
|
|
43
|
+
|
|
44
|
+
# Number of backup log files to keep
|
|
45
|
+
# Type: int
|
|
46
|
+
log_backup_count: 5
|
|
47
|
+
|
|
48
|
+
# Log message format style
|
|
49
|
+
# Choices: ['simple', 'detailed', 'json']
|
|
50
|
+
# Type: str
|
|
51
|
+
log_format: 'detailed'
|
|
52
|
+
|
|
53
|
+
# Maximum number of worker threads
|
|
54
|
+
# Type: int
|
|
55
|
+
max_workers: 4
|
|
56
|
+
|
|
57
|
+
# Enable logging to file
|
|
58
|
+
# Choices: [True, False]
|
|
59
|
+
# Type: bool
|
|
60
|
+
enable_file_logging: True
|
|
61
|
+
|
|
62
|
+
# Enable logging to console
|
|
63
|
+
# Choices: [True, False]
|
|
64
|
+
# Type: bool
|
|
65
|
+
enable_console_logging: True
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
# GUI Configuration
|
|
69
|
+
gui:
|
|
70
|
+
# GUI theme setting
|
|
71
|
+
# Choices: ['light', 'dark', 'auto']
|
|
72
|
+
# Type: str
|
|
73
|
+
theme: 'light'
|
|
74
|
+
|
|
75
|
+
# Default window width
|
|
76
|
+
# Type: int
|
|
77
|
+
window_width: 800
|
|
78
|
+
|
|
79
|
+
# Default window height
|
|
80
|
+
# Type: int
|
|
81
|
+
window_height: 600
|
|
82
|
+
|
|
83
|
+
# Height of the log window in pixels
|
|
84
|
+
# Type: int
|
|
85
|
+
log_window_height: 200
|
|
86
|
+
|
|
87
|
+
# Automatically scroll to newest log entries
|
|
88
|
+
# Choices: [True, False]
|
|
89
|
+
# Type: bool
|
|
90
|
+
auto_scroll_log: True
|
|
91
|
+
|
|
92
|
+
# Maximum number of log lines to keep in GUI
|
|
93
|
+
# Type: int
|
|
94
|
+
max_log_lines: 1000
|
|
95
|
+
|
|
96
|
+
|
|
@@ -8,30 +8,98 @@ A feature-rich Python project template with with auto-generated CLI, GUI and par
|
|
|
8
8
|
[](https://github.com/pamagister/python-template-project/blob/main/LICENSE)
|
|
9
9
|
[](https://github.com/pamagister/python-template-project/issues)
|
|
10
10
|
[](https://pypi.org/project/python-template-project/)
|
|
11
|
+
[](https://pepy.tech/project/python-template-project/)
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
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
|
|
|
15
|
-
|
|
16
|
+
---
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
## How to use this template
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
Getting started on developing your own project based on this template
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```
|
|
22
|
+
> **DO NOT FORK**
|
|
23
|
+
> This project is meant to be used from **[Use this template](https://github.com/pamagister/python-template-project/generate)** feature.
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
---
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
python-template-project
|
|
29
|
-
```
|
|
27
|
+
1. **Create a new repository using GitHub template**
|
|
28
|
+
Click on **[Use this template](https://github.com/pamagister/python-template-project/generate)**.
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
2. **Give a name to your project**
|
|
31
|
+
For example: `my-python-project`
|
|
32
|
+
*(Hyphens may ne used as project name; they are converted during renaming internally to underscores for packages.)*
|
|
33
|
+
|
|
34
|
+
3. **Set write permissions**
|
|
35
|
+
Go to: `Repository -> Settings -> Actions -> General -> Workflow permissions`
|
|
36
|
+
Select: `Read and write permissions`, then click **Save**.
|
|
37
|
+
|
|
38
|
+
4. **Trigger rename workflow**
|
|
39
|
+
Navigate to `Actions` tab → Select **Rename Action** → Run workflow on the `main` branch.
|
|
40
|
+
|
|
41
|
+
5. **Wait for the workflow to finish**
|
|
42
|
+
|
|
43
|
+
6. **Clone the repository**
|
|
44
|
+
Run:
|
|
45
|
+
```bash
|
|
46
|
+
git clone [your-github-url]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
7. **Open the project in your IDE**
|
|
32
50
|
|
|
33
|
-
|
|
51
|
+
8. **Install dependencies and create virtual environment**
|
|
52
|
+
Run:
|
|
34
53
|
|
|
54
|
+
```bash
|
|
55
|
+
make install
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
9. **Configure your IDE**
|
|
59
|
+
Set `.venv` as the local Python virtual environment.
|
|
60
|
+
|
|
61
|
+
10. **Adjust project metadata**
|
|
62
|
+
Modify `pyproject.toml` (e.g., project description, authors, license, etc.)
|
|
63
|
+
|
|
64
|
+
11. **Clean up template scripts**
|
|
65
|
+
Delete the files:
|
|
66
|
+
|
|
67
|
+
* `rename_project.yml`
|
|
68
|
+
* `rename_project.sh`
|
|
69
|
+
|
|
70
|
+
12. **Format your codebase**
|
|
71
|
+
Run:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
make fmt
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This will auto-format your files and reorder imports (based on any name changes).
|
|
78
|
+
|
|
79
|
+
13. **Enable pre-commit hooks**
|
|
80
|
+
Run:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
uv run pre-commit install
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
14. **Add repository to ReadTheDocs**
|
|
87
|
+
Visit: [https://app.readthedocs.org/dashboard/import/](https://app.readthedocs.org/dashboard/import/)
|
|
88
|
+
|
|
89
|
+
15. **Configure PyPI publishing**
|
|
90
|
+
|
|
91
|
+
* Generate a **PyPI API token** from your PyPI account.
|
|
92
|
+
* Go to **GitHub → Settings → Secrets and variables → Actions**.
|
|
93
|
+
* Add the secret as `PYPI_API_TOKEN`.
|
|
94
|
+
|
|
95
|
+
16. **Release your first version**
|
|
96
|
+
Run:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
make release
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
35
103
|
|
|
36
104
|
## Feature overview
|
|
37
105
|
|
|
@@ -53,3 +121,49 @@ python-template-project-gui
|
|
|
53
121
|
* **[setuptools](https://pypi.org/project/setuptools/)** is used to package the project and manage dependencies.
|
|
54
122
|
* **[setuptools-scm](https://pypi.org/project/setuptools-scm/)** is used to automatically generate the `_version.py` file from the `pyproject.toml` file.
|
|
55
123
|
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Installation
|
|
127
|
+
|
|
128
|
+
Get an impression of how your own project could be installed and look like.
|
|
129
|
+
|
|
130
|
+
Download from [PyPI](https://pypi.org/).
|
|
131
|
+
|
|
132
|
+
💾 For more installation options see [install](getting-started/install.md).
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pip install python-template-project
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Run GUI from command line
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
python-template-project-gui
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Run application from command line using CLI
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
python -m python_template_project.cli [OPTIONS] path/to/file
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
python-template-project-cli [OPTIONS] path/to/file
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Troubleshooting
|
|
157
|
+
|
|
158
|
+
### Problems with release pipeline
|
|
159
|
+
|
|
160
|
+
If you get this error below:
|
|
161
|
+
```bash
|
|
162
|
+
/home/runner/work/_temp/xxxx_xxx.sh: line 1: .github/release_message.sh: Permission denied
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
You have to run these commands in your IDE Terminal or the git bash and then push the changes.
|
|
166
|
+
```bash
|
|
167
|
+
git update-index --chmod=+x ./.github/release_message.sh
|
|
168
|
+
```
|
|
169
|
+
|