Photo-Composition-Designer 1.0.0__tar.gz → 1.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.
- photo_composition_designer-1.0.2/AGENTS.md +94 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/HISTORY.md +77 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/LICENSE +29 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/Makefile +2 -2
- {photo_composition_designer-1.0.0/src/Photo_Composition_Designer.egg-info → photo_composition_designer-1.0.2}/PKG-INFO +10 -3
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/README.md +4 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/config.yaml +17 -1
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/index.md +4 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/usage/config.md +21 -13
- photo_composition_designer-1.0.2/images/descriptions.txt +9 -0
- photo_composition_designer-1.0.2/images/week_4/image_13.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_6_testimages_3/bundschatten-sheep-7039994_1920.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_6_testimages_3/falkenpost-cars-1638594_1920.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_6_testimages_3/valdemarvan2003-vietnam-8121062_1920.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_7_testimages_4/fietzfotos-london-2928889_1920.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_7_testimages_4/piper60-spanish-84795_1920.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_7_testimages_4/sippakorn-cows-4708901_1920.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_7_testimages_4/tuananhngo-street-vendor-4176310_1920.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_8_testimages_5/landscape_one_bicycle_left.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_8_testimages_5/landscape_two_persons_right.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_8_testimages_5/portrait_one_person_top.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_8_testimages_5/portrait_two_cars_bottom.jpg +0 -0
- photo_composition_designer-1.0.2/images/week_8_testimages_5/portrait_two_persons_bottom.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/pyproject.toml +5 -2
- photo_composition_designer-1.0.2/res/yolo/yolo26n.onnx +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/scripts/generate_config_docs.py +1 -1
- photo_composition_designer-1.0.2/scripts/project_structure.py +457 -0
- photo_composition_designer-1.0.2/src/Photo_Composition_Designer/_version.py +24 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/common/Anniversaries.py +6 -6
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/common/Photo.py +38 -19
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/config/config.py +20 -16
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/core/base.py +27 -5
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/gui/GuiLogWriter.py +9 -3
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/gui/gui.py +104 -38
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/image/CalendarRenderer.py +4 -1
- photo_composition_designer-1.0.2/src/Photo_Composition_Designer/image/CollageRenderer.py +734 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/image/DescriptionRenderer.py +12 -10
- photo_composition_designer-1.0.2/src/Photo_Composition_Designer/image/ObjectDetector.py +257 -0
- photo_composition_designer-1.0.2/src/Photo_Composition_Designer/image/SmartCrop.py +442 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/tools/ImageDistributor.py +2 -1
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2/src/Photo_Composition_Designer.egg-info}/PKG-INFO +10 -3
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer.egg-info/SOURCES.txt +21 -2
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer.egg-info/requires.txt +4 -1
- photo_composition_designer-1.0.2/src/Photo_Composition_Designer.egg-info/scm_file_list.json +157 -0
- photo_composition_designer-1.0.2/src/Photo_Composition_Designer.egg-info/scm_version.json +8 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/firewall_handler.py +4 -1
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_CollageRenderer.py +44 -44
- photo_composition_designer-1.0.2/tests/test_ObjectDetector.py +100 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_Photo.py +10 -1
- photo_composition_designer-1.0.2/tests/test_SmartCrop.py +88 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_cli.py +2 -2
- photo_composition_designer-1.0.2/uv.lock +2055 -0
- photo_composition_designer-1.0.0/.idea/workspace.xml +0 -802
- photo_composition_designer-1.0.0/images/descriptions.txt +0 -6
- photo_composition_designer-1.0.0/images/week_5/image_13.jpg +0 -0
- photo_composition_designer-1.0.0/scripts/show_tree.py +0 -180
- photo_composition_designer-1.0.0/src/Photo_Composition_Designer/_version.py +0 -34
- photo_composition_designer-1.0.0/src/Photo_Composition_Designer/image/CollageRenderer.py +0 -433
- photo_composition_designer-1.0.0/uv.lock +0 -1481
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/FUNDING.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/actions/setup-environment/action.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/dependabot.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/init.sh +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/release_message.sh +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/rename_project.sh +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/update_funding.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/workflows/build-linux.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/workflows/build-macos.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/workflows/build-win.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/workflows/main.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/workflows/release.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.github/workflows/update_readme.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.gitignore +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.idea/runConfigurations/config_generate.xml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.idea/runConfigurations/module_cli.xml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.idea/runConfigurations/module_gui.xml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.idea/vcs.xml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.pre-commit-config-linux.yaml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.pre-commit-config.yaml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/.readthedocs.yaml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/anniversaries.ini +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/.nav.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/_static/img/collages.png +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/_static/img/favicon.png +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/_static/img/gui_main.png +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/_static/img/gui_settings.png +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/_static/img/logo.png +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/css/custom.css +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/funding/funding.md +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/getting-started/install.md +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/getting-started/virtual-environment.md +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/docs/usage/cli.md +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/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-1.0.0 → photo_composition_designer-1.0.2}/images/title/image_02.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_1/description.txt +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_1/image_01.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_2/image_04.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_2/image_13.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/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-1.0.0 → photo_composition_designer-1.0.2}/images/week_3/image_02.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_3/image_03.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_3/image_07.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_4/image_08.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_4/image_09.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_4/image_10.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_5/Lisbon.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_5/image_05.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_5/image_06.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/images/week_5/image_07.jpg +0 -0
- {photo_composition_designer-1.0.0/images/week_4 → photo_composition_designer-1.0.2/images/week_5}/image_13.jpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/locations_de.ini +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/locations_en.ini +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/mkdocs.yml +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/pytest.ini +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.README.html +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.VERSION.txt +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.cpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.dbf +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.prj +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.shp +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_admin_0_countries/ne_50m_admin_0_countries.shx +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.README.html +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.VERSION.txt +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.cpg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.dbf +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.prj +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.shp +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/res/maps/ne_50m_rivers_lake_centerlines_scale_rank/ne_50m_rivers_lake_centerlines_scale_rank.shx +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/scripts/show_filelist.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/scripts/update_readme.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/setup.cfg +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/__main__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/cli/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/cli/__main__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/cli/cli.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/common/Locations.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/common/MoonPhase.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/common/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/config/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/core/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/gui/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/gui/__main__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/image/MapRenderer.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/image/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/tools/DescriptionsFileGenerator.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/tools/GeoPlotter.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/tools/Helpers.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer/tools/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer.egg-info/dependency_links.txt +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer.egg-info/entry_points.txt +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/Photo_Composition_Designer.egg-info/top_level.txt +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/main.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/src/path_handler.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/template.yml.url +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/TestHelper.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/__init__.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_CalendarRenderer.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_CompositionDesigner.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_DescriptionRenderer.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_DescriptionsFileGenerator.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_GeoPlotter.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_ImageDistributor.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_Locations.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_MapRenderer.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_MoonPhase.py +0 -0
- {photo_composition_designer-1.0.0 → photo_composition_designer-1.0.2}/tests/test_anniversaries.py +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Agent Guidelines for Python Code Quality
|
|
2
|
+
|
|
3
|
+
This document provides guidelines for maintaining high-quality Python code. These rules MUST be followed by all AI coding agents and contributors.
|
|
4
|
+
|
|
5
|
+
## Your Core Principles
|
|
6
|
+
|
|
7
|
+
All code you write MUST be fully optimized.
|
|
8
|
+
|
|
9
|
+
"Fully optimized" includes:
|
|
10
|
+
|
|
11
|
+
- maximizing algorithmic big-O efficiency for memory and runtime
|
|
12
|
+
- using parallelization and vectorization where appropriate
|
|
13
|
+
- following proper style conventions for the code language (e.g. maximizing code reuse (DRY))
|
|
14
|
+
|
|
15
|
+
## Preferred Tools
|
|
16
|
+
|
|
17
|
+
- Use `uv` for Python package management and to create a `.venv` if it is not present.
|
|
18
|
+
|
|
19
|
+
## Code Style and Formatting
|
|
20
|
+
|
|
21
|
+
- **MUST** use meaningful, descriptive variable and function names
|
|
22
|
+
- **MUST** follow PEP 8 style guidelines
|
|
23
|
+
- **MUST** use 4 spaces for indentation (never tabs)
|
|
24
|
+
- **NEVER** use emoji, or unicode that emulates emoji (e.g. ✓, ✗). The only exception is when writing tests and testing the impact of multibyte characters.
|
|
25
|
+
- Use snake_case for functions/variables, PascalCase for classes, UPPER_CASE for constants
|
|
26
|
+
- Limit line length to 100 characters (ruff formatter standard)
|
|
27
|
+
- **MUST** avoid including redundant comments which are tautological or self-demonstating (e.g. cases where it is easily parsable what the code does at a glance so the comment does)
|
|
28
|
+
- **MUST** avoid including comments which leak what this file contains, or leak the original user prompt, ESPECIALLY if it's irrelevant to the output code.
|
|
29
|
+
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
- **MUST** include docstrings for all public functions, classes, and methods
|
|
33
|
+
- **MUST** document function parameters, return values, and exceptions raised
|
|
34
|
+
- Keep comments up-to-date with code changes
|
|
35
|
+
|
|
36
|
+
## Type Hints
|
|
37
|
+
|
|
38
|
+
- **MUST** use type hints for all function signatures (parameters and return values)
|
|
39
|
+
- **NEVER** use `Any` type unless absolutely necessary
|
|
40
|
+
- **MUST** run mypy and resolve all type errors
|
|
41
|
+
- Use `Optional[T]` or `T | None` for nullable types
|
|
42
|
+
|
|
43
|
+
## Error Handling
|
|
44
|
+
|
|
45
|
+
- **NEVER** silently swallow exceptions without logging
|
|
46
|
+
- **MUST** never use bare `except:` clauses
|
|
47
|
+
- **MUST** catch specific exceptions rather than broad exception types
|
|
48
|
+
- **MUST** use context managers (`with` statements) for resource cleanup
|
|
49
|
+
- Provide meaningful error messages
|
|
50
|
+
|
|
51
|
+
## Function Design
|
|
52
|
+
|
|
53
|
+
- **MUST** keep functions focused on a single responsibility
|
|
54
|
+
- **NEVER** use mutable objects (lists, dicts) as default argument values
|
|
55
|
+
- Limit function parameters to 5 or fewer
|
|
56
|
+
- Return early to reduce nesting
|
|
57
|
+
|
|
58
|
+
## Class Design
|
|
59
|
+
|
|
60
|
+
- **MUST** keep classes focused on a single responsibility
|
|
61
|
+
- **MUST** keep `__init__` simple; avoid complex logic
|
|
62
|
+
- Use dataclasses for simple data containers
|
|
63
|
+
- Prefer composition over inheritance
|
|
64
|
+
|
|
65
|
+
## Testing
|
|
66
|
+
|
|
67
|
+
- **MUST** write unit tests for all new functions and classes
|
|
68
|
+
- **MUST** mock external dependencies (APIs, databases, file systems)
|
|
69
|
+
- **MUST** use pytest as the testing framework
|
|
70
|
+
|
|
71
|
+
## Imports and Dependencies
|
|
72
|
+
|
|
73
|
+
- **MUST** avoid wildcard imports (`from module import *`)
|
|
74
|
+
- **MUST** document dependencies in `pyproject.toml`
|
|
75
|
+
- Use `uv` for fast package management and dependency resolution
|
|
76
|
+
|
|
77
|
+
## Python Best Practices
|
|
78
|
+
|
|
79
|
+
- **NEVER** use mutable default arguments
|
|
80
|
+
- **MUST** use context managers (`with` statement) for file/resource management
|
|
81
|
+
- **MUST** use `is` for comparing with `None`, `True`, `False`
|
|
82
|
+
- **MUST** use f-strings for string formatting
|
|
83
|
+
- Use list comprehensions and generator expressions
|
|
84
|
+
- Use `enumerate()` instead of manual counter variables
|
|
85
|
+
|
|
86
|
+
## Before Committing
|
|
87
|
+
|
|
88
|
+
- [ ] Code formatter pass: >> make format
|
|
89
|
+
- [ ] Linter pass: >> make lint
|
|
90
|
+
- [ ] All tests pass: >> make test
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
**Remember:** Prioritize clarity and maintainability over cleverness. This is your core directive.
|
|
@@ -4,6 +4,83 @@ Changelog
|
|
|
4
4
|
|
|
5
5
|
(unreleased)
|
|
6
6
|
------------
|
|
7
|
+
- Improve layouting: distribute 2x2 images more equally. Use image
|
|
8
|
+
importance weight where useful. Consider object area when calculating
|
|
9
|
+
importance. Clear cache at session start. [Paul Magister]
|
|
10
|
+
- No more workspace.xml in vcs. [Paul Magister]
|
|
11
|
+
- Calculate image weights better. [Paul Magister]
|
|
12
|
+
- Calculate image weights better. [Paul Magister]
|
|
13
|
+
- Improve reactivity: add file cache to store image recognition data.
|
|
14
|
+
[Paul Magister]
|
|
15
|
+
- Improve reactivity: render preview only as large as needed. [Paul
|
|
16
|
+
Magister]
|
|
17
|
+
- Update config-cli-gui: improved gui handling, reload last config.yaml,
|
|
18
|
+
move AppConfig into general base class. [Paul Magister]
|
|
19
|
+
- Use ttkbootstrap for modern gui design. [Paul Magister]
|
|
20
|
+
- CollageRenderer.py: imageScoreFactor: Factor how much the objects
|
|
21
|
+
(humans, animals, ...) in the image are considered for weighting the
|
|
22
|
+
image size. [Paul Magister]
|
|
23
|
+
- CollageRenderer.py: add rounded corner functionality: add parameter.
|
|
24
|
+
[Paul Magister]
|
|
25
|
+
- CollageRenderer.py: add rounded corner functionality. [Paul Magister]
|
|
26
|
+
- CollageRenderer.py: improve tests, more variants, shorter P and L for
|
|
27
|
+
portrait and landscape. Overweight portraits in one row so that they
|
|
28
|
+
get more space. [Paul Magister]
|
|
29
|
+
- Adjust weight in SmartCrop. [Paul Magister]
|
|
30
|
+
- Code formatting and import optimization. [Paul Magister]
|
|
31
|
+
- Algorithm finally working. [Paul Magister]
|
|
32
|
+
- Draft: spezielle Behandlung für 3: fast perfekt: fix gap bug. [Paul
|
|
33
|
+
Magister]
|
|
34
|
+
- Draft: spezielle Behandlung für 3: fast perfekt. [Paul Magister]
|
|
35
|
+
- Draft: spezielle Behandlung für 3. [Paul Magister]
|
|
36
|
+
- Draft: neues arrangement mit fitting algo: schon viel besser, aber bei
|
|
37
|
+
3 Bildern geht es nicht. [Paul Magister]
|
|
38
|
+
- Draft: neues arrangement mit fitting algo: schon viel besser, aber bei
|
|
39
|
+
3 Bildern geht es nicht. [Paul Magister]
|
|
40
|
+
- Draft: neues arrangement mit fitting algo. [Paul Magister]
|
|
41
|
+
- Make pytree: improvements on show_tree.py: doc external tool. [Paul
|
|
42
|
+
Magister]
|
|
43
|
+
- Improve cropping boxes and test visualization. [Paul Magister]
|
|
44
|
+
- CollageRenderer.py: rename private methods. [Paul Magister]
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
1.0.1 (2026-06-14)
|
|
48
|
+
------------------
|
|
49
|
+
- Docs: Update HISTORY.md for release 1.0.1. [Paul Magister]
|
|
50
|
+
- Object recognition: improve cropping: prevent crash on None. [Paul
|
|
51
|
+
Magister]
|
|
52
|
+
- Object recognition: improve cropping. [Paul Magister]
|
|
53
|
+
- Object recognition: add tests, add improved cropping and object
|
|
54
|
+
prioritization, add test images. [Paul Magister]
|
|
55
|
+
- Object recognition: add tests, add improved cropping and object
|
|
56
|
+
prioritization, add test images. [Paul Magister]
|
|
57
|
+
- Object recognition: improve module structure, add SmartCrop test.
|
|
58
|
+
[Paul Magister]
|
|
59
|
+
- Object recognition: improve module structure. [Paul Magister]
|
|
60
|
+
- Image recognition: add parameter whether to use object recognition.
|
|
61
|
+
[Paul Magister]
|
|
62
|
+
- Image recognition: add example images for improved testing. [Paul
|
|
63
|
+
Magister]
|
|
64
|
+
- Image recognition: use onnx file and onnxruntime instead of
|
|
65
|
+
ultralytics and pytorch. [Paul Magister]
|
|
66
|
+
- Image recognition: detect not only persons, but different objects.
|
|
67
|
+
[Paul Magister]
|
|
68
|
+
- Collage designer: using YOLO for object recognition. [Paul Magister]
|
|
69
|
+
- Make pytree: consider doc strings. [Paul Magister]
|
|
70
|
+
- Make pytree: improvements on show_tree.py: rename to
|
|
71
|
+
project_structure.py. [Paul Magister]
|
|
72
|
+
- Make pytree: improvements on show_tree.py: doc external tool. [Paul
|
|
73
|
+
Magister]
|
|
74
|
+
- Make pytree: improvements on show_tree.py: bild compact llm
|
|
75
|
+
understandable json, consider functions. [Paul Magister]
|
|
76
|
+
- Make pytree: improvements on show_tree.py: - class attributes,
|
|
77
|
+
instance attributes. [Paul Magister]
|
|
78
|
+
- Pipx in doc, support python until <4.0. [Paul Magister]
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
1.0.0 (2025-12-04)
|
|
82
|
+
------------------
|
|
83
|
+
- Docs: Update HISTORY.md for release 1.0.0. [Paul Magister]
|
|
7
84
|
- Upgrade libs. [Paul Magister]
|
|
8
85
|
- Fix doc: start app from pypi. [Paul Magister]
|
|
9
86
|
|
|
@@ -22,3 +22,32 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
22
22
|
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
23
|
|
|
24
24
|
For more information, please refer to <https://unlicense.org>
|
|
25
|
+
|
|
26
|
+
----------
|
|
27
|
+
|
|
28
|
+
CollageRenderer.py:
|
|
29
|
+
Parts of the Collage Algorithm is adapted from
|
|
30
|
+
PyPhotoCollage/PhotoCollage.py
|
|
31
|
+
Thanks to Tim Wilson
|
|
32
|
+
|
|
33
|
+
MIT License
|
|
34
|
+
|
|
35
|
+
Copyright (c) 2020 Tim Wilson
|
|
36
|
+
|
|
37
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
38
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
39
|
+
in the Software without restriction, including without limitation the rights
|
|
40
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
41
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
42
|
+
furnished to do so, subject to the following conditions:
|
|
43
|
+
|
|
44
|
+
The above copyright notice and this permission notice shall be included in all
|
|
45
|
+
copies or substantial portions of the Software.
|
|
46
|
+
|
|
47
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
48
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
49
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
50
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
51
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
52
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
53
|
+
SOFTWARE.
|
|
@@ -257,11 +257,11 @@ list: ## Show project file list (excluding ignored folders)
|
|
|
257
257
|
|
|
258
258
|
.PHONY: tree
|
|
259
259
|
tree: ## Show project tree (excluding ignored folders)
|
|
260
|
-
@uv run ./scripts/
|
|
260
|
+
@uv run ./scripts/project_structure.py
|
|
261
261
|
|
|
262
262
|
.PHONY: pytree
|
|
263
263
|
pytree: ## Show project tree (excluding ignored folders)
|
|
264
|
-
@uv run ./scripts/
|
|
264
|
+
@uv run ./scripts/project_structure.py --json --md --llm --doc-string
|
|
265
265
|
|
|
266
266
|
.PHONY: init
|
|
267
267
|
init: ## Initialize the project based on an application template.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: Photo-Composition-Designer
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Feature-rich Python project template for Photo-Composition-Designer.
|
|
5
5
|
Author: pamagister
|
|
6
|
-
Requires-Python: <
|
|
6
|
+
Requires-Python: <4.0,>=3.11
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Requires-Dist: astral>=3.2
|
|
10
|
-
Requires-Dist: config-cli-gui>=0.3.
|
|
10
|
+
Requires-Dist: config-cli-gui>=0.3.5
|
|
11
|
+
Requires-Dist: ttkbootstrap>=1.20.3
|
|
11
12
|
Requires-Dist: exifread>=3.5.1
|
|
12
13
|
Requires-Dist: geopandas>=1.1.1
|
|
13
14
|
Requires-Dist: holidays>=0.84
|
|
@@ -15,6 +16,8 @@ Requires-Dist: matplotlib>=3.10.7
|
|
|
15
16
|
Requires-Dist: pillow>=12.0.0
|
|
16
17
|
Requires-Dist: pytz>=2025.2
|
|
17
18
|
Requires-Dist: shapely>=2.1.1
|
|
19
|
+
Requires-Dist: onnxruntime>=1.26.0
|
|
20
|
+
Requires-Dist: numpy>=2.4.6
|
|
18
21
|
Provides-Extra: dev
|
|
19
22
|
Requires-Dist: pytest>=8.4.0; extra == "dev"
|
|
20
23
|
Requires-Dist: pytest-mock>=3.14.1; extra == "dev"
|
|
@@ -81,6 +84,10 @@ Download from [PyPI](https://pypi.org/).
|
|
|
81
84
|
```bash
|
|
82
85
|
pip install Photo-Composition-Designer
|
|
83
86
|
```
|
|
87
|
+
or
|
|
88
|
+
```bash
|
|
89
|
+
pipx install Photo-Composition-Designer
|
|
90
|
+
```
|
|
84
91
|
|
|
85
92
|
Run GUI from command line
|
|
86
93
|
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
app:
|
|
2
|
+
# Date format to use | type=str
|
|
3
|
+
date_format: '%Y-%m-%d'
|
|
2
4
|
# Logging level for the application | type=str | choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
|
|
3
5
|
log_level: INFO
|
|
6
|
+
# Maximum log file size in MB before rotation | type=int
|
|
7
|
+
log_file_max_size: 2
|
|
8
|
+
# Enable logging to file | type=bool | choices=[True, False]
|
|
9
|
+
enable_file_logging: true
|
|
10
|
+
# Enable logging to console | type=bool | choices=[True, False]
|
|
11
|
+
enable_console_logging: true
|
|
12
|
+
# GUI theme setting supported by ttkbootstrap | type=str | choices=['cosmo', 'flatly', 'litera', 'minty', 'lumen', 'sandstone', 'yeti', 'pulse', 'united', 'darkly', 'superhero', 'solar', 'cyborg', 'vapor', 'simplex']
|
|
13
|
+
theme: darkly
|
|
4
14
|
general:
|
|
5
15
|
# Path to the directory containing photos (absolute, or relative to this config.ini file) | type=PosixPath | [CLI]
|
|
6
16
|
photoDirectory: images
|
|
@@ -61,6 +71,10 @@ layout:
|
|
|
61
71
|
marginSides: 3
|
|
62
72
|
# Spacing between elements in mm | type=int
|
|
63
73
|
spacing: 2
|
|
74
|
+
# Use rounded corners at the edges of the images in the collage | type=bool | choices=[True, False]
|
|
75
|
+
useRoundedCorners: true
|
|
76
|
+
# Factor how much the objects (humans, animals, ...) in the image are considered for weighting the image size | type=float
|
|
77
|
+
imageScoreFactor: 2.0
|
|
64
78
|
# Use short weekday names (e.g., Mon, Tue) | type=bool | choices=[True, False]
|
|
65
79
|
useShortDayNames: false
|
|
66
80
|
# Use short month names (e.g., Jan, Feb) | type=bool | choices=[True, False]
|
|
@@ -68,4 +82,6 @@ layout:
|
|
|
68
82
|
# Include photo descriptions in the collage | type=bool | choices=[True, False]
|
|
69
83
|
usePhotoDescription: true
|
|
70
84
|
# Combine all generated collages into one pdf | type=bool | choices=[True, False]
|
|
71
|
-
generatePdf: true
|
|
85
|
+
generatePdf: true
|
|
86
|
+
# Use neuronal network YOLO (You Only Look Once) object detection model to crop images content-aware. | type=bool | choices=[True, False]
|
|
87
|
+
objectRecognition: true
|
|
@@ -5,9 +5,14 @@ The parameters in the cli category can be accessed via the command line interfac
|
|
|
5
5
|
|
|
6
6
|
## Category "app"
|
|
7
7
|
|
|
8
|
-
| Name
|
|
9
|
-
|
|
10
|
-
|
|
|
8
|
+
| Name | Type | Description | Default | Choices |
|
|
9
|
+
|------------------------|------|---------------------------------------------|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
10
|
+
| date_format | str | Date format to use | '%Y-%m-%d' | - |
|
|
11
|
+
| log_level | str | Logging level for the application | 'INFO' | ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] |
|
|
12
|
+
| log_file_max_size | int | Maximum log file size in MB before rotation | 2 | - |
|
|
13
|
+
| enable_file_logging | bool | Enable logging to file | True | [True, False] |
|
|
14
|
+
| enable_console_logging | bool | Enable logging to console | True | [True, False] |
|
|
15
|
+
| theme | str | GUI theme setting supported by ttkbootstrap | 'darkly' | ['cosmo', 'flatly', 'litera', 'minty', 'lumen', 'sandstone', 'yeti', 'pulse', 'united', 'darkly', 'superhero', 'solar', 'cyborg', 'vapor', 'simplex'] |
|
|
11
16
|
|
|
12
17
|
## Category "general"
|
|
13
18
|
|
|
@@ -59,14 +64,17 @@ The parameters in the cli category can be accessed via the command line interfac
|
|
|
59
64
|
|
|
60
65
|
## Category "layout"
|
|
61
66
|
|
|
62
|
-
| Name | Type
|
|
63
|
-
|
|
64
|
-
| marginTop | int
|
|
65
|
-
| marginBottom | int
|
|
66
|
-
| marginSides | int
|
|
67
|
-
| spacing | int
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
67
|
+
| Name | Type | Description | Default | Choices |
|
|
68
|
+
|---------------------|-------|-------------------------------------------------------------------------------------------------------------|---------|---------------|
|
|
69
|
+
| marginTop | int | Top margin in mm | 6 | - |
|
|
70
|
+
| marginBottom | int | Bottom margin in mm | 3 | - |
|
|
71
|
+
| marginSides | int | Side margins in mm | 3 | - |
|
|
72
|
+
| spacing | int | Spacing between elements in mm | 2 | - |
|
|
73
|
+
| useRoundedCorners | bool | Use rounded corners at the edges of the images in the collage | True | [True, False] |
|
|
74
|
+
| imageScoreFactor | float | Factor how much the objects (humans, animals, ...) in the image are considered for weighting the image size | 2.0 | - |
|
|
75
|
+
| useShortDayNames | bool | Use short weekday names (e.g., Mon, Tue) | False | [True, False] |
|
|
76
|
+
| useShortMonthNames | bool | Use short month names (e.g., Jan, Feb) | True | [True, False] |
|
|
77
|
+
| usePhotoDescription | bool | Include photo descriptions in the collage | True | [True, False] |
|
|
78
|
+
| generatePdf | bool | Combine all generated collages into one pdf | True | [True, False] |
|
|
79
|
+
| objectRecognition | bool | Use neuronal network YOLO (You Only Look Once) object detection model to crop images content-aware. | True | [True, False] |
|
|
72
80
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
title: Description text for week title
|
|
2
|
+
week_1: Description text for week week_1
|
|
3
|
+
week_2: Description text for week week_2
|
|
4
|
+
week_3: Description text for week week_3
|
|
5
|
+
week_4: Description text for week week_4
|
|
6
|
+
week_5: Description text for week week_5
|
|
7
|
+
week_6_testimages_3: Description text for week week_6_testimages_3
|
|
8
|
+
week_7_testimages_4: Description text for week week_7_testimages_4
|
|
9
|
+
week_8_testimages_5: Description text for week week_8_testimages_5
|
|
Binary file
|
photo_composition_designer-1.0.2/images/week_6_testimages_3/bundschatten-sheep-7039994_1920.jpg
ADDED
|
Binary file
|
|
Binary file
|
photo_composition_designer-1.0.2/images/week_6_testimages_3/valdemarvan2003-vietnam-8121062_1920.jpg
ADDED
|
Binary file
|
photo_composition_designer-1.0.2/images/week_7_testimages_4/fietzfotos-london-2928889_1920.jpg
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -6,10 +6,11 @@ authors = [
|
|
|
6
6
|
{name = "pamagister"}
|
|
7
7
|
]
|
|
8
8
|
readme = "docs/index.md"
|
|
9
|
-
requires-python = ">=3.
|
|
9
|
+
requires-python = ">=3.11,<4.0"
|
|
10
10
|
dependencies = [
|
|
11
11
|
"astral>=3.2",
|
|
12
|
-
"config-cli-gui>=0.3.
|
|
12
|
+
"config-cli-gui>=0.3.5",
|
|
13
|
+
"ttkbootstrap>=1.20.3",
|
|
13
14
|
"exifread>=3.5.1",
|
|
14
15
|
"geopandas>=1.1.1",
|
|
15
16
|
"holidays>=0.84",
|
|
@@ -17,6 +18,8 @@ dependencies = [
|
|
|
17
18
|
"pillow>=12.0.0",
|
|
18
19
|
"pytz>=2025.2",
|
|
19
20
|
"shapely>=2.1.1",
|
|
21
|
+
"onnxruntime>=1.26.0",
|
|
22
|
+
"numpy>=2.4.6"
|
|
20
23
|
]
|
|
21
24
|
|
|
22
25
|
# Dev dependencies as optional dependencies
|
|
Binary file
|