Closed dougiesquire closed 1 year ago
Agh, the autodoc_pydantic
Sphinx extension does not support pydantic v2 and it doesn't look like it will any time soon, see https://github.com/mansenfranzen/autodoc_pydantic/issues/146.
What to do?
autodoc_pydantic
extension, resulting in the API section of the docs being poorly formatted. (Unfortunately, I can't generate a version of the docs atm to demonstrate what this would look like as the docs rely on ecgtools which also requires pydantic updates, see https://github.com/ncar-xdev/ecgtools/pull/164. Yes, we're in a state right now where Intake-ESM and ecgtools are both failing because the other is failing),I tried to disable the autodoc_pydantic
extension and temporarily change the CI doc environment to install ecgtools from https://github.com/ncar-xdev/ecgtools/pull/164 so the docs would build in this PR, but there's another issue with the docs that makes the build fail intermittently.
Instead, here's is a screenshot of the API docs for a pydantic object rendered without the autodoc_pydantic
extension. I think they look fine. Let me know if you agree and I'll finish up this PR.
I tried to disable the
autodoc_pydantic
extension and temporarily change the CI doc environment to install ecgtools from ncar-xdev/ecgtools#164 so the docs would build in this PR, but there's another issue with the docs that makes the build fail intermittently.Instead, here's is a screenshot of the API docs for a pydantic object rendered without the
autodoc_pydantic
extension. I think they look fine. Let me know if you agree and I'll finish up this PR.
Thanks so much @dougiesquire for the hard work here - I think this looks fine and we can proceed!
Ready for review @mgrover1
Note, the docs build is still failing because of:
docs/source/how-to/build-a-catalog-from-timeseries-files.md
. I suggest:
@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.
Change Summary
This PR implements changes required for Intake-ESM to update to the recently-released pydantic v2. I'd appreciate someone taking a close look at this as I'm not a pydantic expert, especially v2.
Related issue number
Closes #617
Checklist