-
Notifications
You must be signed in to change notification settings - Fork 14
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
Pydantic for Aeroval setupclasses.py #1017
Conversation
Designed to close #1031 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main-dev #1017 +/- ##
============================================
- Coverage 79.27% 79.15% -0.12%
============================================
Files 109 109
Lines 19023 19080 +57
============================================
+ Hits 15080 15103 +23
- Misses 3943 3977 +34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Marking this as ready for review but I would really appreciate it if I could get some feedback on some of the implementation details. Starting lines 308 and 336 in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly minor changes. The classes still mix data and behavior, but changing that is out of the scope of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make sure that typing_extensions
is an explicit dependency.
Accordig to the typing_extensions changelog any version after 4.0.1 should work.
On pyproject.toml
you'll need to add the following line
dependencies = [
[...]
# python < 3.11
'tomli>=2.0.1; python_version < "3.11"',
'importlib-resources>=5.10; python_version < "3.11"',
+ 'typing-extensions>=4.0.1; python_version < "3.11"',
The equivalent line on pyaerocom_env.yml
would be
dependencies:
[...]
## python < 3.11
- tomli >=2.0.1
- importlib-resources >=5.10
+ - typing-extensions >=4.0.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Playing with pydantic to see what structure in pyaerocom/aeroval/setupclasses.py can be simplified / flattened.