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

feat: add 'kind' field to dict output for various subclasses that are otherwise identical #185

Merged
merged 25 commits into from
Jul 10, 2023

Conversation

tlambert03
Copy link
Owner

@tlambert03 tlambert03 commented Jul 5, 2023

allows roundtripping of to_dict for things like Shape|ManufacturerSpec|Annotation

This PR also adds a new pattern for adding validators or methods to classes without using Mixins

Base automatically changed from v2 to main July 6, 2023 20:19
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Merging #185 (142021a) into main (daedfcc) will increase coverage by 0.45%.
The diff coverage is 98.68%.

@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
+ Coverage   96.73%   97.19%   +0.45%     
==========================================
  Files          25       24       -1     
  Lines         857      890      +33     
==========================================
+ Hits          829      865      +36     
+ Misses         28       25       -3     
Impacted Files Coverage Δ
src/ome_types/_conversion.py 94.62% <ø> (ø)
src/ome_types/model/_shape_union.py 88.57% <0.00%> (-2.86%) ⬇️
src/ome_autogen/_config.py 100.00% <100.00%> (ø)
src/ome_autogen/_generator.py 100.00% <100.00%> (ø)
src/ome_autogen/main.py 100.00% <100.00%> (ø)
src/ome_types/__init__.py 100.00% <100.00%> (+13.33%) ⬆️
src/ome_types/_mixins/_base_type.py 98.75% <100.00%> (-1.25%) ⬇️
src/ome_types/_mixins/_kinded.py 100.00% <100.00%> (ø)
src/ome_types/_mixins/_ome.py 97.91% <100.00%> (+7.00%) ⬆️
src/ome_types/_mixins/_validators.py 100.00% <100.00%> (ø)
... and 1 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tlambert03 tlambert03 changed the title test: updating serialization tests feat: add 'kind' field to dict output for various subclasses that are otherwise identical Jul 7, 2023
@tlambert03 tlambert03 merged commit e5ca460 into main Jul 10, 2023
@tlambert03 tlambert03 deleted the serialization-tests branch July 10, 2023 20:36
@tlambert03 tlambert03 added the enhancement New feature or request label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant