Skip to content

build: ship nnnotes as a pure Python package with the deck model as the extra deck - #36

Merged
nichinichisou0609 merged 3 commits into
mainfrom
build/pure-python
Oct 13, 2026
Merged

nichinichisou0609 merged 3 commits into
mainfrom
build/pure-python

Conversation

@nichinichisou0609

@nichinichisou0609 nichinichisou0609 commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

nnnotes becomes one pure Python wheel; the deck model of music-data is the package ournotes-sim that each ournotes-deck release publishes, pinned by the extra deck.

Commits

  1. build: hatchling build backend, version from src/nnnotes/__init__.py; the extra deck = ["ournotes-sim==0.0.7"]; musicdata.Deck imports ournotes_sim and names the extra when it is missing. CI installs .[test,deck]; the release builds sdist + wheel, runs twine check and tests the wheel with the extra in a fresh environment. The Deck model workflow moves the pin once a newer ournotes-deck release has published its WASM packages and its wheels.
  2. feat(music-data): --stats-cache keeps the deck model's native simulation programs (chart_stats_cached) with the cache counters in deckStats; --seeds/--workers range checks; exact expectation bound checks and validate_aptitude_statistics; the replay bundle's snap-labels.json (nnnotes.replay-labels/1) bound to the master data snapshot.
  3. feat(schemas): the JSON Schemas move into the package as nnnotes.schemas (names(), load(name)).

Status
CI (Python 3.11–3.14, goldens) installs ournotes-sim 0.0.7 from PyPI and passes.

nichinichisou0609 and others added 3 commits October 13, 2026 21:15
…he extra deck

nnnotes is now one pure Python wheel (py3-none-any) built with
hatchling, its version read from src/nnnotes/__init__.py. The deck
model of music-data is the package ournotes-sim, which ournotes-deck
publishes with each release; the extra `deck` pins one release
(ournotes-sim==0.0.7), so one nnnotes version still carries one deck
model. `pip install 'nnnotes[deck]'` installs it; without it
music-data names the extra and --no-deck.

- musicdata.Deck imports ournotes_sim; provenance.deck keeps the same
  fields (name, version, source, commit, sourceSha256, format).
- The Deck model workflow reads the pin from pyproject.toml and moves
  it once the latest ournotes-deck release has published its WASM
  packages and its ournotes-sim wheels.
- CI installs `.[test,deck]`; the release builds the sdist and the
  wheel, checks them with twine and tests the wheel with the extra in
  a fresh environment.
- The tests check that the installed model is the release the extra
  pins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The deck statistics of music-data use the deck model's native program
cache, and the replay bundle carries the Snap labels of the same
master data snapshot.

- `--stats-cache DIR` keeps the simulation programs and runs of the
  deck model (ournotes_sim.chart_stats_cached) in DIR across builds;
  entries completed before an interrupted build stay valid. The export
  summary's `deckStats` reports the cache counters: requests, hits,
  computed, writes, invalid and bytes.
- `--seeds` must be a positive integer and `--workers` a nonnegative
  one (0 selects the available parallelism).
- Every chart's expectations are checked against the model's exact
  bounds; `validate_aptitude_statistics` checks the Gekisou aptitude
  of a statistics document.
- The replay bundle writes `snap-labels.json`
  (`nnnotes.replay-labels/1`): the names, description templates,
  per-level effects and artwork ids of the Snap and card tables, each
  bound to the SHA-256 the master data provenance records; the
  manifest names it in `snapLabels`. Labels from another region,
  master version or table hash are rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The JSON Schemas of every document nnnotes writes move from
docs/schema/ into the package, src/nnnotes/schemas/, so an installed
nnnotes carries the schemas of its own formats.
nnnotes.schemas.names() lists them and nnnotes.schemas.load(name)
returns one, for example load("music-data"). The documentation links
to the new location.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 marked this pull request as ready for review October 13, 2026 14:14
@nichinichisou0609
nichinichisou0609 merged commit 7b66c09 into main Oct 13, 2026
8 of 12 checks passed
@nichinichisou0609
nichinichisou0609 deleted the build/pure-python branch October 13, 2026 14:15
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.

1 participant