2.9 KiB
Repository instructions
Purpose and layout
-
Maintain custom Cockatrice sets and artwork with the eventual goal of automatic installation and updates.
-
Edit
sets/<SET_CODE>/set.tomlmetadata, topic files such ascommand_zones.toml, and images in itsartwork/directory. Declare[set]once per set; use[[tokens.alternatives]]for additional artwork of the same token. TOML is the authoritative editable source; never hand-maintain XML insets/.scripts/generate_xml.pygenerates XML underdist/sets/. Preserve stable token IDs, imported UUIDs, and published XML filenames when updating content. Archives are historical snapshots, not a second source to maintain. -
Building requires Python 3.11+ (
tomllib) and Pillow fromrequirements-build.lock. Activate.venvbefore building/testing; the client installer remains 3.8+. -
Render reminder text from
[tokens.render]withscripts/render_cards.py. Keep blank templates intemplates/, bundled fonts and licenses inassets/fonts/, and rendered images only underdist/. Reject overflow instead of clipping text. Cite official rules and record the reviewed date for rules reminders. -
Build ZIPs using
python3 scripts/build.py; do not hand-edit ZIPs or commit generateddist/contents. -
Keep
deploy.shanddeploy.ps1as non-mutating mocks until real deployment is explicitly requested. Keep their behavior consistent. -
Maintain the real client installer in
scripts/install.py;install.shand its checksum manifest are generated byscripts/publish.py prepare. Preserve the interactive path checks, staged validation, explicit destination logging, and rollback behavior. Runpython3 -m unittest discover -s tests -vafter changes. -
Update README.md when layout or supported behavior changes. Distinguish working features from planned installation and updates.
-
config/servatrice/is for manual configuration safekeeping only. Never wire it into CI deployment, token publication, or the client installer. Keep credentials out of Git; preserve private originals separately. Do not migrate a server database or replace its container without a verified backup and upgrade plan.
Validation and commits
- Run
python3 scripts/build.py,python3 scripts/generate_xml.py --check, andpython3 -m unittest discover -s tests -vafter source or packaging changes. Check Bash syntax and run the preview after changing deploy.sh. Validate deploy.ps1 using PowerShell when available, and report when unavailable. - You shall make a Git commit for every completed modification or user request that changes this repository. Group edits for one request into a coherent commit with a descriptive message after appropriate validation.
- Commit only files belonging to the request and preserve unrelated user changes. Do not amend or rewrite existing commits unless requested.
- If a commit cannot be created, report the blocker rather than claiming success.