-
-
Notifications
You must be signed in to change notification settings - Fork 670
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
✨ feat: json and bytes field support in options #985
base: master
Are you sure you want to change the base?
✨ feat: json and bytes field support in options #985
Conversation
Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
📝 Docs preview for commit 137e1bc at: https://5f9b3d47.typertiangolo.pages.dev |
Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
📝 Docs preview for commit 0f5a1b3 at: https://ae7752e5.typertiangolo.pages.dev |
📝 Docs preview for commit 432a48c at: https://b02f882e.typertiangolo.pages.dev |
Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
📝 Docs preview for commit 31e7623 at: https://6e9177ee.typertiangolo.pages.dev Modified Pages |
Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
📝 Docs preview for commit f83e798 at: https://4dcf841b.typertiangolo.pages.dev Modified Pages |
@svlandeg it's ok to ignore coverage on newly created class? |
No, in general we really need all the code in the main modules to be fully tested 🙏 |
📝 Docs preview for commit fdb7bb4 at: https://4a6543f8.typertiangolo.pages.dev Modified Pages |
📝 Docs preview for commit 114b761 at: https://10931053.typertiangolo.pages.dev Modified Pages |
I have added tests for newly created class coverage is 100% again :) |
If changes are Ok so far I can work on Pydantic support, Or move Pydantic support in another PR? |
HI @mhkarimi1383! We haven't yet been able to review this PR in detail. When we do, we'll update here. No need to ping individual maintainers in the meantime 😉 In terms of adding more functionality, it's always best to open separate PRs for distinct functionality. It makes the review process much easier if one PR deals with one "atomic" change. Do have a look at existing PRs - if I recall correctly there's already a few PRs open with proposals for Pydantic support. |
Hi
Some times there is a need to have results as
bytes
(that is builtin supported byclick.STRING
)and also there is a need of decoding entire value as an json object (useful when some params are too dynamic or getting that option in a prompt). I wanted to also add pydantic support (for both single option as json and all of the options in a single model) there and also use orjson (by checking if that's installed as an optional dependency), If that's Ok.