Skip to content

Add an append-only JSON Lines label store - #18

Open
cloudgpuapp wants to merge 1 commit into
diffpy:mainfrom
cloudgpuapp:feat/13-jsonl-label-store
Open

cloudgpuapp wants to merge 1 commit into
diffpy:mainfrom
cloudgpuapp:feat/13-jsonl-label-store

Conversation

@cloudgpuapp

Copy link
Copy Markdown

What problem does this PR address?

Adds an append-only UTF-8 JSON Lines label store. It validates required schema-1 fields before writing, preserves additional fields, and exposes the latest record, append history, and exact-value queries. The image ID helper applies the documented filename convention without opening the referenced file.

Closes #13.

What should the reviewers do?

Please review the storage contract, especially that latest() and query() operate on the most recent append per image ID and that history() returns every revision.

Verification

  • The new tests fail to collect on unmodified main because the module is absent. After the change, all 17 tests pass with Python 3.12.
  • Black, isort, flake8, docformatter and git diff --check pass for the changed code.
  • All records used for testing were synthetic. README and the news entry document the new API.

Prepared with AI assistance.

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.

feat: store labels in a JSON Lines file (UC-1.7)

1 participant