Skip to content

refactor: arrange the modules in layer subpackages - #42

Merged
nichinichisou0609 merged 2 commits into
mainfrom
refactor/subpackages
Oct 14, 2026
Merged

nichinichisou0609 merged 2 commits into
mainfrom
refactor/subpackages

Conversation

@nichinichisou0609

Copy link
Copy Markdown
Collaborator

The package is split into subpackages by data flow. Each subpackage
imports only the layers below it:

Subpackage Holds
nnnotes.core JSON text, the process caches
nnnotes.source settings, the APK, catalogs and bundles, the game API, master data
nnnotes.formats CRI audio, movies and lip sync, shaders, motions
nnnotes.unity bundle reading (nnnotes.unity.reader), the typetree exporter, the player data, TextMeshPro fonts
nnnotes.content stories, lives, scores, spots, rooms, UI
nnnotes.pipeline stages, tasks, the store, layouts, the atoms
nnnotes.site, nnnotes.musicdata the ournotes-player site, the music-data builds
nnnotes.cli the command line
  • nnnotes.cli and nnnotes.musicdata keep their import paths, and
    the nnnotes command is unchanged.
  • Package data moves with the module that reads it.
  • An import-linter layers contract in pyproject.toml checks the
    import direction, and CI runs lint-imports with the lint.
  • tests/<layer>/ holds the tests of each subpackage. tests/helpers/
    holds the synthetic data builders.
  • The live-audio document's spec names nnnotes.content.liveaudio.

nichinichisou0609 and others added 2 commits October 14, 2026 12:48
The package is split into subpackages by data flow, each importing only
the layers below it:

- nnnotes.core: JSON text and the process caches
- nnnotes.source: settings, the APK, catalogs and bundles, the game
  API and master data
- nnnotes.formats: CRI audio, movies and lip sync, shaders, motions
- nnnotes.unity: bundle reading (nnnotes.unity.reader), the typetree
  exporter, the player data and the TextMeshPro fonts
- nnnotes.content: stories, lives, scores, spots, rooms and UI
- nnnotes.pipeline: stages, tasks, the store, layouts and the atoms
- nnnotes.site and nnnotes.musicdata: the ournotes-player site and the
  music-data builds
- nnnotes.cli: the command line

nnnotes.cli and nnnotes.musicdata keep their import paths. Package
data moves with the modules that read it. An import-linter layers
contract in pyproject.toml checks the direction, and CI runs it with
the lint.

The live-audio document's `spec` names nnnotes.content.liveaudio.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tests/<layer>/ holds the tests of the matching nnnotes subpackage, and
tests/helpers/ the synthetic data builders (synth, fakeunity). The test
directories are packages, so a test module reuses another's fixtures
through its full name (tests.pipeline.test_stages), and the golden
records name their providers that way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 merged commit 15e54c3 into main Oct 14, 2026
6 checks passed
@nichinichisou0609
nichinichisou0609 deleted the refactor/subpackages branch October 14, 2026 05:07
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