-
Notifications
You must be signed in to change notification settings - Fork 17
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
Migrate remaining schemas to pydantic 2 #333
Migrate remaining schemas to pydantic 2 #333
Conversation
aa5fb91
to
6aeab3a
Compare
@gotmax23 I managed to convert all pydantic v1 models to pydantic v2. That also means that ansible-community/antsibull-core#169 is sufficient as-is and does not need more changes for the documentation schemas. |
src/antsibull_docs/process_docs.py
Outdated
# | ||
# Since our attribute names are all lower-case and our class | ||
# names all start with an upper-case letter, this effectively | ||
# removes all class names from the location sequence. |
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.
Hmm, the reasoning doesn't work due to how options
etc. work - the keys there are arbitrary strings that users provide. There exist modules whose option names are starting with upper-case letters :(
For example, amazon.aws.elb_application_lb has a (nested) option listeners.DefaultActions[].TargetGroupName
.
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.
Fixed in adcc19f.
5371006
to
7c51156
Compare
b9e3722
to
ad5038c
Compare
Looks like everything except coverage (with a less than 1% difference...) is passing. I'll do one last look through, and also try to run a test package docs build in ansible-documentation's CI. |
|
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.
You've addressed my feedback, and I looked at this pretty closely the first time, so ACK, pending the new antsibull-core release and version pin updates.
… by combining them.
Co-authored-by: Maxwell G <[email protected]>
Co-authored-by: Maxwell G <[email protected]>
59f3a43
to
8694c67
Compare
@gotmax23 thanks for reviewing this! |
Currently contains #331. Will rebase once that has been merged.
TEMP
commit once Pydantic: add helper, generalize forbid extra code antsibull-core#169 has been merged.TEMP
commit once antsibull-core 3.2.0 is out.