Skip to content

basic tidy-ups to core_schema.py #713

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

Conversation

davidhewitt
Copy link
Contributor

@davidhewitt davidhewitt commented Jun 28, 2023

Change Summary

This is a very basic first pass at improving the documentation for core_schema.py.

There's a lot of members and they're poorly grouped. I started playing around with sort order but it created a lot of pain in a big diff, so I backed out for now. I think I might experiment in a future PR with grouping into submodules which can then have better meaningful grouping.

Related issue number

N/A

Checklist

  • Unit tests for the changes exist
  • Documentation reflects the changes where applicable
  • Pydantic tests pass with this pydantic-core (except for expected changes)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

Selected Reviewer: @samuelcolvin

@linear
Copy link

linear bot commented Jun 28, 2023

@davidhewitt
Copy link
Contributor Author

please review

@codspeed-hq
Copy link

codspeed-hq bot commented Jun 28, 2023

CodSpeed Performance Report

Merging #713 davidhewitt/pyd-122-review-public-module-docstrings-pydantic_corecore_schemapy (3a82f1e) will degrade performances by 10.33%.

Summary

🔥 0 improvements
❌ 1 regressions
✅ 124 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main davidhewitt/pyd-122-review-public-module-docstrings-pydantic_corecore_schemapy Change
test_set_of_ints_core_json_duplicates 4.8 ms 5.4 ms -10.33%

@codecov-commenter
Copy link

Codecov Report

Merging #713 (3a82f1e) into main (54daab7) will not change coverage.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #713   +/-   ##
=======================================
  Coverage   93.71%   93.71%           
=======================================
  Files          99       99           
  Lines       13838    13838           
  Branches       25       25           
=======================================
  Hits        12968    12968           
  Misses        864      864           
  Partials        6        6           
Impacted Files Coverage Δ
python/pydantic_core/core_schema.py 96.63% <100.00%> (ø)

Continue to review full report in Codecov by Sentry.

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

Copy link
Member

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

LGTM (not sure if you want to work on this more, so leaving open)

FWIW, I'm happy with the order of things here, although somewhat subjective I think it makes sense. that said, I'd be happy to consider moving groups of methods into separate files.

@davidhewitt
Copy link
Contributor Author

I will merge this now and then consider the grouping as a possible follow-up.

@davidhewitt davidhewitt merged commit 2a943a3 into main Jul 3, 2023
@davidhewitt davidhewitt deleted the davidhewitt/pyd-122-review-public-module-docstrings-pydantic_corecore_schemapy branch July 3, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants