-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Adopt pydantic-settings docs for Pydantic V2 #18
Conversation
2b0ad37
to
e6e28da
Compare
Codecov ReportPatch and project coverage have no change.
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #18 +/- ##
=======================================
Coverage 96.00% 96.00%
=======================================
Files 5 5
Lines 275 275
Branches 67 67
=======================================
Hits 264 264
Misses 10 10
Partials 1 1 ☔ View full report in Codecov by Sentry. |
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.
Otherwise looks like a great start.
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 move these inline, into the markdown files.
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've converted these examples to be compatible with V2
and added them here in examples
directory to be compatible with Pydantic documents.
Also, I've added them directly in index.md
as well.
When we decided about the docs repo and the way that we want to handle them we can we can use them directly.
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.
README.md
Outdated
@@ -5,3 +5,5 @@ | |||
[![license](https://img.shields.io/github/license/pydantic/pydantic-settings.svg)](https://github.com/pydantic/pydantic-settings/blob/main/LICENSE) | |||
|
|||
**Work in Progress**, see https://github.com/pydantic/pydantic/pull/4492 | |||
|
|||
{!docs/index.md!} |
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 don't think we should include this, since it won't work in github.
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.
My plan was to make new docs available for the users because the old docs are outdated and we need to somehow share the new docs with the user.
Removed!
docs/index.md
Outdated
""" | ||
``` | ||
|
||
<!--- {!.tmp_examples/settings_main.md!} ---> |
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.
As you can see the example code is injected directly here in the md file and this line is commented. Whenever we decided about the docs, we can uncomment this line and remove the above example code
883caf8
to
6a29a7d
Compare
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.
we need to remove the .py
files and the comments.
At some point we should enable pytest-examples
to test the docs examples.
docs/index.md
Outdated
|
||
model_config = ConfigDict(case_sensitive=True) | ||
``` | ||
<!--- {!.tmp_examples/settings_case_sensitive.md!} ---> |
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 we should remove these.
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 guess we can remove all these files now that they're copied into index.md
6a29a7d
to
86c9e02
Compare
LGTM, please enable auto-merge if you're happy with this. |
@samuelcolvin I just create an issue for |
It's based on the change on #17 to make pydantic-settings compatible with Pydantic V2.
All the docs and examples changed to be compatible