Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve compound fields issues with multi-inheritance types #533

Merged
merged 7 commits into from
Jun 22, 2021

Conversation

tefra
Copy link
Owner

@tefra tefra commented Jun 19, 2021

The netex collection once again is putting some of the xsdata codegen features to the test with cases I have never encountered before.

  • Process choices default values with enumerations
  • Evaluate choices when clearing inner classes as well
  • Evaluate choice's forward references with the correct globals (clusters structure only)
  • Holy grail multiple compound fields
  • Delay the execution of some post-flattening handlers
  • Refactor restrictions handling (min/max occurs, required, prohibited)
  • Update the samples repo unit tests to generate code with multiple scenarios

Resolve #532 issues
Samples repo related pr tefra/xsdata-samples#60

@tefra tefra added the wip label Jun 19, 2021
@tefra tefra force-pushed the compound-fields-catchup branch from 5d12a35 to 6d4d291 Compare June 20, 2021 07:10
@codecov
Copy link

codecov bot commented Jun 20, 2021

Codecov Report

Merging #533 (4a5245a) into master (fb30305) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #533   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           95        94    -1     
  Lines         7664      7685   +21     
  Branches      1326      1327    +1     
=========================================
+ Hits          7664      7685   +21     
Impacted Files Coverage Δ
xsdata/codegen/handlers/__init__.py 100.00% <ø> (ø)
xsdata/codegen/mappers/definitions.py 100.00% <ø> (ø)
xsdata/codegen/container.py 100.00% <100.00%> (ø)
...data/codegen/handlers/attribute_compound_choice.py 100.00% <100.00%> (ø)
xsdata/codegen/handlers/attribute_default_value.py 100.00% <100.00%> (ø)
xsdata/codegen/handlers/attribute_name_conflict.py 100.00% <100.00%> (ø)
xsdata/codegen/handlers/attribute_overrides.py 100.00% <100.00%> (ø)
xsdata/codegen/handlers/attribute_type.py 100.00% <100.00%> (ø)
xsdata/codegen/handlers/class_inners.py 100.00% <100.00%> (ø)
xsdata/codegen/mixins.py 100.00% <100.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb30305...4a5245a. Read the comment docs.

Notes:
Otherwise the forward references for compound fields
are failing to evaluate correctly in case of subclasses
in different modules!
@tefra tefra force-pushed the compound-fields-catchup branch from 6d4d291 to 498e3f3 Compare June 20, 2021 07:15
@tefra tefra force-pushed the compound-fields-catchup branch from c50bdb9 to 83e2b7b Compare June 21, 2021 21:13
Notes:
Some handlers require the one of the previous
ones to run fully for all the classes to be
fully effective.
@tefra tefra force-pushed the compound-fields-catchup branch from 83e2b7b to 09ff172 Compare June 21, 2021 21:18
@tefra
Copy link
Owner Author

tefra commented Jun 21, 2021

The reshuffle of the handlers is throwing stuff of out order for restrictions...

@tefra tefra force-pushed the compound-fields-catchup branch from adf96af to 7a6e306 Compare June 22, 2021 19:37
@tefra tefra force-pushed the compound-fields-catchup branch from 7a6e306 to 4a5245a Compare June 22, 2021 19:48
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@tefra tefra removed the wip label Jun 22, 2021
@tefra tefra merged commit e83e202 into master Jun 22, 2021
@tefra tefra deleted the compound-fields-catchup branch June 22, 2021 20:03
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.

NeTEx scherma with compound fields causes errors
1 participant