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
Make use of Sphinx inventories for cross references #8682
Conversation
@@ -51,7 +51,7 @@ except ValidationError as e: | |||
Pydantic supports the following [datetime](https://docs.python.org/library/datetime.html#available-types) | |||
types: | |||
|
|||
### `datetime.datetime` | |||
### [`datetime.datetime`][] |
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.
Not sure you'd want references directly on the headings. If so, I can remove them
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.
🤷♀️ I think it'd be nice! Looks good.
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.
Just checking - have you built the docs locally to confirm that the [
datetime.datetime][]
style of references correctly redirects to the stdlib python docs?
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.
These manual references will produce warnings if they can't be resolved, failing MkDocs builds in strict mode, so the checking is kinda automated 🙂
CodSpeed Performance ReportMerging #8682 will not alter performanceComparing Summary
|
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.
Looks great so far! Thanks for your work on this 🚀 .
@@ -174,6 +174,8 @@ plugins: | |||
merge_init_into_class: true |
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.
Could be nice to add these too:
parameter_headings: true
show_signature_annotations: true
signature_crossrefs: true
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.
For parameter headings, you'll have to install the Insiders version of mkdocstrings-python, similar to how you install mkdocs-material:
pdm run python -m pip install https://files.scolvin.com/${MKDOCS_TOKEN}/mkdocs_material-9.4.2+insiders.4.42.0-py3-none-any.whl
https://mkdocstrings.github.io/python/insiders/installation/
Let me know if any other user (Pydantic team member or bot) needs to be added to the @pawamoy-insiders organization 🙂
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.
Added:
show_signature_annotations: true
signature_crossrefs: true
@@ -51,7 +51,7 @@ except ValidationError as e: | |||
Pydantic supports the following [datetime](https://docs.python.org/library/datetime.html#available-types) | |||
types: | |||
|
|||
### `datetime.datetime` | |||
### [`datetime.datetime`][] |
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.
🤷♀️ I think it'd be nice! Looks good.
Do you want to continue to make progress on this PR, or do this in chunks? |
Maybe better in chunks, merging this will allow other PRs to make use of this feature |
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.
Amazing, tysm!
Fixes #8664
This is far from complete but can give you an overview.