Skip to content

Fix circular imports between standalone and bundled code, and a set of expression and serialization defects - #332

Draft
dschwartznyc wants to merge 42 commits into
mainfrom
fix-circular-import-error
Draft

dschwartznyc wants to merge 42 commits into
mainfrom
fix-circular-import-error

Conversation

@dschwartznyc

@dschwartznyc dschwartznyc commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

This branch started as the fix for circular ImportErrors between standalone and bundled generated code, and grew to cover the generator defects found while checking generated Python against the DSL and Java. It also generates what the runtime needs to read and write choice types in Java's flat @type format, which rune.runtime 3.1.0 supports.

Closes #312
Closes #313
Closes #314
Closes #315
Closes #316
Closes #317
Closes #318
Closes #319
Closes #320
Closes #322
Closes #323
Closes #324
Closes #331
Closes #333
Closes #337

Issues fixed

Bundling and imports

Expressions

Model structure

Serialization

Build and tests

  • License header check passes without checking any files #337: the license header check runs at validate, before the shade plugin moves the project base directory, so it checks files again (it had checked none since it was added). Missing headers added; local virtual environments excluded.
  • Checkstyle cleanup: missing Javadoc added, PythonDependencyCollector made final, the model_fields prefix made a named constant, and PythonTomlGeneratorTest moved to the util package. Warnings down from 139 to 39 (35 line length, 3 parameter count, 1 method length).
  • run_serialization_tests.sh stages only the rune-common suites that can be generated together (the round-trip suite and the invalid-choice groups), plus the error-handling cases, which are now tracked in this repository. It clears earlier output before generating, installs the generated tests without dependencies when a local or GitHub runtime is configured, and leaves rune-common's ChoiceDeepNested out of the run, along with its 3 fixtures, until the model is updated (Round-trip test model choicetype/choice.rosetta needs updating when duplicate choice leaves become an error rune-dsl#1464).
  • python-test/cdm-tests/java-validation/: a Java baseline for the CDM FpML ingestion samples (read, round-trip and validate with CDM's Java), for comparison with the generated Python.
  • The pytest configuration for the Python unit tests turns pydantic's "is not a Python type" warning into a failure, so an annotation that resolves to an object fails the tests (An attribute named int, str, bool or datetime isn't validated, or stops its class from loading #331).
  • The known jvnet-nexus-releases build warning (Build warning about the retired jvnet-nexus-releases repository with Maven 3.10+ (upstream: maven-checkstyle-plugin 3.6.0) #335, from maven-checkstyle-plugin 3.6.0) is documented in pom.xml and docs/BUILD_AND_TEST.md.
  • Unused EMF/Ecore dependencies removed; unused files under build/ removed; .gitignore cleaned up.
  • Unit tests for the bundle schema order, bundled types, single-value filtering, type-level keys, choice dispatch tables and attribute names that clash with Python names; round-trip tests for FpML 5.10 samples.

Test results

At 8d2babd, with rune.runtime 3.1.0 from PyPI:

  • JUnit (mvn clean verify): 378 run, 0 failures, 1 skipped (the documented type alias condition gap). License check: 171 files, 0 missing.
  • Python unit tests: 446 passed.
  • Serialization tests: 49 of 49 passed (rune-common's 52 fixtures, less the 3 ChoiceDeepNested fixtures).

Dependencies

Before marking ready

Not included

…tched value as item, and return nothing for absent values (#320)
@dschwartznyc dschwartznyc added the bug Something isn't working label Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

3 participants