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

Serialize improvements #370

Merged
merged 9 commits into from
Jan 25, 2023
Merged

Serialize improvements #370

merged 9 commits into from
Jan 25, 2023

Conversation

samuelcolvin
Copy link
Member

@samuelcolvin samuelcolvin commented Jan 24, 2023

  • serializing enums, including workaround for PyTypeObject.ob_type is not available in cpython PyO3/pyo3#2905
  • no fallback warning if the input is None
  • no format if the input is None
  • fallback not error on wrong type to model, no warning on fallback with None
  • use ellipsis, not None in filtering.
  • support for '__all__' special key value

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 24, 2023

CodSpeed Performance Report

Merging #370 serialize-enums (4e3cec5) will not alter performances.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 80 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2023

Codecov Report

Merging #370 (4e3cec5) into main (084c551) will increase coverage by 0.37%.
The diff coverage is 92.62%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #370      +/-   ##
==========================================
+ Coverage   94.98%   95.36%   +0.37%     
==========================================
  Files          90       90              
  Lines       10036    10131      +95     
  Branches        4        4              
==========================================
+ Hits         9533     9661     +128     
+ Misses        501      470      -31     
+ Partials        2        0       -2     
Impacted Files Coverage Δ
src/serializers/filter.rs 94.33% <90.47%> (-1.15%) ⬇️
src/serializers/ob_type.rs 86.95% <90.90%> (+0.28%) ⬆️
src/serializers/type_serializers/simple.rs 96.15% <92.85%> (+4.84%) ⬆️
src/serializers/type_serializers/format.rs 97.01% <93.33%> (-1.35%) ⬇️
src/serializers/extra.rs 95.00% <100.00%> (+0.19%) ⬆️
src/serializers/infer.rs 95.76% <100.00%> (+0.91%) ⬆️
src/serializers/type_serializers/model.rs 86.66% <100.00%> (+6.66%) ⬆️
src/validators/function.rs 99.42% <0.00%> (+0.57%) ⬆️
pydantic_core/core_schema.py 100.00% <0.00%> (+0.75%) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 084c551...4e3cec5. Read the comment docs.

@samuelcolvin samuelcolvin merged commit 0ce0f57 into main Jan 25, 2023
@samuelcolvin samuelcolvin deleted the serialize-enums branch January 25, 2023 16:56
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