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

Fix unit test borkage due to pydantic-extra-types change in 2.10.1 #705

Merged

Conversation

rtuck99
Copy link
Contributor

@rtuck99 rtuck99 commented Dec 9, 2024

Note this change merges on top of #704

pydantic-extra-types changed the inheritance hierarcy for SemanticVersion in the below change, which broke our unit tests
pydantic/pydantic-extra-types#237

This change fixes the following unit test error:

ERROR tests/unit_tests/hyperion/experiment_plans/test_flyscan_xray_centre_plan.py - TypeError: Expected str, bytes, dict, tuple, list, or SemanticVersion instance, but got <class 'semver.version.Version'>
ERROR tests/unit_tests/hyperion/experiment_plans/test_flyscan_xray_centre_plan.py - TypeError: Expected str, bytes, dict, tuple, list, or SemanticVersion instance, but got <class 'semver.version.Version'>
ERROR tests/unit_tests/hyperion/external_interaction/callbacks - TypeError: Expected str, bytes, dict, tuple, list, or SemanticVersion instance, but got <class 'semver.version.Version'>

@rtuck99 rtuck99 force-pushed the fix_for_pydantic_extra_types_2.10.1 branch from 7dc410c to 6ae6196 Compare December 9, 2024 15:50
@rtuck99 rtuck99 changed the base branch from main to fixes_for_ophyd_async_0.9.0a1 December 9, 2024 15:50
@rtuck99 rtuck99 marked this pull request as ready for review December 9, 2024 15:52
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (fixes_for_ophyd_async_0.9.0a1@c74cf1d). Learn more about missing BASE report.

Additional details and impacted files
@@                       Coverage Diff                        @@
##             fixes_for_ophyd_async_0.9.0a1     #705   +/-   ##
================================================================
  Coverage                                 ?   86.44%           
================================================================
  Files                                    ?      102           
  Lines                                    ?     6937           
  Branches                                 ?        0           
================================================================
  Hits                                     ?     5997           
  Misses                                   ?      940           
  Partials                                 ?        0           
Components Coverage Δ
i24 SSX 71.94% <0.00%> (?)
hyperion 96.84% <0.00%> (?)
other 94.15% <0.00%> (?)

Copy link
Contributor

@d-perl d-perl left a comment

Choose a reason for hiding this comment

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

lgtm

@d-perl d-perl merged commit 46e9633 into fixes_for_ophyd_async_0.9.0a1 Dec 9, 2024
22 checks passed
@d-perl d-perl deleted the fix_for_pydantic_extra_types_2.10.1 branch December 9, 2024 16:14
olliesilvester added a commit that referenced this pull request Dec 10, 2024
* Pin dodal

* Fix imports for new ophyd-async

* Fix comparison inside pydantic version field validator (#705)

---------

Co-authored-by: olliesilvester <122091460+olliesilvester@users.noreply.github.com>
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.

2 participants