Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 1.78 KB

README_DEV.md

File metadata and controls

56 lines (35 loc) · 1.78 KB

Developer Notes for PhotoScript

These notes are so that I can remember how to build and test PhotoScript.

Setup the environment

  • Change to the project directory
  • Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
  • Create the virtual environment: uv venv or uv venv --python 3.13 to specify a specific version
  • Activate the virtual environment: source .venv/bin/activate
  • Install package dependencies: uv pip install -r pyproject.toml --extra dev

Testing

Tests are written with pytest. You must use the -s flag when running tests to see the interactive prompts requireed for running the tests. To test, run pytest -vv -s.

The test suite will copy a test Photos library to your ~/Pictures directory. You may be prompted in Photos to allow it to switch libraries. Once the test suite is complete, you will need to manually switch back to your original library. To do this, close Photos, then hold down the option key while clicking on the Photos icon in the dock. You will be prompted to select a library; select your original library.

Docs

Build docs with mkdocs build then deploy to GitHub pages with mkdocs gh-deploy

Building

To build the project:

  • rm -rf dist; rm -rf build
  • uv build

Versioning

Use bump2version:

  • bump2version patch --verbose [--dry-run]
  • bump2version minor --verbose [--dry-run]
  • bump2version major --verbose [--dry-run]

Change Log

The CHANGELOG.md is created with auto-changelog:

  • git pull
  • auto-changelog --ignore-commit-pattern CHANGELOG -l 5
  • git add CHANGELOG.md; git commit -m"Updated CHANGELOG.md [skip ci]"; git push

Publishing

To publish to PyPI:

  • uv publish