Repository navigation
Import and show series years, status and summary - #984
Merged
Merged
Conversation
Series gains start_year, end_year, status (choices from comicbox's SeriesStatusEnum) and summary, read from comicbox's series block. The metadata pane shows the year range and status after the series name and the series summary below the comic's. The tag editor gets a MetronInfo-only Start Year beside Volume Count. The importer's single count slot per collection becomes a tuple of attributes. Comics of one series in a batch now merge per attribute (earliest start, latest end, largest count, first status and text). The old max_none merge for counts never ran: it looked proposals up with an unhashable list and suppress(Exception) hid the TypeError, so disagreeing comics resolved by set order. Series.summary collides with the comic summary annotation on collection panes, so that field now takes the conflict_ prefix path. Needs the comicbox release that ships SeriesStatusEnum; the pin is not bumped yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft: depends on an unreleased comicbox. The one remaining step is bumping the comicbox pin (pyproject + uv.lock) to the release that ships
SeriesStatusEnumand theseries.end_year/status/summaryschema fields. The pin is~=5.3.2, so it has to move to 5.4. Until thencodex/models/choices.pycan't import the enum from PyPI's comicbox 5.3.2, and CI on this branch will fail at import.What
Series rows gain
start_year,end_year,status(choices derived fromcomicbox.enums.comicbox.SeriesStatusEnum) andsummary, imported from comicbox'sseriesblock (migration0058_series_fields).(1963–1996)/(1963– )/(1963)and the status, subdued, after the series name; the series summary under a "Series" label below the comic's summary.Series/StartYear; ComicInfo has no tag), written inside theseriesobject like the volume count.end_year/status/summaryget no editor fields because no format codex writes can carry them.Importer
The single "count field" slot per collection model is now a tuple of attributes (
COLLECTION_MODEL_ATTR_FIELDS), which drivesMODEL_REL_MAP, the Series create args and the read-phase merge. Within one import batch, comics of a series merge per attribute: earliest start year, latest end year, largest count, first status and summary. Against the stored row the existing rule holds: a proposed non-null value that differs wins.Pre-existing bug fixed along the way: the read-phase
max_nonemerge forvolume_count/issue_countnever ran. It looked up the proposals with thecollection_listlist, andsuppress(Exception)swallowed theTypeError. So when comics in one batch disagreed, the query phase picked one by set iteration order. Now every proposal for a collection is rewritten with the merged attributes, so they all agree.Two other things the new columns needed:
Series.summarycollides with the comicsummaryannotation on collection panes. It now takes the existingconflict_prefix path, likenameandpath._value_output_fieldwalks relations, soseries__*values resolve on Series instead of raising on Comic.Tested against
comicbox 5.4.0 from ajslater/comicbox#246 (branch
claude/series-fields-35d8cbat0e9c1e1, itsdist/wheel), installed into the worktree venv without touching the pin. It was also green against the schema-only commit95749ad.make fix,make lintandmake tyare clean, andmake testpasses: pytest 1691 (1 xfailed), vitest 1003.Browser check on an isolated dev stack at 375, 800 and 1280 px: header, series summary, and the Start Year field. Start Year is disabled with the usual tooltip under ComicInfo and editable under MetronInfo. That check found a phone-width overflow (the no-wrap series row ran off-screen), fixed by letting
#seriesRowwrap and keeping the year range on one line.New tests:
tests/importer/test_series_attrs.py: batch merge, empty defaults, later batch against the stored row, and a round trip from an archive'scomicbox.yaml.tests/test_metadata_series_fields.py: the comic and series panes, and that the comic summary survives on the series pane.test_write_series_start_year: the editor's patch lands as MetronInfoStartYear.metron_onlyintest_format_exclusive_fieldsnow includesstart_year.seriesYearsformatting and the Start Year field.🤖 Generated with Claude Code