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

Add more CI testing and fix R4 generation #50

Merged
merged 1 commit into from
Jul 15, 2024
Merged

Add more CI testing and fix R4 generation #50

merged 1 commit into from
Jul 15, 2024

Conversation

mikix
Copy link
Contributor

@mikix mikix commented Jul 12, 2024

  • Add CI generation test for R5
  • Add CI unit test for R4
  • Fix a generation bug that wrote out bogus enum classes like AccountStatus.str instead of just str
  • Fix an R5 generation bug by adding enum mappings for + and -
  • Change the default unit test filename pattern from _tests.py to _test.py so that pytest automatically finds the files
  • Fix a unit-test generation bug that didn't properly escape backslashes in strings
  • Generate models/__init__.py automatically so that all the relative importing the models do works out of the box

R5 unit tests still don't pass with this commit, but that can be left to a future effort. R4 is still the default generation mode.

Fixes: #44
Fixes: #28

Comment on lines -612 to +616
if prop.enum is not None:
if prop.enum is not None and not self.spec.class_name_is_native(prop_cls_name):
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the bit that fixes AccountStatus.str being used instead of str

- Add CI generation test for R5
- Add CI unit test for R4
- Fix a generation bug that wrote out bogus enum classes like
  AccountStatus.str instead of just str
- Fix an R5 generation bug by adding enum mappings for + and -
- Change the default unit test filename pattern from _tests.py to
  _test.py so that pytest automatically finds the files
- Fix a unit-test generation bug that didn't properly escape
  backslashes in strings
- Generate models/__init__.py automatically so that all the relative
  importing the models do works out of the box

R5 unit tests still don't pass with this commit, but that can be
left to a future effort. R4 is still the default generation mode.
@mikix mikix changed the title WIP: Add more CI testing and fix R4 generation Add more CI testing and fix R4 generation Jul 12, 2024
@mikix mikix marked this pull request as ready for review July 12, 2024 18:45
@mikix mikix merged commit 174bfd1 into main Jul 15, 2024
5 checks passed
@mikix mikix deleted the mikix/ci-fixes branch July 15, 2024 12:17
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.

Valueset elementProperties of the form "Foo.str" More unit tests needed
2 participants