Skip to content

feat: declare the public Python API - #45

Merged
nichinichisou0609 merged 2 commits into
mainfrom
feat/public-api
Oct 14, 2026
Merged

nichinichisou0609 merged 2 commits into
mainfrom
feat/public-api

Conversation

@nichinichisou0609

Copy link
Copy Markdown
Collaborator

Summary

  • The public modules (configuration, Session, catalog, Addressables, master data, game API, Japanese release client, music data, Live2D model keys, schemas) declare their public names in __all__, each with a docstring.
  • The top level lazily exposes Config, Session, Catalog, ConfigError, GameApiError and MusicDataError; import nnnotes still loads no subpackage. The package ships py.typed.
  • musicdata.validate_expectation, deckdata.loads and deckdata.Num are public names for the music data checks.
  • The docs site gets a Python API page generated by mkdocstrings.
  • Adds CONTRIBUTING.md, issue forms and a pull request template.

Tests

  • tests/test_api.py checks:
    • Each top-level name is the module's own object.
    • The package import stays lazy.
    • Every __all__ is sorted, defined in its module and documented.
    • py.typed ships with the package.
  • mkdocs build --strict passes; the full suite passes.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

nichinichisou0609 and others added 2 commits October 14, 2026 14:39
The modules a script uses directly declare their public names in
`__all__`: the configuration, the Session, the catalog, Addressables,
master data, the game API, the Japanese release client, the music data
builder and its checks, the Live2D model keys of a catalog and the JSON
schemas. Each public name has a docstring.

The package top level imports `Config`, `Session`, `Catalog`,
`ConfigError`, `GameApiError` and `MusicDataError` on first use, so
`import nnnotes` still loads no subpackage. The package ships a
`py.typed` marker.

The music data checks that scripts call are public:
`musicdata.validate_expectation` checks a chart's deck statistics, and
`deckdata.loads` reads a JSON document with every non-integer number kept
as its token (`deckdata.Num`).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The documentation site gets a Python API page, generated by mkdocstrings
from the docstrings of the public modules; `pip install 'nnnotes[docs]'`
installs it. CONTRIBUTING.md describes the setup, the checks CI runs, the
golden records, the generated command reference, synthetic test fixtures,
the commit conventions and releases. Issues get bug and feature forms,
and pull requests a checklist.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 merged commit 20043b2 into main Oct 14, 2026
7 checks passed
@nichinichisou0609
nichinichisou0609 deleted the feat/public-api branch October 14, 2026 06:41
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