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

Replace APISchema Serialization with Pydantic 1.0 #154

Merged
merged 46 commits into from
Jul 20, 2023
Merged

Conversation

DiamondJoseph
Copy link
Contributor

@DiamondJoseph DiamondJoseph commented Jul 11, 2023

Closes #125

  • Use Pydantic Dataclasses for types that will be serialised/deserialised only (i.e., ComponentConfigs)
  • Remove tests that check APISchema specific behaviour
  • Refactor example configs to use discriminator field handling and more explicit handling of ComponentPort

@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #154 (38e6e8a) into master (17255c6) will decrease coverage by 0.48%.
The diff coverage is 90.54%.

@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
- Coverage   94.97%   94.50%   -0.48%     
==========================================
  Files          44       44              
  Lines        1294     1292       -2     
==========================================
- Hits         1229     1221       -8     
- Misses         65       71       +6     
Impacted Files Coverage Δ
src/tickit/core/adapter.py 91.66% <ø> (-1.20%) ⬇️
src/tickit/core/device.py 100.00% <ø> (ø)
src/tickit/core/typedefs.py 97.50% <ø> (+1.58%) ⬆️
src/tickit/utils/configuration/tagged_union.py 87.23% <87.23%> (ø)
src/tickit/utils/byte_format.py 91.66% <91.66%> (-8.34%) ⬇️
src/tickit/core/components/component.py 96.29% <100.00%> (ø)
src/tickit/core/components/system_simulation.py 97.77% <100.00%> (ø)
src/tickit/devices/iobox.py 97.29% <100.00%> (+0.15%) ⬆️
src/tickit/devices/sink.py 100.00% <100.00%> (ø)
src/tickit/devices/source.py 100.00% <100.00%> (ø)
... and 1 more

src/tickit/utils/configuration/configurable.py Outdated Show resolved Hide resolved
src/tickit/utils/configuration/configurable.py Outdated Show resolved Hide resolved
tests/utils/configuration/test_loading.py Outdated Show resolved Hide resolved
tests/utils/test_configurable.py Show resolved Hide resolved
src/tickit/utils/configuration/configurable.py Outdated Show resolved Hide resolved
examples/configs/http-and-zeromq-devices.yaml Outdated Show resolved Hide resolved
examples/configs/sunk-tcp.yaml Outdated Show resolved Hide resolved
examples/devices/amplifier.py Outdated Show resolved Hide resolved
src/tickit/utils/configuration/configurable.py Outdated Show resolved Hide resolved
src/tickit/utils/configuration/configurable.py Outdated Show resolved Hide resolved
src/tickit/utils/configuration/configurable.py Outdated Show resolved Hide resolved
src/tickit/utils/configuration/configurable.py Outdated Show resolved Hide resolved
@DiamondJoseph DiamondJoseph merged commit 6066902 into master Jul 20, 2023
@abbiemery abbiemery deleted the pydantic1 branch July 21, 2023 09:38
DiamondJoseph added a commit to DiamondLightSource/tickit-devices that referenced this pull request Aug 15, 2023
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.

Change the apischema serialisation to pydantic
3 participants