Skip to content

feat: the submission form collects screenshots, a video and credits - #18

Open
thesprockee wants to merge 1 commit into
mainfrom
form-media-credits
Open

thesprockee wants to merge 1 commit into
mainfrom
form-media-credits

Conversation

@thesprockee

@thesprockee thesprockee commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Closes #13. The form change Spritz asked for after #8.

What

  • .github/ISSUE_TEMPLATE/submit-mod.yml: optional Screenshots (one per line: https link | what it shows, up to 8), Video (one https link), Credits (one per line: name | what they did | link (optional), up to 20), and a rules checkbox that everyone whose work the mod builds on is named in Credits.
  • scripts/submission_fields.py (new, stdlib): parses those answers into the shapes schema/entry.schema.json (feat: entry schema, validator and CI check for listed mods #8) takes: media.screenshots[{url, alt}], media.video, credits[{name, role, url?}], with the schema's limits. A malformed line is an error the author can fix; an empty Credits is a warning.
  • scripts/inspect_submission.py: reads the three headings, reports the errors, and puts the parsed media and credits in report.json's facts, so a maintainer copies them into mods/<id>.json on approval.
  • tests/test_submission_fields.py (17 tests) and .github/workflows/submission-fields-tests.yml.

Not shown

  • The parsing is tested; the lines added to check() (call the parsers, report, store facts) only run in a real submission, which I haven't made. The tests do prove that every label in the form is a heading the check reads (a form field the check ignores fails test_every_form_field_is_read_by_the_check).
  • The limits copy the schema's, by hand; there is no test tying them to schema/entry.schema.json because that file is in feat: entry schema, validator and CI check for listed mods #8, not on main yet.
  • Submissions filed before this have no such fields and stay valid (they read as unanswered).
  • This touches inspect_submission.py like feat: the submission check reads the plugin-release layout #17; they edit different lines (imports at different spots, check() at different places) and merge cleanly: a scratch merge of this branch with inspect-package-layout (feat: the submission check reads the plugin-release layout #17) ran 41 tests OK.

Commands run

$ python3 -I -m unittest discover -s tests
Ran 17 tests in 0.001s
OK

Mutants (one line changed, tests run, file restored from a saved copy):

M1 Credits heading not read          -> FAIL test_every_form_field_is_read_by_the_check (+2 errors)
M2 http links accepted               -> FAIL test_link_must_be_https, test_http_refused (x2)
M3 screenshot alt not required       -> FAIL test_alt_required
M4 screenshot cap off                -> FAIL test_at_most_eight
M5 credit role not required          -> FAIL test_role_required
M6 two video links accepted          -> FAIL test_two_links_refused
restored tree: Ran 17 tests ... OK

Gates from #14 on this branch: title and commits ok: true.

Co-Authored-By: Andrew Bates a@sprock.io

Three optional fields plus a rules checkbox that everyone whose work the mod builds on is named in
Credits. scripts/submission_fields.py parses them into the shapes schema/entry.schema.json takes
(media.screenshots with alt text, media.video, credits), reports a malformed line as an error the
author can fix, and warns when Credits is empty. The parsed values are in report.json's facts for the
maintainer to copy into the entry on approval.

Closes #13

Co-Authored-By: Andrew Bates <a@sprock.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Submission form collects media and credits

1 participant