python-template-project 0.2.2__tar.gz → 0.2.4__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.2.4/.github/workflows/build-linux.yml +48 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.idea/runConfigurations/config_generate.xml +3 -3
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.idea/runConfigurations/module_cli.xml +1 -1
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.idea/runConfigurations/module_gui.xml +1 -1
- {python_template_project-0.2.2 → python_template_project-0.2.4}/HISTORY.md +24 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/Makefile +14 -6
- {python_template_project-0.2.2/src/python_template_project.egg-info → python_template_project-0.2.4}/PKG-INFO +3 -2
- {python_template_project-0.2.2 → python_template_project-0.2.4}/README.md +3 -17
- {python_template_project-0.2.2 → python_template_project-0.2.4}/config.yaml +3 -3
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/index.md +1 -1
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/usage/cli.md +11 -11
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/usage/config.md +9 -9
- {python_template_project-0.2.2 → python_template_project-0.2.4}/mkdocs.yml +1 -1
- {python_template_project-0.2.2 → python_template_project-0.2.4}/pyproject.toml +1 -0
- python_template_project-0.2.4/pytest.ini +3 -0
- python_template_project-0.2.4/scripts/show_filelist.py +51 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/scripts/show_tree.py +2 -3
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/_version.py +3 -3
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/cli/cli.py +2 -2
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/config/config.py +7 -6
- {python_template_project-0.2.2 → python_template_project-0.2.4/src/python_template_project.egg-info}/PKG-INFO +3 -2
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project.egg-info/SOURCES.txt +4 -3
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project.egg-info/requires.txt +1 -0
- python_template_project-0.2.4/tests/test_gpx.py +292 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/uv.lock +54 -0
- python_template_project-0.2.2/scripts/show_filelist.ps1 +0 -14
- python_template_project-0.2.2/scripts/show_tree.ps1 +0 -58
- python_template_project-0.2.2/tests/test_gpx.py +0 -361
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/FUNDING.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/actions/setup-environment/action.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/dependabot.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/init.sh +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/release_message.sh +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/rename_project.sh +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/template.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/update_funding.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/workflows/build-macos.yml +0 -0
- /python_template_project-0.2.2/.github/workflows/build.yml → /python_template_project-0.2.4/.github/workflows/build-windows.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/workflows/main.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/workflows/release.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/workflows/rename_project.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.github/workflows/update_readme.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.gitignore +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.pre-commit-config-linux.yaml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.pre-commit-config.yaml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/.readthedocs.yaml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/LICENSE +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/.nav.yml +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/_static/img/favicon.png +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/_static/img/logo.png +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/css/custom.css +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/develop/contributing.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/develop/make_windows.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/develop/naming_convention.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/develop/pypi_release.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/funding/funding.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/getting-started/install.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/docs/getting-started/virtual-environment.md +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/examples/kuhkopfsteig.gpx +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/examples/rother_lilienstein.gpx +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/examples/teneriffa.gpx +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/scripts/generate_config_docs.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/scripts/update_readme.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/setup.cfg +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/__init__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/firewall_handler.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/main.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/__init__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/__main__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/cli/__init__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/cli/__main__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/config/__init__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/core/__init__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/core/base.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/core/logging.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/gui/__init__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/gui/__main__.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project/gui/gui.py +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project.egg-info/dependency_links.txt +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project.egg-info/entry_points.txt +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/src/python_template_project.egg-info/top_level.txt +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/template.yml.url +0 -0
- {python_template_project-0.2.2 → python_template_project-0.2.4}/tests/__init__.py +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Build Linux App
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: [ 3.11 ]
|
|
15
|
+
os: [ ubuntu-latest ]
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: ${{ matrix.python-version }}
|
|
26
|
+
|
|
27
|
+
- name: Setup Environment
|
|
28
|
+
uses: ./.github/actions/setup-environment
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Build Unified Linux Executable with PyInstaller
|
|
33
|
+
run: |
|
|
34
|
+
make build-linux
|
|
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-linux.zip .
|
|
41
|
+
|
|
42
|
+
- name: Upload ZIP to GitHub Release
|
|
43
|
+
uses: softprops/action-gh-release@v2
|
|
44
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
45
|
+
with:
|
|
46
|
+
files: package-linux.zip
|
|
47
|
+
env:
|
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -8,16 +8,16 @@
|
|
|
8
8
|
<env name="PYTHONUNBUFFERED" value="1" />
|
|
9
9
|
</envs>
|
|
10
10
|
<option name="SDK_HOME" value="" />
|
|
11
|
-
<option name="WORKING_DIRECTORY" value="$
|
|
11
|
+
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
|
12
12
|
<option name="IS_MODULE_SDK" value="true" />
|
|
13
13
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
14
14
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
15
15
|
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
|
16
|
-
<option name="SCRIPT_NAME" value="
|
|
16
|
+
<option name="SCRIPT_NAME" value="python_template_project.config.config" />
|
|
17
17
|
<option name="PARAMETERS" value="" />
|
|
18
18
|
<option name="SHOW_COMMAND_LINE" value="false" />
|
|
19
19
|
<option name="EMULATE_TERMINAL" value="false" />
|
|
20
|
-
<option name="MODULE_MODE" value="
|
|
20
|
+
<option name="MODULE_MODE" value="true" />
|
|
21
21
|
<option name="REDIRECT_INPUT" value="false" />
|
|
22
22
|
<option name="INPUT_FILE" value="" />
|
|
23
23
|
<method v="2" />
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<env name="PYTHONUNBUFFERED" value="1" />
|
|
9
9
|
</envs>
|
|
10
10
|
<option name="SDK_HOME" value="" />
|
|
11
|
-
<option name="WORKING_DIRECTORY" value="$
|
|
11
|
+
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
|
12
12
|
<option name="IS_MODULE_SDK" value="true" />
|
|
13
13
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
14
14
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<env name="PYTHONUNBUFFERED" value="1" />
|
|
9
9
|
</envs>
|
|
10
10
|
<option name="SDK_HOME" value="" />
|
|
11
|
-
<option name="WORKING_DIRECTORY" value="$
|
|
11
|
+
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
|
12
12
|
<option name="IS_MODULE_SDK" value="true" />
|
|
13
13
|
<option name="ADD_CONTENT_ROOTS" value="true" />
|
|
14
14
|
<option name="ADD_SOURCE_ROOTS" value="true" />
|
|
@@ -4,6 +4,30 @@ Changelog
|
|
|
4
4
|
|
|
5
5
|
(unreleased)
|
|
6
6
|
------------
|
|
7
|
+
- Add linux build workflow. [Paul Magister]
|
|
8
|
+
- Avoid warning by adding lxml package. [Paul Magister]
|
|
9
|
+
- Fix format. [Paul Magister]
|
|
10
|
+
- Only use on py file to show tree with or without python classes. [Paul
|
|
11
|
+
Magister]
|
|
12
|
+
- Switch to python scripts that print the project structure. [Paul
|
|
13
|
+
Magister]
|
|
14
|
+
- Switch to pytest. [Paul Magister]
|
|
15
|
+
- Update README.md from docs/index.md. [github-actions]
|
|
16
|
+
- Typo with with. [Paul Magister]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
0.2.3 (2025-11-14)
|
|
20
|
+
------------------
|
|
21
|
+
- Docs: Update HISTORY.md for release 0.2.3. [Paul Magister]
|
|
22
|
+
- Run precommit before building release for proper formatting. [Paul
|
|
23
|
+
Magister]
|
|
24
|
+
- Valid app_name for cli configuration. [Paul Magister]
|
|
25
|
+
- Proper run configurations. [Paul Magister]
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
0.2.2 (2025-11-14)
|
|
29
|
+
------------------
|
|
30
|
+
- Docs: Update HISTORY.md for release 0.2.2. [Paul Magister]
|
|
7
31
|
- Improved cli example, fix elevation cli param problem. [Paul Magister]
|
|
8
32
|
- Update to new config: cli fixes. [Paul Magister]
|
|
9
33
|
|
|
@@ -65,6 +65,17 @@ build-win: ## Build the Windows executable.
|
|
|
65
65
|
cp config.yaml release
|
|
66
66
|
cp README.md release
|
|
67
67
|
|
|
68
|
+
.PHONY: build-linux
|
|
69
|
+
build-linux: ## Build the Linux executable.
|
|
70
|
+
## Build the Linux executable.
|
|
71
|
+
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
|
|
72
|
+
|
|
73
|
+
rm -rf release
|
|
74
|
+
mkdir release
|
|
75
|
+
cp dist/python-template-project release
|
|
76
|
+
cp config.yaml release
|
|
77
|
+
|
|
78
|
+
|
|
68
79
|
.PHONY: build-macos
|
|
69
80
|
build-macos: ## Build the macOS executable.
|
|
70
81
|
echo "Building unified CLI/GUI application as executable"
|
|
@@ -119,6 +130,7 @@ virtualenv: ## Create a virtual environment.
|
|
|
119
130
|
|
|
120
131
|
.PHONY: release
|
|
121
132
|
release: ## Create a new tag for release.
|
|
133
|
+
$(MAKE) precommit
|
|
122
134
|
@echo "WARNING: This operation will create a version tag and push to GitHub"
|
|
123
135
|
|
|
124
136
|
# Get the latest Git tag if it exists, otherwise default to 0.0.0 for calculations
|
|
@@ -156,17 +168,13 @@ docs: ## Build and sync the documentation.
|
|
|
156
168
|
@uv run mkdocs build
|
|
157
169
|
@uv run mkdocs serve
|
|
158
170
|
|
|
159
|
-
.PHONY: list
|
|
160
|
-
list: ## Show project file list (excluding ignored folders)
|
|
161
|
-
@powershell -NoProfile -ExecutionPolicy Bypass -File ./scripts/show_filelist.ps1
|
|
162
|
-
|
|
163
171
|
.PHONY: tree
|
|
164
172
|
tree: ## Show project tree (excluding ignored folders)
|
|
165
|
-
@
|
|
173
|
+
@uv run ./scripts/show_tree.py
|
|
166
174
|
|
|
167
175
|
.PHONY: pytree
|
|
168
176
|
pytree: ## Show project tree (excluding ignored folders)
|
|
169
|
-
@uv run ./scripts/show_tree.py
|
|
177
|
+
@uv run ./scripts/show_tree.py --show-code
|
|
170
178
|
|
|
171
179
|
.PHONY: init
|
|
172
180
|
init: ## Initialize the project based on an application template.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-template-project
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -9,6 +9,7 @@ License-File: LICENSE
|
|
|
9
9
|
Requires-Dist: config-cli-gui>=0.2.2
|
|
10
10
|
Requires-Dist: fastkml>=1.1.0
|
|
11
11
|
Requires-Dist: gpxpy>=1.6.2
|
|
12
|
+
Requires-Dist: lxml>=6.0.2
|
|
12
13
|
Requires-Dist: shapely>=2.1.1
|
|
13
14
|
Requires-Dist: srtm-py>=0.3.7
|
|
14
15
|
Provides-Extra: dev
|
|
@@ -32,7 +33,7 @@ Dynamic: license-file
|
|
|
32
33
|
|
|
33
34
|
# Welcome to python-template-project
|
|
34
35
|
|
|
35
|
-
A feature-rich Python project template with
|
|
36
|
+
A feature-rich Python project template with auto-generated CLI, GUI and parameterized configuration.
|
|
36
37
|
|
|
37
38
|
[](https://github.com/pamagister/python-template-project/actions)
|
|
38
39
|
[](https://github.com/pamagister/python-template-project/releases)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Welcome to python-template-project
|
|
4
4
|
|
|
5
|
-
A feature-rich Python project template with
|
|
5
|
+
A feature-rich Python project template with auto-generated CLI, GUI and parameterized configuration.
|
|
6
6
|
|
|
7
7
|
[](https://github.com/pamagister/python-template-project/actions)
|
|
8
8
|
[](https://github.com/pamagister/python-template-project/releases)
|
|
@@ -51,22 +51,7 @@ Getting started on developing your own project based on this template
|
|
|
51
51
|
7. **Open the project in your IDE**
|
|
52
52
|
|
|
53
53
|
8. **Install dependencies and create virtual environment**
|
|
54
|
-
|
|
55
|
-
Install uv first:
|
|
56
|
-
```bash
|
|
57
|
-
pip install uv
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
On Linux, install pipx first:
|
|
61
|
-
```bash
|
|
62
|
-
sudo apt install pipx
|
|
63
|
-
pipx ensurepath
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
then, intall uv
|
|
67
|
-
```bash
|
|
68
|
-
pipx install uv
|
|
69
|
-
```
|
|
54
|
+
Run:
|
|
70
55
|
|
|
71
56
|
```bash
|
|
72
57
|
make install
|
|
@@ -108,6 +93,7 @@ Getting started on developing your own project based on this template
|
|
|
108
93
|
* Generate a **PyPI API token** from your PyPI account.
|
|
109
94
|
* Go to **GitHub → Settings → Secrets and variables → Actions**.
|
|
110
95
|
* Add the secret as `PYPI_API_TOKEN`.
|
|
96
|
+
* The token probably starts with "pypi-..."
|
|
111
97
|
|
|
112
98
|
16. **Release your first version**
|
|
113
99
|
Run:
|
|
@@ -22,12 +22,12 @@ cli:
|
|
|
22
22
|
extract_waypoints: true
|
|
23
23
|
# Path to input (file or folder) | type=str, default= [CLI]
|
|
24
24
|
input: ''
|
|
25
|
-
# Maximum distance between two waypoints | type=int, default=
|
|
26
|
-
min_dist:
|
|
25
|
+
# Maximum distance between two waypoints | type=int, default=25 [CLI]
|
|
26
|
+
min_dist: 25
|
|
27
27
|
# Path to output destination | type=str, default= [CLI]
|
|
28
28
|
output: ''
|
|
29
29
|
gui:
|
|
30
|
-
# Automatically scroll to newest log entries | type=bool, default=True
|
|
30
|
+
# Automatically scroll to the newest log entries | type=bool, default=True
|
|
31
31
|
auto_scroll_log: true
|
|
32
32
|
# Height of the log window in pixels | type=int, default=200
|
|
33
33
|
log_window_height: 200
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Welcome to python-template-project
|
|
2
2
|
|
|
3
|
-
A feature-rich Python project template with
|
|
3
|
+
A feature-rich Python project template with auto-generated CLI, GUI and parameterized configuration.
|
|
4
4
|
|
|
5
5
|
[](https://github.com/pamagister/python-template-project/actions)
|
|
6
6
|
[](https://github.com/pamagister/python-template-project/releases)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Command Line Interface
|
|
2
2
|
|
|
3
|
-
Command line options for
|
|
3
|
+
Command line options for python_template_project
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
python -m
|
|
6
|
+
python -m python_template_project [OPTIONS] input
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
## Options
|
|
@@ -12,7 +12,7 @@ python -m app [OPTIONS] input
|
|
|
12
12
|
|-----------------------|------|---------------------------------------------------|------------|---------------|
|
|
13
13
|
| `input` | str | Path to input (file or folder) | *required* | - |
|
|
14
14
|
| `--output` | str | Path to output destination | *required* | - |
|
|
15
|
-
| `--min_dist` | int | Maximum distance between two waypoints |
|
|
15
|
+
| `--min_dist` | int | Maximum distance between two waypoints | 25 | - |
|
|
16
16
|
| `--extract_waypoints` | bool | Extract starting points of each track as waypoint | True | [True, False] |
|
|
17
17
|
| `--elevation` | bool | Include elevation data in waypoints | True | [True, False] |
|
|
18
18
|
|
|
@@ -23,37 +23,37 @@ python -m app [OPTIONS] input
|
|
|
23
23
|
### 1. Basic usage
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
python -m
|
|
26
|
+
python -m python_template_project input
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
### 2. With verbose logging
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
python -m
|
|
33
|
-
python -m
|
|
32
|
+
python -m python_template_project -v input
|
|
33
|
+
python -m python_template_project --verbose input
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### 3. With quiet mode
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
python -m
|
|
40
|
-
python -m
|
|
39
|
+
python -m python_template_project -q input
|
|
40
|
+
python -m python_template_project --quiet input
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### 4. With min_dist parameter
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
python -m
|
|
46
|
+
python -m python_template_project --min_dist 25 input
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### 5. With extract_waypoints parameter
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
python -m
|
|
52
|
+
python -m python_template_project --extract_waypoints True input
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
### 6. With elevation parameter
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
python -m
|
|
58
|
+
python -m python_template_project --elevation True input
|
|
59
59
|
```
|
|
@@ -9,7 +9,7 @@ The parameters in the cli category can be accessed via the command line interfac
|
|
|
9
9
|
|-------------------|------|---------------------------------------------------|---------|---------------|
|
|
10
10
|
| input | str | Path to input (file or folder) | '' | - |
|
|
11
11
|
| output | str | Path to output destination | '' | - |
|
|
12
|
-
| min_dist | int | Maximum distance between two waypoints |
|
|
12
|
+
| min_dist | int | Maximum distance between two waypoints | 25 | - |
|
|
13
13
|
| extract_waypoints | bool | Extract starting points of each track as waypoint | True | [True, False] |
|
|
14
14
|
| elevation | bool | Include elevation data in waypoints | True | [True, False] |
|
|
15
15
|
|
|
@@ -28,12 +28,12 @@ The parameters in the cli category can be accessed via the command line interfac
|
|
|
28
28
|
|
|
29
29
|
## Category "gui"
|
|
30
30
|
|
|
31
|
-
| Name | Type | Description
|
|
32
|
-
|
|
33
|
-
| theme | str | GUI theme setting
|
|
34
|
-
| window_width | int | Default window width
|
|
35
|
-
| window_height | int | Default window height
|
|
36
|
-
| log_window_height | int | Height of the log window in pixels
|
|
37
|
-
| auto_scroll_log | bool | Automatically scroll to newest log entries | True | [True, False] |
|
|
38
|
-
| max_log_lines | int | Maximum number of log lines to keep in GUI
|
|
31
|
+
| Name | Type | Description | Default | Choices |
|
|
32
|
+
|-------------------|------|------------------------------------------------|---------|---------------------------|
|
|
33
|
+
| theme | str | GUI theme setting | 'light' | ['light', 'dark', 'auto'] |
|
|
34
|
+
| window_width | int | Default window width | 800 | - |
|
|
35
|
+
| window_height | int | Default window height | 600 | - |
|
|
36
|
+
| log_window_height | int | Height of the log window in pixels | 200 | - |
|
|
37
|
+
| auto_scroll_log | bool | Automatically scroll to the newest log entries | True | [True, False] |
|
|
38
|
+
| max_log_lines | int | Maximum number of log lines to keep in GUI | 1000 | - |
|
|
39
39
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
site_name: python-template-project
|
|
2
2
|
site_url: !ENV READTHEDOCS_CANONICAL_URL
|
|
3
|
-
site_description: A feature-rich Python project template with
|
|
3
|
+
site_description: A feature-rich Python project template with auto-generated CLI, GUI and parameterized configuration.
|
|
4
4
|
repo_url: https://github.com/pamagister/python-template-project
|
|
5
5
|
repo_name: GitHub
|
|
6
6
|
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import os
|
|
3
|
+
import re
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
EXCLUDE_PATTERN = re.compile(
|
|
7
|
+
r"""
|
|
8
|
+
(\.pytest_cache)|
|
|
9
|
+
(\.git)|
|
|
10
|
+
(\.ruff)|
|
|
11
|
+
(\.venv)|
|
|
12
|
+
(\.github)|
|
|
13
|
+
([/\\]build)|
|
|
14
|
+
([/\\]dist)|
|
|
15
|
+
(\.idea)|
|
|
16
|
+
([/\\]htmlcov)|
|
|
17
|
+
([/\\]__pycache__)|
|
|
18
|
+
([/\\]__main__)|
|
|
19
|
+
([/\\]__init__)|
|
|
20
|
+
([/\\]site)|
|
|
21
|
+
(\.pyc$)
|
|
22
|
+
""",
|
|
23
|
+
re.VERBOSE,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
def should_exclude(path: Path) -> bool:
|
|
27
|
+
return bool(EXCLUDE_PATTERN.search(str(path)))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def main():
|
|
31
|
+
base_path = Path.cwd()
|
|
32
|
+
|
|
33
|
+
for root, dirs, files in os.walk(base_path):
|
|
34
|
+
all_entries = dirs + files
|
|
35
|
+
|
|
36
|
+
for name in all_entries:
|
|
37
|
+
full_path = Path(root) / name
|
|
38
|
+
|
|
39
|
+
# apply exclusion filter
|
|
40
|
+
if should_exclude(full_path):
|
|
41
|
+
continue
|
|
42
|
+
|
|
43
|
+
# compute relative path
|
|
44
|
+
rel = str(full_path.relative_to(base_path))
|
|
45
|
+
|
|
46
|
+
# match PowerShell behavior: always start with "\"
|
|
47
|
+
print("\\" + rel.replace("/", "\\"))
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
if __name__ == "__main__":
|
|
51
|
+
main()
|
|
@@ -130,7 +130,6 @@ def show_tree(path, prefix="", show_code=False):
|
|
|
130
130
|
|
|
131
131
|
print(f"{prefix}{connector}{symbol} {item}")
|
|
132
132
|
next_prefix = prefix + (INDENT if is_last else VERTICAL_LINE)
|
|
133
|
-
|
|
134
133
|
if os.path.isdir(full_path):
|
|
135
134
|
show_tree(full_path, next_prefix, show_code)
|
|
136
135
|
elif show_code and item.endswith(".py"):
|
|
@@ -159,7 +158,7 @@ if __name__ == "__main__":
|
|
|
159
158
|
parser.add_argument(
|
|
160
159
|
"--show-code",
|
|
161
160
|
action="store_true",
|
|
162
|
-
default=
|
|
161
|
+
default=False,
|
|
163
162
|
help="Shows functions, classes and attributes in .py files",
|
|
164
163
|
)
|
|
165
164
|
args = parser.parse_args()
|
|
@@ -172,4 +171,4 @@ if __name__ == "__main__":
|
|
|
172
171
|
print(f"{CLASS_SYMBOL} - Class")
|
|
173
172
|
print(f"{FUNC_SYMBOL} - Function/Method")
|
|
174
173
|
print(f"{ATTR_SYMBOL} - Attribute")
|
|
175
|
-
|
|
174
|
+
print(args)
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 2,
|
|
31
|
+
__version__ = version = '0.2.4'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 2, 4)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gff1b8a26d'
|
|
@@ -24,7 +24,7 @@ def validate_config(config: ConfigParameterManager) -> bool:
|
|
|
24
24
|
"""
|
|
25
25
|
# Initialize logging system
|
|
26
26
|
logger_manager = initialize_logging(config)
|
|
27
|
-
logger = logger_manager.get_logger("
|
|
27
|
+
logger = logger_manager.get_logger("cli")
|
|
28
28
|
|
|
29
29
|
# Get CLI category and check required parameters
|
|
30
30
|
cli_category = config.cli
|
|
@@ -59,7 +59,7 @@ def run_main_processing(config: ConfigParameterManager) -> int:
|
|
|
59
59
|
"""
|
|
60
60
|
# Initialize logging system
|
|
61
61
|
logger_manager = initialize_logging(config)
|
|
62
|
-
logger = logger_manager.get_logger("
|
|
62
|
+
logger = logger_manager.get_logger("cli")
|
|
63
63
|
|
|
64
64
|
try:
|
|
65
65
|
# Log startup information
|
|
@@ -34,7 +34,7 @@ class CliConfig(ConfigCategory):
|
|
|
34
34
|
|
|
35
35
|
min_dist: ConfigParameter = ConfigParameter(
|
|
36
36
|
name="min_dist",
|
|
37
|
-
value=
|
|
37
|
+
value=25,
|
|
38
38
|
help="Maximum distance between two waypoints",
|
|
39
39
|
is_cli=True,
|
|
40
40
|
)
|
|
@@ -145,7 +145,7 @@ class GuiConfig(ConfigCategory):
|
|
|
145
145
|
auto_scroll_log: ConfigParameter = ConfigParameter(
|
|
146
146
|
name="auto_scroll_log",
|
|
147
147
|
value=True,
|
|
148
|
-
help="Automatically scroll to newest log entries",
|
|
148
|
+
help="Automatically scroll to the newest log entries",
|
|
149
149
|
)
|
|
150
150
|
|
|
151
151
|
max_log_lines: ConfigParameter = ConfigParameter(
|
|
@@ -170,9 +170,10 @@ class ConfigParameterManager(ConfigManager): # Inherit from ConfigManager
|
|
|
170
170
|
|
|
171
171
|
def main():
|
|
172
172
|
"""Main function to generate config file and documentation."""
|
|
173
|
-
default_config: str = "
|
|
174
|
-
default_cli_doc: str = "
|
|
175
|
-
default_config_doc: str = "
|
|
173
|
+
default_config: str = "config.yaml"
|
|
174
|
+
default_cli_doc: str = "docs/usage/cli.md"
|
|
175
|
+
default_config_doc: str = "docs/usage/config.md"
|
|
176
|
+
app_name = "python_template_project"
|
|
176
177
|
config_manager = ConfigParameterManager()
|
|
177
178
|
doc_gen = DocumentationGenerator(config_manager)
|
|
178
179
|
doc_gen.generate_default_config_file(output_file=default_config)
|
|
@@ -181,7 +182,7 @@ def main():
|
|
|
181
182
|
doc_gen.generate_config_markdown_doc(output_file=default_config_doc)
|
|
182
183
|
print(f"Generated: {default_config_doc}")
|
|
183
184
|
|
|
184
|
-
doc_gen.generate_cli_markdown_doc(output_file=default_cli_doc)
|
|
185
|
+
doc_gen.generate_cli_markdown_doc(output_file=default_cli_doc, app_name=app_name)
|
|
185
186
|
print(f"Generated: {default_cli_doc}")
|
|
186
187
|
|
|
187
188
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-template-project
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
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
|
|
@@ -9,6 +9,7 @@ License-File: LICENSE
|
|
|
9
9
|
Requires-Dist: config-cli-gui>=0.2.2
|
|
10
10
|
Requires-Dist: fastkml>=1.1.0
|
|
11
11
|
Requires-Dist: gpxpy>=1.6.2
|
|
12
|
+
Requires-Dist: lxml>=6.0.2
|
|
12
13
|
Requires-Dist: shapely>=2.1.1
|
|
13
14
|
Requires-Dist: srtm-py>=0.3.7
|
|
14
15
|
Provides-Extra: dev
|
|
@@ -32,7 +33,7 @@ Dynamic: license-file
|
|
|
32
33
|
|
|
33
34
|
# Welcome to python-template-project
|
|
34
35
|
|
|
35
|
-
A feature-rich Python project template with
|
|
36
|
+
A feature-rich Python project template with auto-generated CLI, GUI and parameterized configuration.
|
|
36
37
|
|
|
37
38
|
[](https://github.com/pamagister/python-template-project/actions)
|
|
38
39
|
[](https://github.com/pamagister/python-template-project/releases)
|
|
@@ -9,6 +9,7 @@ README.md
|
|
|
9
9
|
config.yaml
|
|
10
10
|
mkdocs.yml
|
|
11
11
|
pyproject.toml
|
|
12
|
+
pytest.ini
|
|
12
13
|
template.yml.url
|
|
13
14
|
uv.lock
|
|
14
15
|
.github/FUNDING.yml
|
|
@@ -22,8 +23,9 @@ uv.lock
|
|
|
22
23
|
.github/ISSUE_TEMPLATE/bug_report.md
|
|
23
24
|
.github/ISSUE_TEMPLATE/feature_request.md
|
|
24
25
|
.github/actions/setup-environment/action.yml
|
|
26
|
+
.github/workflows/build-linux.yml
|
|
25
27
|
.github/workflows/build-macos.yml
|
|
26
|
-
.github/workflows/build.yml
|
|
28
|
+
.github/workflows/build-windows.yml
|
|
27
29
|
.github/workflows/main.yml
|
|
28
30
|
.github/workflows/release.yml
|
|
29
31
|
.github/workflows/rename_project.yml
|
|
@@ -49,8 +51,7 @@ examples/kuhkopfsteig.gpx
|
|
|
49
51
|
examples/rother_lilienstein.gpx
|
|
50
52
|
examples/teneriffa.gpx
|
|
51
53
|
scripts/generate_config_docs.py
|
|
52
|
-
scripts/show_filelist.
|
|
53
|
-
scripts/show_tree.ps1
|
|
54
|
+
scripts/show_filelist.py
|
|
54
55
|
scripts/show_tree.py
|
|
55
56
|
scripts/update_readme.py
|
|
56
57
|
src/__init__.py
|