-
Notifications
You must be signed in to change notification settings - Fork 233
docs: explain how to set document config #1773
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
Conversation
Signed-off-by: Johannes Messner <[email protected]>
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #1773 +/- ##
=======================================
Coverage 85.00% 85.00%
=======================================
Files 134 134
Lines 8845 8845
=======================================
Hits 7519 7519
Misses 1326 1326
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Johannes Messner <[email protected]>
@samsja what will be the effect of pydantic v2 on this? |
this way will still be compatible with pydantic v2 but pydantic will show a warning saying it is deprecated. I suggest we update the docs after the merge |
|
||
|
||
class MyDoc(BaseDoc): | ||
class Config(BaseDoc.Config): |
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.
Minor comment. In pydantic v1, we only had to pass a class Config
in the model. It didn't need to be inherited from another config class.
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.
Yes, in pydantic that is not needed. But we set some pydantic configs in BaseDoc
, so to preserve them, inheritance is needed. We could probably find some magic way around this, but until then this is the safest option imo.
📝 Docs are deployed on https://ft-docs-document-config--jina-docs.netlify.app 🎉 |
there is a small things that users need to be aware of when setting configs, so i am explaining that here.
TODO: small testdone