config-cli-gui 0.0.2__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.
- config_cli_gui-0.0.2/.github/FUNDING.yml +12 -0
- config_cli_gui-0.0.2/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
- config_cli_gui-0.0.2/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- config_cli_gui-0.0.2/.github/PULL_REQUEST_TEMPLATE.md +15 -0
- config_cli_gui-0.0.2/.github/actions/setup-environment/action.yml +31 -0
- config_cli_gui-0.0.2/.github/dependabot.yml +6 -0
- config_cli_gui-0.0.2/.github/init.sh +68 -0
- config_cli_gui-0.0.2/.github/release_message.sh +3 -0
- config_cli_gui-0.0.2/.github/update_funding.py +46 -0
- config_cli_gui-0.0.2/.github/workflows/build-macos.yml +48 -0
- config_cli_gui-0.0.2/.github/workflows/build.yml +46 -0
- config_cli_gui-0.0.2/.github/workflows/main.yml +83 -0
- config_cli_gui-0.0.2/.github/workflows/release.yml +58 -0
- config_cli_gui-0.0.2/.github/workflows/update_readme.yml +28 -0
- config_cli_gui-0.0.2/.gitignore +199 -0
- config_cli_gui-0.0.2/.idea/runConfigurations/config_generate.xml +25 -0
- config_cli_gui-0.0.2/.idea/runConfigurations/module_cli.xml +25 -0
- config_cli_gui-0.0.2/.idea/runConfigurations/module_gui.xml +25 -0
- config_cli_gui-0.0.2/.pre-commit-config.yaml +13 -0
- config_cli_gui-0.0.2/.readthedocs.yaml +20 -0
- config_cli_gui-0.0.2/HISTORY.md +4 -0
- config_cli_gui-0.0.2/LICENSE +24 -0
- config_cli_gui-0.0.2/Makefile +172 -0
- config_cli_gui-0.0.2/PKG-INFO +282 -0
- config_cli_gui-0.0.2/README.md +251 -0
- config_cli_gui-0.0.2/config.yaml +96 -0
- config_cli_gui-0.0.2/docs/.nav.yml +15 -0
- config_cli_gui-0.0.2/docs/_static/img/favicon.png +0 -0
- config_cli_gui-0.0.2/docs/_static/img/logo.png +0 -0
- config_cli_gui-0.0.2/docs/css/custom.css +5 -0
- config_cli_gui-0.0.2/docs/develop/contributing.md +126 -0
- config_cli_gui-0.0.2/docs/develop/make_windows.md +215 -0
- config_cli_gui-0.0.2/docs/develop/naming_convention.md +46 -0
- config_cli_gui-0.0.2/docs/develop/pypi_release.md +233 -0
- config_cli_gui-0.0.2/docs/funding/funding.md +55 -0
- config_cli_gui-0.0.2/docs/getting-started/install.md +66 -0
- config_cli_gui-0.0.2/docs/getting-started/virtual-environment.md +29 -0
- config_cli_gui-0.0.2/docs/index.md +249 -0
- config_cli_gui-0.0.2/docs/usage/cli.md +45 -0
- config_cli_gui-0.0.2/docs/usage/config.md +39 -0
- config_cli_gui-0.0.2/examples/kuhkopfsteig.gpx +8189 -0
- config_cli_gui-0.0.2/examples/rother_lilienstein.gpx +571 -0
- config_cli_gui-0.0.2/examples/teneriffa.gpx +6042 -0
- config_cli_gui-0.0.2/mkdocs.yml +33 -0
- config_cli_gui-0.0.2/pyproject.toml +75 -0
- config_cli_gui-0.0.2/scripts/show_filelist.ps1 +14 -0
- config_cli_gui-0.0.2/scripts/show_tree.ps1 +58 -0
- config_cli_gui-0.0.2/scripts/show_tree.py +175 -0
- config_cli_gui-0.0.2/scripts/update_readme.py +21 -0
- config_cli_gui-0.0.2/setup.cfg +4 -0
- config_cli_gui-0.0.2/src/__init__.py +0 -0
- config_cli_gui-0.0.2/src/config_cli_gui/__init__.py +0 -0
- config_cli_gui-0.0.2/src/config_cli_gui/_version.py +21 -0
- config_cli_gui-0.0.2/src/config_cli_gui/cli_generator.py +177 -0
- config_cli_gui-0.0.2/src/config_cli_gui/config_framework.py +362 -0
- config_cli_gui-0.0.2/src/config_cli_gui/gui_generator.py +225 -0
- config_cli_gui-0.0.2/src/config_cli_gui.egg-info/PKG-INFO +282 -0
- config_cli_gui-0.0.2/src/config_cli_gui.egg-info/SOURCES.txt +78 -0
- config_cli_gui-0.0.2/src/config_cli_gui.egg-info/dependency_links.txt +1 -0
- config_cli_gui-0.0.2/src/config_cli_gui.egg-info/entry_points.txt +3 -0
- config_cli_gui-0.0.2/src/config_cli_gui.egg-info/requires.txt +25 -0
- config_cli_gui-0.0.2/src/config_cli_gui.egg-info/top_level.txt +4 -0
- config_cli_gui-0.0.2/src/example_project/__init__.py +0 -0
- config_cli_gui-0.0.2/src/example_project/__main__.py +8 -0
- config_cli_gui-0.0.2/src/example_project/cli/__init__.py +0 -0
- config_cli_gui-0.0.2/src/example_project/cli/__main__.py +8 -0
- config_cli_gui-0.0.2/src/example_project/cli/cli.py +132 -0
- config_cli_gui-0.0.2/src/example_project/config/__init__.py +0 -0
- config_cli_gui-0.0.2/src/example_project/config/config.py +209 -0
- config_cli_gui-0.0.2/src/example_project/core/__init__.py +0 -0
- config_cli_gui-0.0.2/src/example_project/core/base.py +634 -0
- config_cli_gui-0.0.2/src/example_project/core/logging.py +219 -0
- config_cli_gui-0.0.2/src/example_project/gui/__init__.py +0 -0
- config_cli_gui-0.0.2/src/example_project/gui/__main__.py +8 -0
- config_cli_gui-0.0.2/src/example_project/gui/gui.py +542 -0
- config_cli_gui-0.0.2/src/main.py +153 -0
- config_cli_gui-0.0.2/template.yml.url +6 -0
- config_cli_gui-0.0.2/tests/__init__.py +0 -0
- config_cli_gui-0.0.2/tests/test_generic_cli.py +128 -0
- config_cli_gui-0.0.2/uv.lock +1135 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [pamagister]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: ["https://www.paypal.me/PaulDD"]
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: bug, help wanted
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Desktop (please complete the following information):**
|
|
27
|
+
- OS: [e.g. iOS]
|
|
28
|
+
- Version [e.g. 22]
|
|
29
|
+
|
|
30
|
+
**Additional context**
|
|
31
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: enhancement, question
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
### Summary :memo:
|
|
2
|
+
_Write an overview about it._
|
|
3
|
+
|
|
4
|
+
### Details
|
|
5
|
+
_Describe more what you did on changes._
|
|
6
|
+
1. (...)
|
|
7
|
+
2. (...)
|
|
8
|
+
|
|
9
|
+
### Bugfixes :bug: (delete if dind't have any)
|
|
10
|
+
-
|
|
11
|
+
|
|
12
|
+
### Checks
|
|
13
|
+
- [ ] Closed #798
|
|
14
|
+
- [ ] Tested Changes
|
|
15
|
+
- [ ] Stakeholder Approval
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Setup Environment
|
|
2
|
+
|
|
3
|
+
description: Setup uv environment
|
|
4
|
+
|
|
5
|
+
inputs:
|
|
6
|
+
python-version:
|
|
7
|
+
description: 'Python version to use'
|
|
8
|
+
required: true
|
|
9
|
+
default: '3.11'
|
|
10
|
+
|
|
11
|
+
runs:
|
|
12
|
+
using: "composite"
|
|
13
|
+
steps:
|
|
14
|
+
- name: Install uv
|
|
15
|
+
uses: astral-sh/setup-uv@v3
|
|
16
|
+
with:
|
|
17
|
+
version: "latest"
|
|
18
|
+
|
|
19
|
+
- name: Create virtual environment
|
|
20
|
+
run: uv venv .venv --python ${{ inputs.python-version }}
|
|
21
|
+
shell: bash
|
|
22
|
+
|
|
23
|
+
- name: Activate virtual environment
|
|
24
|
+
run: echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
|
|
25
|
+
shell: bash
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
uv pip install -e .
|
|
30
|
+
uv pip install -e ".[dev]"
|
|
31
|
+
shell: bash
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
overwrite_template_dir=0
|
|
3
|
+
|
|
4
|
+
while getopts t:o flag
|
|
5
|
+
do
|
|
6
|
+
case "${flag}" in
|
|
7
|
+
t) template=${OPTARG};;
|
|
8
|
+
o) overwrite_template_dir=1;;
|
|
9
|
+
esac
|
|
10
|
+
done
|
|
11
|
+
|
|
12
|
+
if [ -z "${template}" ]; then
|
|
13
|
+
echo "Available templates: flask"
|
|
14
|
+
read -p "Enter template name: " template
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
repo_urlname=$(basename -s .git `git config --get remote.origin.url`)
|
|
18
|
+
repo_name=$(basename -s .git `git config --get remote.origin.url` | tr '-' '_' | tr '[:upper:]' '[:lower:]')
|
|
19
|
+
repo_owner=$(git config --get remote.origin.url | awk -F ':' '{print $2}' | awk -F '/' '{print $1}')
|
|
20
|
+
echo "Repo name: ${repo_name}"
|
|
21
|
+
echo "Repo owner: ${repo_owner}"
|
|
22
|
+
echo "Repo urlname: ${repo_urlname}"
|
|
23
|
+
|
|
24
|
+
if [ -f ".github/workflows/rename_project.yml" ]; then
|
|
25
|
+
.github/rename_project.sh -a "${repo_owner}" -n "${repo_name}" -u "${repo_urlname}" -d "Awesome ${repo_name} created by ${repo_owner}"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
function download_template {
|
|
29
|
+
rm -rf "${template_dir}"
|
|
30
|
+
mkdir -p .github/templates
|
|
31
|
+
git clone "${template_url}" "${template_dir}"
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
echo "Using template:${template}"
|
|
35
|
+
template_url="https://github.com/rochacbruno/${template}-project-template"
|
|
36
|
+
template_dir=".github/templates/${template}"
|
|
37
|
+
if [ -d "${template_dir}" ]; then
|
|
38
|
+
# Template directory already exists
|
|
39
|
+
if [ "${overwrite_template_dir}" -eq 1 ]; then
|
|
40
|
+
# user passed -o flag, delete and re-download
|
|
41
|
+
echo "Overwriting ${template_dir}"
|
|
42
|
+
download_template
|
|
43
|
+
else
|
|
44
|
+
# Ask user if they want to overwrite
|
|
45
|
+
echo "Directory ${template_dir} already exists."
|
|
46
|
+
read -p "Do you want to overwrite it? [y/N] " -n 1 -r
|
|
47
|
+
echo
|
|
48
|
+
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
|
49
|
+
echo "Overwriting ${template_dir}"
|
|
50
|
+
download_template
|
|
51
|
+
else
|
|
52
|
+
# User decided not to overwrite
|
|
53
|
+
echo "Using existing ${template_dir}"
|
|
54
|
+
fi
|
|
55
|
+
fi
|
|
56
|
+
else
|
|
57
|
+
# Template directory does not exist, download it
|
|
58
|
+
echo "Downloading ${template_url}"
|
|
59
|
+
download_template
|
|
60
|
+
fi
|
|
61
|
+
|
|
62
|
+
echo "Applying ${template} template to this project"}
|
|
63
|
+
./.github/templates/${template}/apply.sh -a "${repo_owner}" -n "${repo_name}" -u "${repo_urlname}" -d "Awesome ${repo_name} created by ${repo_owner}"
|
|
64
|
+
|
|
65
|
+
# echo "Removing temporary template files"
|
|
66
|
+
# rm -rf .github/templates/${template}
|
|
67
|
+
|
|
68
|
+
echo "Done! review, commit and push the changes"
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# scripts/update_funding.py
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
import requests
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
# Define the URL of your central FUNDING.md file on GitHub
|
|
7
|
+
FUNDING_REPO_URL = "https://raw.githubusercontent.com/pamagister/FUNDING/main/README.md"
|
|
8
|
+
|
|
9
|
+
# Define the destination path within the current repository
|
|
10
|
+
# This will create 'docs/funding/funding.md'
|
|
11
|
+
DST_THIS_REPO = Path("docs/funding/funding.md")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def update_funding_file():
|
|
15
|
+
"""
|
|
16
|
+
Downloads the FUNDING.md file from the central repository
|
|
17
|
+
and saves it to the specified path within the current repository.
|
|
18
|
+
"""
|
|
19
|
+
print(f"Attempting to download FUNDING.md from: {FUNDING_REPO_URL}")
|
|
20
|
+
|
|
21
|
+
try:
|
|
22
|
+
# Send a GET request to the URL
|
|
23
|
+
response = requests.get(FUNDING_REPO_URL)
|
|
24
|
+
response.raise_for_status() # Raise an HTTPError for bad responses (4xx or 5xx)
|
|
25
|
+
|
|
26
|
+
# Ensure the parent directory (e.g., 'docs/funding/') exists
|
|
27
|
+
DST_THIS_REPO.parent.mkdir(parents=True, exist_ok=True)
|
|
28
|
+
|
|
29
|
+
# Write the content to the destination file
|
|
30
|
+
with open(DST_THIS_REPO, "wb") as f:
|
|
31
|
+
f.write(response.content)
|
|
32
|
+
|
|
33
|
+
print(f"Successfully updated FUNDING.md at: {DST_THIS_REPO}")
|
|
34
|
+
|
|
35
|
+
except requests.exceptions.RequestException as e:
|
|
36
|
+
print(f"Error downloading FUNDING.md: {e}", file=sys.stderr)
|
|
37
|
+
sys.exit(1) # Exit with an error code
|
|
38
|
+
except IOError as e:
|
|
39
|
+
print(f"Error writing FUNDING.md to file: {e}", file=sys.stderr)
|
|
40
|
+
sys.exit(1) # Exit with an error code
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
if __name__ == "__main__":
|
|
44
|
+
# Ensure the 'requests' library is installed for this script to run.
|
|
45
|
+
# If not, install it using: pip install requests
|
|
46
|
+
update_funding_file()
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Build macOS App
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*' # Triggers for tags like 0.1 or v0.1.3
|
|
7
|
+
workflow_dispatch: # Allows manual triggering
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: [ 3.11 ]
|
|
15
|
+
os: [ macos-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: '3.11'
|
|
26
|
+
|
|
27
|
+
- name: Setup Environment # Composite Action
|
|
28
|
+
uses: ./.github/actions/setup-environment
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
|
|
32
|
+
- name: Build Unified Executable and App Bundle with PyInstaller
|
|
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 .
|
|
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-macOS.zip
|
|
47
|
+
env:
|
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Build Windows EXE
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*' # Triggers for tags like 0.1 or v0.1.3
|
|
7
|
+
workflow_dispatch: # Allows manual triggering
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: [ 3.11 ]
|
|
15
|
+
os: [ windows-latest ]
|
|
16
|
+
runs-on: ${{ matrix.os }}
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout repository
|
|
19
|
+
uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: '3.11'
|
|
25
|
+
|
|
26
|
+
- name: Setup Environment # Composite Action
|
|
27
|
+
uses: ./.github/actions/setup-environment
|
|
28
|
+
with:
|
|
29
|
+
python-version: ${{ matrix.python-version }}
|
|
30
|
+
|
|
31
|
+
- name: Build Unified EXE with PyInstaller
|
|
32
|
+
run: make build-win
|
|
33
|
+
|
|
34
|
+
- name: Prepare ZIP file for release
|
|
35
|
+
run: |
|
|
36
|
+
echo " - Double-click to start GUI" >> release\USAGE.txt
|
|
37
|
+
echo " - Run from command line for CLI options" >> release\USAGE.txt
|
|
38
|
+
powershell Compress-Archive -Path release\* -DestinationPath installer-win.zip
|
|
39
|
+
|
|
40
|
+
- name: Upload ZIP to GitHub Release
|
|
41
|
+
uses: softprops/action-gh-release@v2
|
|
42
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
43
|
+
with:
|
|
44
|
+
files: installer-win.zip
|
|
45
|
+
env:
|
|
46
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# This is a basic workflow to help you get started with Actions
|
|
2
|
+
|
|
3
|
+
name: CI
|
|
4
|
+
|
|
5
|
+
# Controls when the workflow will run
|
|
6
|
+
on:
|
|
7
|
+
# Triggers the workflow on push or pull request events but only for the main branch
|
|
8
|
+
push:
|
|
9
|
+
branches: [ main ]
|
|
10
|
+
pull_request:
|
|
11
|
+
branches: [ main ]
|
|
12
|
+
|
|
13
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
14
|
+
workflow_dispatch:
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
linter:
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
python-version: [ 3.11 ]
|
|
22
|
+
os: [ubuntu-latest]
|
|
23
|
+
runs-on: ${{ matrix.os }}
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: ${{ matrix.python-version }}
|
|
29
|
+
|
|
30
|
+
- name: Setup Environment # Composite Action
|
|
31
|
+
uses: ./.github/actions/setup-environment
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ matrix.python-version }}
|
|
34
|
+
|
|
35
|
+
- name: Run linter
|
|
36
|
+
run: make lint
|
|
37
|
+
|
|
38
|
+
tests_win:
|
|
39
|
+
needs: linter
|
|
40
|
+
strategy:
|
|
41
|
+
fail-fast: false
|
|
42
|
+
matrix:
|
|
43
|
+
python-version: [ 3.11 ]
|
|
44
|
+
os: [windows-latest]
|
|
45
|
+
runs-on: ${{ matrix.os }}
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
|
+
- uses: actions/setup-python@v5
|
|
49
|
+
with:
|
|
50
|
+
python-version: ${{ matrix.python-version }}
|
|
51
|
+
|
|
52
|
+
- name: Setup Environment # Composite Action
|
|
53
|
+
uses: ./.github/actions/setup-environment
|
|
54
|
+
with:
|
|
55
|
+
python-version: ${{ matrix.python-version }}
|
|
56
|
+
|
|
57
|
+
- name: run tests
|
|
58
|
+
run: uv run pytest -s -vvvv -l --tb=long tests
|
|
59
|
+
|
|
60
|
+
tests_linux_macos:
|
|
61
|
+
needs: tests_win
|
|
62
|
+
strategy:
|
|
63
|
+
fail-fast: false
|
|
64
|
+
matrix:
|
|
65
|
+
python-version: [ 3.11 ]
|
|
66
|
+
os: [ ubuntu-latest, macos-latest ]
|
|
67
|
+
runs-on: ${{ matrix.os }}
|
|
68
|
+
steps:
|
|
69
|
+
- uses: actions/checkout@v4
|
|
70
|
+
- uses: actions/setup-python@v5
|
|
71
|
+
with:
|
|
72
|
+
python-version: ${{ matrix.python-version }}
|
|
73
|
+
|
|
74
|
+
- name: Setup Environment # Composite Action
|
|
75
|
+
uses: ./.github/actions/setup-environment
|
|
76
|
+
with:
|
|
77
|
+
python-version: ${{ matrix.python-version }}
|
|
78
|
+
|
|
79
|
+
- name: Run tests
|
|
80
|
+
run: make test
|
|
81
|
+
|
|
82
|
+
- name: "Upload coverage to Codecov"
|
|
83
|
+
uses: codecov/codecov-action@v5
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Upload Python Package
|
|
2
|
+
permissions:
|
|
3
|
+
contents: write
|
|
4
|
+
|
|
5
|
+
# if you get a Permission denied error on executing the sh file, you have to execute:
|
|
6
|
+
# git update-index --chmod=+x ./.github/release_message.sh
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
# Sequence of patterns matched against refs/tags
|
|
11
|
+
tags:
|
|
12
|
+
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
13
|
+
|
|
14
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
release:
|
|
19
|
+
name: Create Release
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: write
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
# by default, it uses a depth of 1
|
|
27
|
+
# this fetches all history so that we can read each commit
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
- name: Generate Changelog
|
|
30
|
+
run: .github/release_message.sh > release_message.md
|
|
31
|
+
- name: Release
|
|
32
|
+
uses: softprops/action-gh-release@v2
|
|
33
|
+
with:
|
|
34
|
+
body_path: release_message.md
|
|
35
|
+
|
|
36
|
+
deploy:
|
|
37
|
+
needs: release
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v4
|
|
41
|
+
- name: Set up Python
|
|
42
|
+
uses: actions/setup-python@v4
|
|
43
|
+
with:
|
|
44
|
+
# Use a specific Python version, e.g., 3.11, consistent with your build
|
|
45
|
+
python-version: '3.11'
|
|
46
|
+
- name: Install dependencies
|
|
47
|
+
run: |
|
|
48
|
+
python -m pip install --upgrade pip
|
|
49
|
+
# install build for modern packaging, and twine
|
|
50
|
+
pip install build twine
|
|
51
|
+
- name: Build and publish
|
|
52
|
+
env:
|
|
53
|
+
TWINE_USERNAME: __token__
|
|
54
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
55
|
+
run: |
|
|
56
|
+
# Use 'python -m build' for modern packaging
|
|
57
|
+
python -m build
|
|
58
|
+
twine upload dist/*
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Sync README with docs/index.md
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
paths:
|
|
6
|
+
- "docs/index.md"
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
sync:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.11"
|
|
20
|
+
- name: Update README.md
|
|
21
|
+
run: python scripts/update_readme.py
|
|
22
|
+
- name: Commit changes
|
|
23
|
+
run: |
|
|
24
|
+
git config user.name "github-actions"
|
|
25
|
+
git config user.email "github-actions@github.com"
|
|
26
|
+
git add README.md
|
|
27
|
+
git commit -m "Update README.md from docs/index.md" || echo "No changes"
|
|
28
|
+
git push
|