Skip to content

Python CLI parity with Gradle plugin task surface#97

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/make-python-tooling-complete
Draft

Python CLI parity with Gradle plugin task surface#97
Copilot wants to merge 5 commits into
mainfrom
copilot/make-python-tooling-complete

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 7, 2026

The Python CLI (tools/pythontooling) only had 3 commands (schema (partial), doc (stub), validate) versus 10 tasks in the Gradle plugin. This PR brings the Python tooling to feature parity.

XSLT infrastructure (vodml.py)

  • Added doTransformToString() for JSON/YAML schema generation pipelines
  • Added XSLTExecutionOnlyTransformer for named-template stylesheets (catalogue generation)
  • Added TapSchema2PlantUML transformer; enabled Vodml2Catalogues

Shared execution context (context.py — new)

  • Catalog creation with dependency merging, binding file auto-detection (*vodml-binding.xml), VO-DML/VODSL file discovery
  • Default directories aligned with VodmlExtension.kt (src/main/vo-dml, build/generated/...)

Command surface (cli.py — rewritten)

Gradle Task Python CLI Notes
vodmlSchema vodml schema XSD, JSON, OpenAPI YAML, TAP, PlantUML, catalogues
vodmlDoc vodml doc GVD → dot → SVG → HTML, GraphML, LaTeX
vodmlSite vodml site Markdown + nav aggregation (allnav.yml)
vodmlValidate vodml validate Non-zero exit on failure
vodmlJavaGenerate vodml java-generate With output_root, isMain, pu_name params
vodmlPythonGenerate vodml python-generate With output_root, isMain params
vodmlToVodsl vodml vodml-to-vodsl XSLT-based
vodmlXsdToVodsl vodml xsd-to-vodsl XSLT-based
vodslToVodml vodml vodsl-to-vodml Placeholder — requires Java VODSL parser
vodmlGenerateJava vodml generate-java Deprecated alias

All commands accept --binding (auto-detected if omitted), --deps, and --output-dir with sensible defaults.

vodml schema --binding my_binding.vodml-binding.xml --deps IVOA-v1.0.vo-dml.xml my_model.vo-dml.xml
vodml doc my_model.vo-dml.xml
vodml java-generate --binding my_binding.vodml-binding.xml my_model.vo-dml.xml

Other

  • pyproject.toml: version bump to 0.2, added pyyaml dependency
  • README.md: command parity table, examples, external tool prerequisites
  • 34 unit tests (context helpers + CLI command registration/option parsing)
  • .gitignore: added __pycache__/, *.pyc, .pytest_cache/

Copilot AI linked an issue Apr 7, 2026 that may be closed by this pull request
4 tasks
Copilot AI and others added 4 commits April 7, 2026 15:57
- Enhanced vodml.py: added doTransformToString(), XSLTExecutionOnlyTransformer,
  TapSchema2PlantUML transformer
- Added context.py: shared catalog creation, binding detection, output dir mgmt
- Rewrote cli.py with all commands: schema, doc, site, validate, vodml-to-vodsl,
  xsd-to-vodsl, java-generate, python-generate, vodsl-to-vodml, generate-java
- Updated pyproject.toml: bumped version to 0.2, added pyyaml dependency
- Updated README.md: command parity table, examples, prerequisites
- Added unit tests: test_context.py (20 tests), test_cli.py (14 tests)
- All 34 tests pass

Agent-Logs-Url: https://github.com/ivoa/vo-dml/sessions/7c720b85-bb92-4525-aa3f-4e886181a6d5

Co-authored-by: pahjbo <273267+pahjbo@users.noreply.github.com>
…nsform, add PurePath import, remove unused imports

Agent-Logs-Url: https://github.com/ivoa/vo-dml/sessions/7c720b85-bb92-4525-aa3f-4e886181a6d5

Co-authored-by: pahjbo <273267+pahjbo@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

Copilot AI changed the title [WIP] Add enhancements to bring Python tooling to feature parity with Gradle Python CLI parity with Gradle plugin task surface Apr 7, 2026
Copilot AI requested a review from pahjbo April 7, 2026 16:03
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 7, 2026

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit b1f86a1. ± Comparison against base commit 61b7b80.

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.

Make the python tooling more complete

2 participants