Repository navigation
feat: declare the public Python API - #45
Merged
Merged
Conversation
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>
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.
Summary
__all__, each with a docstring.Config,Session,Catalog,ConfigError,GameApiErrorandMusicDataError;import nnnotesstill loads no subpackage. The package shipspy.typed.musicdata.validate_expectation,deckdata.loadsanddeckdata.Numare public names for the music data checks.Tests
tests/test_api.pychecks:__all__is sorted, defined in its module and documented.py.typedships with the package.mkdocs build --strictpasses; the full suite passes.Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com