Add pydantic-xml model generation, XML schema validation tests, and CI workflow#94
Add pydantic-xml model generation, XML schema validation tests, and CI workflow#94Copilot wants to merge 30 commits into
Conversation
Test Results1 tests +1 0 ✅ ±0 0s ⏱️ ±0s For more details on these errors, see this check. Results for commit ffecc5a. ± Comparison against base commit 61b7b80. ♻️ This comment has been updated with latest results. |
…y tests Co-authored-by: pahjbo <273267+pahjbo@users.noreply.github.com>
…gnore Co-authored-by: pahjbo <273267+pahjbo@users.noreply.github.com>
… errors Co-authored-by: pahjbo <273267+pahjbo@users.noreply.github.com>
Added
Run with: |
… GitHub Actions workflow Co-authored-by: pahjbo <273267+pahjbo@users.noreply.github.com>
accepting them, as they are at least trying to deal with namespaces - however it looks like CO-PILOT is struggling - I think it will be necessary to go back to human research
python 3.14
xsdata seems to be be trying harder to be XML compliant
… wrong still do need proper reference handling though
also added python runtime as separate lib for first time
not the nicest way to achieve this, but is quick and dirty until the runtime has evolved enough to be versioned.
|



Adds a new Gradle task
vodmlPydanticGeneratethat transforms VO-DML models into Python pydantic-xml classes for XML/JSON serialisation without SQLAlchemy coupling, backed by interoperability tests and a dedicated CI workflow.XSLT generator —
tools/xslt/vo-dml2pydantic.xslobjectType/dataType→BaseXmlModelsubclasses withelement()field descriptorsenumeration→str, Enum;primitiveType→ single-field wrapperbinding_setup.xsland all existing binding/mapping infrastructuremaxOccurshandling vianumber()/string comparison (avoidsxsd:int()failures onunbounded)Gradle plugin —
VodmlPydanticTask.kt/VodmlGradlePlugin.ktVodmlPydanticTaskmirrorsVodmlPythonTask, sharingoutputPythonDirvodmlPydanticGenerateregistered alongside existing generation tasksPython interoperability tests —
PydanticInteropTest.pySampleModelInteropTest,LifecycleModelInteropTest,SerializationExampleInteropTest: construct the same object graphs as the Java tests, serialise to XML/JSON, write tointeroperability/python/, assert round-trip fidelityJavaInteropReadTest: reads Java-produced JSON and XML frominteroperability/java/, validates structure and field values, and schema-validates each XML against its generated XSD usinglxmlSchema validation of Python-generated XML is deferred until the pending namespace/
xsi:typegeneration fixes land.Build wiring
pytestPydantictask depends on bothvodmlPydanticGenerateandvodmlSchema(ensures XSD files are present before tests run)--junit-xmlflag added to the pytest command for CI result ingestionpydantic-xml==2.13.1added to the sample virtualenv pip dependenciesCI —
.github/workflows/pydantic-test.ymlDedicated workflow on push/PR to
main. Uses explicit step ordering to work around Gradle composite-build task-dependency limitations (the rootbuild.gradle.ktsalready notes this constraint):interoperability/java/fixtures./gradlew :ivoa:vodmlPydanticGenerate :sample:pytestPydanticEnricoMi/publish-unit-test-result-actionOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.