Photo-Composition-Designer 0.0.7__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.
- photo_composition_designer-0.0.7/.github/FUNDING.yml +12 -0
- photo_composition_designer-0.0.7/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
- photo_composition_designer-0.0.7/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- photo_composition_designer-0.0.7/.github/PULL_REQUEST_TEMPLATE.md +15 -0
- photo_composition_designer-0.0.7/.github/actions/setup-environment/action.yml +31 -0
- photo_composition_designer-0.0.7/.github/dependabot.yml +6 -0
- photo_composition_designer-0.0.7/.github/init.sh +68 -0
- photo_composition_designer-0.0.7/.github/release_message.sh +3 -0
- photo_composition_designer-0.0.7/.github/rename_project.sh +81 -0
- photo_composition_designer-0.0.7/.github/update_funding.py +46 -0
- photo_composition_designer-0.0.7/.github/workflows/build-linux.yml +48 -0
- photo_composition_designer-0.0.7/.github/workflows/build-macos.yml +48 -0
- photo_composition_designer-0.0.7/.github/workflows/build-win.yml +46 -0
- photo_composition_designer-0.0.7/.github/workflows/main.yml +83 -0
- photo_composition_designer-0.0.7/.github/workflows/release.yml +58 -0
- photo_composition_designer-0.0.7/.github/workflows/update_readme.yml +28 -0
- photo_composition_designer-0.0.7/.gitignore +204 -0
- photo_composition_designer-0.0.7/.idea/runConfigurations/config_generate.xml +25 -0
- photo_composition_designer-0.0.7/.idea/runConfigurations/module_cli.xml +25 -0
- photo_composition_designer-0.0.7/.idea/runConfigurations/module_gui.xml +25 -0
- photo_composition_designer-0.0.7/.idea/vcs.xml +6 -0
- photo_composition_designer-0.0.7/.idea/workspace.xml +737 -0
- photo_composition_designer-0.0.7/.pre-commit-config-linux.yaml +15 -0
- photo_composition_designer-0.0.7/.pre-commit-config.yaml +13 -0
- photo_composition_designer-0.0.7/.readthedocs.yaml +20 -0
- photo_composition_designer-0.0.7/HISTORY.md +104 -0
- photo_composition_designer-0.0.7/LICENSE +24 -0
- photo_composition_designer-0.0.7/Makefile +264 -0
- photo_composition_designer-0.0.7/PKG-INFO +205 -0
- photo_composition_designer-0.0.7/README.md +62 -0
- photo_composition_designer-0.0.7/anniversaries.ini +31 -0
- photo_composition_designer-0.0.7/config.yaml +75 -0
- photo_composition_designer-0.0.7/docs/.nav.yml +15 -0
- photo_composition_designer-0.0.7/docs/_static/img/favicon.png +0 -0
- photo_composition_designer-0.0.7/docs/_static/img/logo.png +0 -0
- photo_composition_designer-0.0.7/docs/css/custom.css +5 -0
- photo_composition_designer-0.0.7/docs/develop/contributing.md +163 -0
- photo_composition_designer-0.0.7/docs/develop/make_windows.md +215 -0
- photo_composition_designer-0.0.7/docs/develop/naming_convention.md +46 -0
- photo_composition_designer-0.0.7/docs/develop/pypi_release.md +233 -0
- photo_composition_designer-0.0.7/docs/funding/funding.md +55 -0
- photo_composition_designer-0.0.7/docs/getting-started/install.md +66 -0
- photo_composition_designer-0.0.7/docs/getting-started/virtual-environment.md +29 -0
- photo_composition_designer-0.0.7/docs/index.md +169 -0
- photo_composition_designer-0.0.7/docs/usage/cli.md +59 -0
- photo_composition_designer-0.0.7/docs/usage/config.md +74 -0
- photo_composition_designer-0.0.7/images/descriptions.txt +6 -0
- photo_composition_designer-0.0.7/images/title/This is a description for all photos of this calender collage page. It will be displayed in one line between the photos and the calendar items..txt +0 -0
- photo_composition_designer-0.0.7/images/title/image_02.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_1/description.txt +1 -0
- photo_composition_designer-0.0.7/images/week_1/image_01.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_2/image_04.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_2/image_13.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_3/This is a description for all photos of this calender collage page. It will be displayed in one line between the photos and the calendar items..txt +0 -0
- photo_composition_designer-0.0.7/images/week_3/image_02.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_3/image_03.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_3/image_07.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_4/image_08.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_4/image_09.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_4/image_10.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_4/image_13.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_5/Lisbon.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_5/image_05.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_5/image_06.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_5/image_07.jpg +0 -0
- photo_composition_designer-0.0.7/images/week_5/image_13.jpg +0 -0
- photo_composition_designer-0.0.7/locations_de.ini +233 -0
- photo_composition_designer-0.0.7/locations_en.ini +231 -0
- photo_composition_designer-0.0.7/mkdocs.yml +33 -0
- photo_composition_designer-0.0.7/pyproject.toml +78 -0
- photo_composition_designer-0.0.7/pytest.ini +3 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.README.html +485 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.VERSION.txt +1 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.cpg +1 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.dbf +0 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.prj +1 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.shp +0 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.shx +0 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.README.html +475 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.VERSION.txt +1 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.cpg +1 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.dbf +0 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.prj +1 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.shp +0 -0
- photo_composition_designer-0.0.7/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.shx +0 -0
- photo_composition_designer-0.0.7/scripts/generate_config_docs.py +22 -0
- photo_composition_designer-0.0.7/scripts/show_filelist.py +51 -0
- photo_composition_designer-0.0.7/scripts/show_tree.py +180 -0
- photo_composition_designer-0.0.7/scripts/update_readme.py +21 -0
- photo_composition_designer-0.0.7/setup.cfg +4 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/__main__.py +8 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/_version.py +34 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/cli/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/cli/__main__.py +8 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/cli/cli.py +106 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/common/Anniversaries.py +93 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/common/Locations.py +87 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/common/MoonPhase.py +85 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/common/Photo.py +113 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/common/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/common/logging.py +216 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/config/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/config/config.py +321 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/core/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/core/base.py +383 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/gui/GuiLogWriter.py +79 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/gui/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/gui/__main__.py +8 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/gui/gui.py +565 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/image/CalendarRenderer.py +319 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/image/CollageRenderer.py +433 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/image/DescriptionRenderer.py +74 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/image/MapRenderer.py +101 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/image/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/tools/DescriptionsFileGenerator.py +44 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/tools/GeoPlotter.py +211 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/tools/Helpers.py +18 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/tools/ImageDistributor.py +153 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer/tools/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer.egg-info/PKG-INFO +205 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer.egg-info/SOURCES.txt +145 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer.egg-info/dependency_links.txt +1 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer.egg-info/entry_points.txt +3 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer.egg-info/requires.txt +28 -0
- photo_composition_designer-0.0.7/src/Photo_Composition_Designer.egg-info/top_level.txt +5 -0
- photo_composition_designer-0.0.7/src/__init__.py +0 -0
- photo_composition_designer-0.0.7/src/firewall_handler.py +198 -0
- photo_composition_designer-0.0.7/src/main.py +146 -0
- photo_composition_designer-0.0.7/src/path_handler.py +10 -0
- photo_composition_designer-0.0.7/template.yml.url +6 -0
- photo_composition_designer-0.0.7/tests/TestHelper.py +14 -0
- photo_composition_designer-0.0.7/tests/__init__.py +0 -0
- photo_composition_designer-0.0.7/tests/test_CalendarRenderer.py +43 -0
- photo_composition_designer-0.0.7/tests/test_CollageRenderer.py +122 -0
- photo_composition_designer-0.0.7/tests/test_CompositionDesigner.py +33 -0
- photo_composition_designer-0.0.7/tests/test_DescriptionRenderer.py +43 -0
- photo_composition_designer-0.0.7/tests/test_DescriptionsFileGenerator.py +48 -0
- photo_composition_designer-0.0.7/tests/test_GeoPlotter.py +62 -0
- photo_composition_designer-0.0.7/tests/test_ImageDistributor.py +132 -0
- photo_composition_designer-0.0.7/tests/test_Locations.py +42 -0
- photo_composition_designer-0.0.7/tests/test_MapRenderer.py +53 -0
- photo_composition_designer-0.0.7/tests/test_MoonPhase.py +121 -0
- photo_composition_designer-0.0.7/tests/test_Photo.py +71 -0
- photo_composition_designer-0.0.7/tests/test_anniversaries.py +55 -0
- photo_composition_designer-0.0.7/tests/test_cli.py +49 -0
- photo_composition_designer-0.0.7/uv.lock +1432 -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,81 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# Hilfsfunktion für Fehlermeldungen und Beenden
|
|
4
|
+
function die { echo "$*" >&2; exit 1; }
|
|
5
|
+
|
|
6
|
+
# parse args
|
|
7
|
+
while getopts a:p:n:d: flag
|
|
8
|
+
do
|
|
9
|
+
case "${flag}" in
|
|
10
|
+
a) author=${OPTARG};;
|
|
11
|
+
p) package_name=${OPTARG};; # The new internal Python package name (snake_case)
|
|
12
|
+
n) project_name=${OPTARG};; # The new external project name (kebab-case)
|
|
13
|
+
d) description=${OPTARG};;
|
|
14
|
+
*) die "Unknown Flag: $flag";;
|
|
15
|
+
esac
|
|
16
|
+
done
|
|
17
|
+
|
|
18
|
+
# Check whether all required arguments have been passed
|
|
19
|
+
[[ -z "$author" ]] && die "Missing Argument: -a (author)"
|
|
20
|
+
[[ -z "$package_name" ]] && die "Missing Argument: -p (package_name)"
|
|
21
|
+
[[ -z "$project_name" ]] && die "Missing Argument: -n (project_name)"
|
|
22
|
+
[[ -z "$description" ]] && die "Missing Argument: -d (description)"
|
|
23
|
+
|
|
24
|
+
echo "Author: $author";
|
|
25
|
+
echo "New Python Package Name (internal): $package_name";
|
|
26
|
+
echo "New Project Name (external/PyPI): $project_name";
|
|
27
|
+
echo "Description: $description";
|
|
28
|
+
|
|
29
|
+
echo "Renaming project content..."
|
|
30
|
+
|
|
31
|
+
# Old identifiers
|
|
32
|
+
original_author="pamagister"
|
|
33
|
+
original_project_name="python-template-project"
|
|
34
|
+
original_package_name="python_template_project"
|
|
35
|
+
original_description="Feature-rich Python project template designed for robustness and ease of use."
|
|
36
|
+
|
|
37
|
+
# Customize all file contents first
|
|
38
|
+
# Use 'git ls-files' to edit only versioned files
|
|
39
|
+
# Note the order: Replace more specific with more specific first,
|
|
40
|
+
# then more general ones.
|
|
41
|
+
# Important: Escape special characters in the variables if they could occur in the replacements.
|
|
42
|
+
# Here the variables are relatively safe as they only contain alphanumeric characters and hyphens/underscores.
|
|
43
|
+
|
|
44
|
+
for filename in $(git ls-files)
|
|
45
|
+
do
|
|
46
|
+
# Skip files in the .github/ directory
|
|
47
|
+
if [[ "$filename" == ".github"* ]]; then
|
|
48
|
+
echo "Skipping .github file: $filename"
|
|
49
|
+
continue
|
|
50
|
+
fi
|
|
51
|
+
# Replace the old internal package name with the new internal package name
|
|
52
|
+
sed -i "s/$original_package_name/$package_name/g" "$filename"
|
|
53
|
+
# Replace the old external project name with the new external project name
|
|
54
|
+
sed -i "s/$original_project_name/$project_name/g" "$filename"
|
|
55
|
+
# Replace the old author
|
|
56
|
+
sed -i "s/$original_author/$author/g" "$filename"
|
|
57
|
+
# Replace the old description with the new one
|
|
58
|
+
sed -i "s/$original_description/$description/g" "$filename"
|
|
59
|
+
echo "Processed: $filename"
|
|
60
|
+
done
|
|
61
|
+
|
|
62
|
+
# Then rename the directory
|
|
63
|
+
# Check if the directory exists before renaming it
|
|
64
|
+
OLD_PACKAGE_DIR="src/$original_package_name"
|
|
65
|
+
NEW_PACKAGE_DIR="src/$package_name"
|
|
66
|
+
|
|
67
|
+
if [ -d "$OLD_PACKAGE_DIR" ]; then
|
|
68
|
+
echo "Renaming directory: $OLD_PACKAGE_DIR to $NEW_PACKAGE_DIR"
|
|
69
|
+
mv "$OLD_PACKAGE_DIR" "$NEW_PACKAGE_DIR"
|
|
70
|
+
else
|
|
71
|
+
echo "Warning: Directory $OLD_PACKAGE_DIR not found. Skipping directory rename."
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
# Remove the template.yml to indicate that the template has been applied
|
|
75
|
+
echo "Removing .github/template.yml"
|
|
76
|
+
rm -f .github/template.yml
|
|
77
|
+
# Remove rename_project.yml to prevent re-running the renaming script
|
|
78
|
+
echo "Removing .github/workflows/rename_project.yml"
|
|
79
|
+
rm -f .github/workflows/rename_project.yml
|
|
80
|
+
|
|
81
|
+
echo "Project renaming complete!"
|
|
@@ -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 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 }}
|
|
@@ -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
|