From e185c800d16b06a82d525d216428cac5a5e11da6 Mon Sep 17 00:00:00 2001 From: aga Date: Thu, 26 Mar 2026 11:51:07 +0100 Subject: [PATCH 1/5] Verify package build and CLI installation via wheel --- .gitignore | 4 +++- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 52bcebd..f294e5a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ .venv/ +.venv-test __pycache__/ *.pyc .DS_Store *.egg-info/ -data \ No newline at end of file +data +dist/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 13a1d96..850503f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ requires-python = ">=3.13" dependencies = ["typer>=0.24,<1.0", "pillow>=12.1,<13.0"] [dependency-groups] -dev = ["pytest>=9,<10", "ruff>=0.15,<1.0", "mypy>=1.19,<2.0"] +dev = ["pytest>=9,<10", "ruff>=0.15,<1.0", "mypy>=1.19,<2.0", "build>=1.4,<2.0"] [project.scripts] photo-tools = "photo_tools.cli:app" From 67b401c33ac252933b202af8e923a1d9120ceef7 Mon Sep 17 00:00:00 2001 From: aga Date: Thu, 26 Mar 2026 13:32:09 +0100 Subject: [PATCH 2/5] Add GitHub Actions workflow for linting, type checking and tests --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d940b49 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + pull_request: + +jobs: + checks: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v6 + with: + python-version: "3.13" + cache: "pip" + + - name: Install package and dev tools + run: | + python -m pip install --upgrade pip + pip install -e . + pip install pytest ruff mypy + + - name: Lint + run: ruff check . + + - name: Format check + run: ruff format --check . + + - name: Type check + run: mypy src + + - name: Test + run: pytest From 03fa76ebdd47e52e9a23a30ffa6cf982a647b2b7 Mon Sep 17 00:00:00 2001 From: aga Date: Thu, 26 Mar 2026 13:37:42 +0100 Subject: [PATCH 3/5] Add CI status badge to README --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 03cb5d2..4e7d162 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![CI](https://github.com/aga87/python-photo-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/aga87/python-photo-tools/actions) + + # Python Photo Tools A command-line tool for organising and processing photos using Python. From d2de2033314887294da7e8d340362b3a129f0d89 Mon Sep 17 00:00:00 2001 From: aga Date: Thu, 26 Mar 2026 14:24:04 +0100 Subject: [PATCH 4/5] Verify pipx installation and update README with recommended usage --- .gitignore | 3 ++- README.md | 27 +++++++++++++++++++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index f294e5a..8d9f191 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ __pycache__/ .DS_Store *.egg-info/ data -dist/ \ No newline at end of file +dist/ +build/ \ No newline at end of file diff --git a/README.md b/README.md index 4e7d162..4d1f3c2 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,13 @@ [![CI](https://github.com/aga87/python-photo-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/aga87/python-photo-tools/actions) - # Python Photo Tools A command-line tool for organising and processing photos using Python. -## Branches +## Supported formats -- `main` – Stable branch. Contains production-ready code and reflects the latest completed features. -- `dev` – Integration branch. Used to combine and test feature branches before merging into `main`. +- RAW: .raf +- JPG: .jpg, .jpeg ## Prerequisites - System Tools @@ -37,6 +36,22 @@ If running in a Docker container, include: RUN apt-get update && apt-get install -y exiftool ``` +## Installation + +### Using pipx (recommended) + +```shell +pipx install git+https://github.com/aga87/python-photo-tools.git +``` + +### Local development + +Clone the repository and install: + +```shell +pip install . +``` + ## Usage List available commands: @@ -117,7 +132,7 @@ photo-tools optimise photo-tools optimise --dry-run ``` -## Local Testing Setup +## Local Development Setup ### Data @@ -160,4 +175,4 @@ Other commands follow the same structure but are not yet covered. ### Makefile -Common development tasks are available via the Makefile. \ No newline at end of file +Common development tasks are available via the Makefile. From 76b7123d84be61d594c63326a1e483ae6e8630fc Mon Sep 17 00:00:00 2001 From: aga Date: Thu, 26 Mar 2026 14:29:08 +0100 Subject: [PATCH 5/5] Add missing format step to Makefile check target (and format) --- Makefile | 2 +- src/photo_tools/cli.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 2ad763c..526d46f 100644 --- a/Makefile +++ b/Makefile @@ -13,4 +13,4 @@ typecheck: test: pytest -check: lint test typecheck \ No newline at end of file +check: lint test format typecheck \ No newline at end of file diff --git a/src/photo_tools/cli.py b/src/photo_tools/cli.py index c0fde24..c94f4c5 100644 --- a/src/photo_tools/cli.py +++ b/src/photo_tools/cli.py @@ -8,9 +8,7 @@ from photo_tools.organise_by_type import organise_by_type from photo_tools.soft_delete_unpaired_raws import soft_delete_unpaired_raws -app = typer.Typer( - help="CLI tools for organising and optimising photography workflows." -) +app = typer.Typer(help="CLI tools for organising and optimising photography workflows.") @app.callback() @@ -91,7 +89,7 @@ def soft_delete_unpaired_raws_cmd( @app.command( "optimise", - help="Resize JPG images to max 2500px width and compress to ≤500KB using quality " \ + help="Resize JPG images to max 2500px width and compress to ≤500KB using quality " "70-100, saving as prefixed copies.", ) def optimise_cmd(