Repository navigation
Development
This page is mirrored automatically from
docs/en/development.md(v0.11.3). Changes made here are overwritten; please suggest them as a pull request.
English · Deutsch · ← Documentation
python -m venv .venv && . .venv/bin/activate
pip install -r requirements-dev.txt
python -m ruff check # linter, also runs in CI
python -m pytest -q # run the tests
python tools/make_sample.py ./library # create sample files
LIBRARY_DIR=./library DATA_DIR=./data uvicorn app.main:app --reloadThere is also a browser test that opens all pages and the 3D preview in Chromium. It
fails on any JavaScript error, on any request to another server, and on serious or
critical accessibility problems (WCAG 2 A/AA, checked with axe-core from tests/vendor/,
in the light and the dark theme):
pip install -r requirements-browser.txt
python -m playwright install chromium
python -m pytest -q tests/test_browser.pypython tools/make_screenshots.py recreates the screenshots in the README and docs.
python tools/load_test.py 2000 builds a library with 2000 files and times reading and
the main pages. python tools/make_icons.py renders the home screen icons from
app/static/logo.svg.
The German texts in the code double as keys for the translations in
app/locales/<language>.json. After changing or adding texts,
python tools/i18n_extract.pyshows per language what is missing or no longer used. The tests fail as long as a
translation is missing or its placeholders ({n}, {name} …) don’t match the German
text. A new language needs an entry in LANGUAGES, NUMBER_FORMAT, MONTHS and
DAY_MONTH in app/i18n.py plus its own JSON file.
Bug reports and ideas are welcome as GitHub issues; the forms ask for the details that are usually needed. For bugs, open “Settings” → “Diagnostics” in PlateShelf, click “Copy” and paste the text into the issue. It lists version, platform, library figures, printer types with their last result, which settings are set and the latest warnings, without credentials, IP addresses, host names or printer names.
-
Every pull request and every push to
mainruns Ruff, the Python tests and the browser test and builds the image for amd64 and arm64 as a trial. Nothing is published. -
Trivy then scans the image for known vulnerabilities. Critical and high ones that already have a fix are listed; the build only fails on critical ones, so a fresh “high” in the base image does not block a release until Debian has shipped the fix.
-
A release is created by a version tag:
-
Add the changes to
CHANGELOG.mdunder the new version number. -
Create and push the tag:
git tag -a v1.2.3 -m "PlateShelf 1.2.3" && git push --tags
-
GitHub Actions tests, builds the image for all platforms and publishes it as
1.2.3,1.2andlatest. Older versions are then removed; the last five releases are kept.
-
-
Dependabot (
.github/dependabot.yml) checks Python packages, GitHub Actions and the base image weekly and proposes updates as pull requests. Known vulnerabilities are reported immediately and fixed automatically via pull request. Such updates reach the published image with the next release. -
The documentation lives in
docs/and is mirrored into the GitHub wiki (.github/workflows/wiki.yml,tools/wiki_sync.py) on every release and on demand (Actions → Wiki → Run workflow). Editdocs/only: changes made in the wiki are overwritten by the next mirror.
PlateShelf on GitHub · v1.7.2