Contributing
Thanks for helping with the TunaOS Flatpak index. This repository holds the
scripts, templates, and CI actions that build and audit the OCI-based Flatpak
remote described in README.md β it is not itself the live index
(the authoritative one is served from tuna-os/docs; see the README's
"Index format" section for that distinction).
Repository layoutβ
| Path | What lives here |
|---|---|
scripts/update-index.py | Canonical script that adds/replaces one app's entry in an OCI index. Application repos vendor a copy of this at .github/scripts/update-index.py β see the README's "How to add a new Flatpak" section before changing its interface. |
scripts/enrich-index.py | Re-reads AppStream labels from the registry and repairs/audits an index file in place (missing metadata, missing screenshots). |
scripts/oci.py | Shared OCI layout/registry helpers used by the other scripts. |
.github/actions/capture-screenshots | Composite action that captures an app's own window under a headless X server for AppStream screenshots; see docs/SCREENSHOTS.md. |
templates/ | Starting points for new app metainfo files; see docs/METAINFO.md. |
tests/ | unittest-based test suite for the scripts above. |
Developmentβ
Requires Python 3.11+ and the standard library only β no extra dependencies to install.
Run the test suite locally:
python3 -m unittest discover -s tests -v
Audit the live remote's index against what's actually published (does not
require any local setup beyond curl):
curl -sSfL -o served-index.json https://tunaos.org/flatpak/index/static
./scripts/enrich-index.py served-index.json --check
Making a changeβ
- Branch from
main. - Keep
scripts/update-index.pyself-contained (one file, standard library only) β application repos vendor it directly, so a new dependency or a split across files breaks every consumer's copy. - If you change the
update-index.pyorenrich-index.pyCLI/contract, check the README's "How to add a new Flatpak" walkthrough anddocs/METAINFO.md/docs/SCREENSHOTS.mdfor anywhere that needs updating too. - Run
python3 -m unittest discover -s tests -vbefore opening a PR; add or extend tests undertests/for any behavior change. - Open a PR describing what changed and why, and link any related issue.
Changes to the production index (static/flatpak/index/static) itself
belong in tuna-os/docs or in the publishing workflow of the application
repo being published, not here β see the README's "Index format" note.
Questions or problemsβ
Open an issue in this repository: https://github.com/tuna-os/flatpak-index/issues.