Skip to content

Switch from using apischema to pydantic#90

Merged
callumforrester merged 21 commits intomainfrom
pydantic
Apr 14, 2023
Merged

Switch from using apischema to pydantic#90
callumforrester merged 21 commits intomainfrom
pydantic

Conversation

@callumforrester
Copy link
Copy Markdown
Contributor

@callumforrester callumforrester commented Feb 8, 2023

  • Replace all public dataclasses with BaseModels.
  • Add "type validators" to replicate device lookup behaviour. They do not work as well as apischema converters and various workarounds were needed. Will make issues off of this PR.
  • Add tests

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2023

Codecov Report

Merging #90 (1cfbd0e) into main (8e754f3) will increase coverage by 1.42%.
The diff coverage is 84.41%.

@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
+ Coverage   72.13%   73.55%   +1.42%     
==========================================
  Files          35       36       +1     
  Lines         976     1040      +64     
==========================================
+ Hits          704      765      +61     
- Misses        272      275       +3     
Impacted Files Coverage Δ
src/blueapi/cli/cli.py 60.71% <0.00%> (ø)
src/blueapi/core/__init__.py 100.00% <ø> (ø)
src/blueapi/service/app.py 40.35% <0.00%> (ø)
src/blueapi/worker/reworker.py 33.33% <0.00%> (ø)
src/blueapi/plans/plans.py 61.11% <50.00%> (-0.43%) ⬇️
src/blueapi/worker/task.py 72.41% <61.53%> (+2.64%) ⬆️
src/blueapi/core/context.py 78.12% <75.00%> (-2.65%) ⬇️
src/blueapi/service/model.py 80.64% <87.50%> (-4.36%) ⬇️
src/blueapi/utils/serialization.py 87.50% <87.50%> (ø)
src/blueapi/utils/type_validator.py 87.60% <87.60%> (ø)
... and 7 more

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

Comment thread src/blueapi/plans/plans.py
@callumforrester callumforrester marked this pull request as ready for review April 14, 2023 12:42
@callumforrester callumforrester merged commit 1ca16e9 into main Apr 14, 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.

1 participant