Closed kddubey closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 94.00%. Comparing base (
8147f75
) to head (b975ebf
).
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
So this PR is correct if and only if the coverage seen in codecov.io matches the output immediately above. Expect coverage to be: (684-46)/684 = 93.27%.
Coverage turned out to be 94% but I'm not totally sure why lol
Edit: I think it's b/c there are Python version-dependent clauses that my local test didn't hit
@kddubey , this looks excellent to me! Thank you for adding the missing link too. As long as @swansonk14 approves, it should be ready for release.
--Jesse
This looks awesome, thank you @kddubey!
128 reduced code coverage b/c the current coverage workflow runs the tests w/o
pydantic
installed.We want the union of lines covered by the 3 testing environments in the testing workflow: one without
pydantic
installed, one withpydantic<2
, and one withpydantic>=2
. This funcionality is achieved throughpytest-cov
's--cov-append
feature.How has this been tested?
Locally. Create 3 virtual environments: one without
pydantic
installed, one withpydantic<2
, and one withpydantic>=2
. Then simulate the test workflow:This command outputs 3 coverage reports (one for each
pytest
invocation):The final
.coverage
file that should be sent to codecov.io is that last one (obtained locally viacoverage report -m
):So this PR is correct if and only if the coverage seen in codecov.io matches the output immediately above. Expect coverage to be: (684-46)/684 = 93.27%.
Explanation of code coverage
Recall that #128 only touches
tap/__init__.py
andtap/tapify.py
. 2 of the 3 uncovered lines intap/tapify.py
are inconsequential:TypeError
that can't be hit (unless a curious user manually applies_tap_data_from_data_model
to a non-data-model) b/c of 245165 raises a
TypeError
that can be hit if a user inputs a data model containing a field that isn't a Pydantic model field, Pydantic dataclass field, or builtin dataclass field. This should be tested later, but hopefully it's ok for now :-)