Skip to content

Comments

Rewrite Python package docs and add README validation#328

Open
holodorum wants to merge 4 commits intokson-org:mainfrom
holodorum:kson-docs-python
Open

Rewrite Python package docs and add README validation#328
holodorum wants to merge 4 commits intokson-org:mainfrom
holodorum:kson-docs-python

Conversation

@holodorum
Copy link
Collaborator

Summary

  • Rewrites the Python package README with comprehensive API documentation covering all public API surface (transpiling, formatting, parsing, schema validation, embed blocks, error handling)
  • Adds a validateReadme Gradle task that runs pytest-codeblocks against the README to ensure all Python code examples are valid and executable
  • Bumps Krossover to 1.0.6 to fix companion object field access for EmbedRule
  • Refactors lib-python build.gradle.kts to use delegated task registration pattern

The previous README had a broken quick start example (imported non-existent
`Success` symbol, called `to_json` without required options arg). Replaced
with complete documentation covering all API surfaces: JSON/YAML conversion,
formatting, parsing/analysis, schema validation, embed blocks, and error
handling. Also fixed pyproject.toml readme path casing for Linux.
Runs pytest-codeblocks against readme.md to validate all Python code
examples. Included in the check task. Also fixes 3 code blocks that
were missing imports or variables needed to run standalone.
Use `val x by register<T>("name")` pattern instead of string constants,
removing the need for top-level name variables.
@aochagavia
Copy link
Collaborator

Note that this might conflict with #327 once either of the PRs get merged (because of the krossover update)

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.

2 participants