These notes are so that I can remember how to build and test PhotoScript.
- Change to the project directory
- Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Create the virtual environment:
uv venv
oruv 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
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.
Build docs with mkdocs build
then deploy to GitHub pages with mkdocs gh-deploy
To build the project:
rm -rf dist; rm -rf build
uv build
Use bump2version:
bump2version patch --verbose [--dry-run]
bump2version minor --verbose [--dry-run]
bump2version major --verbose [--dry-run]
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
To publish to PyPI:
uv publish