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

Updates for pydantic v2 #164

Merged
merged 4 commits into from
Jul 7, 2023
Merged

Conversation

dougiesquire
Copy link
Collaborator

Change Summary

This PR implements changes required for ecgtools to update to the recently-released pydantic v2. Test are still failing because Intake-ESM also requires changes to update to pydantic v2 (see intake/intake-esm#619).

Unfortunately the autodoc_pydantic Sphinx extension does not support pydantic v2. Thus the docs build is also failing.

It doesn't look like autodoc_pydantic will support pydantic v2 any time soon (see mansenfranzen/autodoc_pydantic#146) so the API section of the docs will potentially be poorly formatted for a while if we want to update ecgtools and Intake-ESM to use pydantic v2.

Another option is to pin pydantic<2.0 in both ecgtools and Intake-ESM, but that has it's own (probably worse?) problems.

Related issue number

Closes #161

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI (Intake-ESM needs updated also)

@dougiesquire
Copy link
Collaborator Author

The tests and docs build are failing because of the pydantic changes required in Intake-ESM.

As I said in intake/intake-esm#619, I suggest:

@mgrover1 mgrover1 merged commit e1f97a2 into ncar-xdev:main Jul 7, 2023
@dougiesquire dougiesquire deleted the 161_pydantic_updates branch July 7, 2023 02:15
@mansenfranzen
Copy link

@dougiesquire You can now test the new autodoc_pydantic version supporting pydantic v2 via pip install autodoc_pydantic==2.0.0. The dev docs already showcase v2 support (see here). Migration guide is available here.

Any feedback is more than appreciated. The current autodoc_pydantic version 2.0.0 on pypi remains yanked for one week until final release.

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.

[Bug]: Updates needed for pydantic v2
3 participants