Skip to content

docs/refactor: improve read API, fix setup.py, add type hints and comprehensive docs - #357

Open
jimmyliuzg wants to merge 1 commit into
mathroule:mainfrom
jimmyliuzg:feat/read-api-improvements
Open

docs/refactor: improve read API, fix setup.py, add type hints and comprehensive docs#357
jimmyliuzg wants to merge 1 commit into
mathroule:mainfrom
jimmyliuzg:feat/read-api-improvements

Conversation

@jimmyliuzg

Copy link
Copy Markdown

Summary

Improves the read-only CellarTracker API with better documentation, type safety, and bug fixes. No breaking changes — all existing interfaces are preserved.

Changes

Bug Fix

  • setup.py: Removed trailing comma after list ( -> ). The comma was creating a tuple instead of a list, which could cause pip to silently fail to install the dependency.

Documentation

  • README.md (new): Full reference with quick start, method table with descriptions, common field reference, CLI usage examples, and authentication notes
  • Docstrings: Every public method on now has detailed docstrings documenting return values and key fields

Type Safety

  • Fixed type annotations: → in both and
  • Added return type hints: on all data methods

CLI Improvements

  • Added flag: parses the API response back to structured JSON for easier consumption
  • Added flag: shows available tables with descriptions
  • Added examples section to argument parser help
  • Added human-readable table descriptions in help output

Compatibility

  • All existing method signatures unchanged (same return types, same parameters)
  • Uses existing imports for broader Python version compatibility

- Add comprehensive README.md with examples, method tables, and field
  reference for all export tables
- Add type hints (str) to CellarTracker and CellarTrackerClient init
- Add detailed docstrings to all public methods with field descriptions
- Fix setup.py: trailing comma after requirements list was creating a
  tuple instead of a list, breaking pip install
- Add --json and --list-tables flags to CLI
- Add TABLE_DESCRIPTIONS with human-readable table names
- Raise minimum Python version from 3.5 to 3.9 (f-string usage)
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