Skip to content

Add optional Story Format field on stories with validation#41

Merged
paul-sheridan merged 4 commits into
mainfrom
feature/story-format-field
Jun 17, 2026
Merged

Add optional Story Format field on stories with validation#41
paul-sheridan merged 4 commits into
mainfrom
feature/story-format-field

Conversation

@odinlake

@odinlake odinlake commented Jun 16, 2026

Copy link
Copy Markdown
Member

Summary

Adds an optional Story Format field to stories — a high-level, objective classification of the narrative medium (not genre).

  • New Story_Format = sa("text") field on TOStory (maps to the :: Story Format field in .st.txt).
  • The field is optional: stories may omit it.
  • When set, validate() flags any value outside the permitted vocabulary.

Permitted values

film, tv, stage, prose, game

  • film — cinema releases (movie: ids)
  • tv — episodic broadcast (no-prefix episode ids)
  • stage — live staged works: plays, opera, musicals, ballet (play: ids and the like)
  • prose — writings to read: novels, novellas, short stories, fables (novel:/shortstory:/writing: ids)
  • game — interactive (videogame: ids)

Validation

TOImpl.validate_storyformat() yields a warning like:
<story>: Unrecognized 'story format' '<value>' (expected one of: ...)
wired into the public ThemeOntology.validate() generator.

Tests

  • New fixture tests/data/storyformat.st.txt (valid / invalid / omitted cases).
  • TestValidation::test_storyformat_warning.
  • Full suite: 112 passed, 100% coverage, pylint 10.00/10.

Version bumped 2.1.3 → 2.2.0 (new public field).

🤖 Generated with Claude Code

Adds a "Story Format" field to TOStory: a high-level, objective
classification of the narrative medium (not genre). The field is
optional and may be omitted. When set, validate() now flags any value
outside the permitted vocabulary: film, tv, play, prose, game, opera,
nonfiction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@odinlake odinlake self-assigned this Jun 16, 2026
@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (20058fe) to head (2bc2902).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #41   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         1607      1616    +9     
=========================================
+ Hits          1607      1616    +9     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@odinlake odinlake requested a review from paul-sheridan June 16, 2026 18:45
paul-sheridan
paul-sheridan previously approved these changes Jun 17, 2026
@paul-sheridan paul-sheridan merged commit 1f23d41 into main Jun 17, 2026
8 checks passed
@paul-sheridan paul-sheridan deleted the feature/story-format-field branch June 17, 2026 10:05
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.

2 participants