Skip to content
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: split request params #952

Merged
merged 66 commits into from
Oct 18, 2024
Merged

Conversation

VishnuSanal
Copy link
Contributor

@VishnuSanal VishnuSanal commented Aug 26, 2024

Description

This PR fixes #850

Summary

This PR does split request params

PR Checklist

Please ensure that:

  • The PR contains a descriptive title
  • The PR contains a descriptive summary of the changes
  • You build and test your changes before submitting a PR.
  • You have added relevant documentation
  • You have added relevant tests. We prefer integration tests wherever possible

Pre-Commit Instructions:

Copy link

vercel bot commented Aug 26, 2024

@VishnuSanal is attempting to deploy a commit to the sparckles Team on Vercel.

A member of the Team first needs to authorize it.

@VishnuSanal VishnuSanal changed the title feat: [WIP] split request params feat: split request params Aug 28, 2024
@VishnuSanal
Copy link
Contributor Author

@sansyrox, the tests pass here. can you PTAL at the interface + an initial review, if you will. :)

@VishnuSanal VishnuSanal marked this pull request as ready for review August 28, 2024 10:11
Copy link

codspeed-hq bot commented Aug 28, 2024

CodSpeed Performance Report

Merging #952 will not alter performance

Comparing VishnuSanal:split-request-params (a057d05) with main (74cdabf)

Summary

✅ 116 untouched benchmarks

🆕 29 new benchmarks

Benchmarks breakdown

Benchmark main VishnuSanal:split-request-params Change
🆕 test_openapi_query_params N/A 6.4 ms N/A
🆕 test_split_request_params_get_body[split_request_typed-async] N/A 4.9 ms N/A
🆕 test_split_request_params_get_body[split_request_typed-sync] N/A 4.9 ms N/A
🆕 test_split_request_params_get_body[split_request_untyped-async] N/A 4.9 ms N/A
🆕 test_split_request_params_get_body[split_request_untyped-sync] N/A 4.9 ms N/A
🆕 test_split_request_params_get_combined[split_request_typed-async] N/A 5.1 ms N/A
🆕 test_split_request_params_get_combined[split_request_typed-sync] N/A 5.1 ms N/A
🆕 test_split_request_params_get_combined[split_request_untyped-async] N/A 5.1 ms N/A
🆕 test_split_request_params_get_combined[split_request_untyped-sync] N/A 5.1 ms N/A
🆕 test_split_request_params_get_combined_failure[async] N/A 5.1 ms N/A
🆕 test_split_request_params_get_combined_failure[sync] N/A 5 ms N/A
🆕 test_split_request_params_get_headers[split_request_typed-async] N/A 4.8 ms N/A
🆕 test_split_request_params_get_headers[split_request_typed-sync] N/A 4.8 ms N/A
🆕 test_split_request_params_get_headers[split_request_untyped-async] N/A 4.8 ms N/A
🆕 test_split_request_params_get_headers[split_request_untyped-sync] N/A 4.8 ms N/A
🆕 test_split_request_params_get_method[split_request_typed-async] N/A 4.8 ms N/A
🆕 test_split_request_params_get_method[split_request_typed-sync] N/A 4.8 ms N/A
🆕 test_split_request_params_get_method[split_request_untyped-async] N/A 4.8 ms N/A
🆕 test_split_request_params_get_method[split_request_untyped-sync] N/A 4.8 ms N/A
🆕 test_split_request_params_get_path_params[split_request_typed-async] N/A 4.9 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@sansyrox
Copy link
Member

Hey @VishnuSanal 👋

I really like the current implementation. Great job ✨ But I have a few follow ups. I will share them in a few hours

robyn/router.py Outdated Show resolved Hide resolved
@VishnuSanal
Copy link
Contributor Author

VishnuSanal commented Aug 31, 2024

  • create custom type aliases & check them in the funciton signature

robyn/robyn.pyi Outdated
@@ -89,7 +89,7 @@ class Url:
class Identity:
claims: dict[str, str]

class QueryParams:
class RustQueryParams:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be just QueryParams. No?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VishnuSanal , any update here?

robyn/types.py Outdated Show resolved Hide resolved
robyn/types.py Outdated Show resolved Hide resolved
robyn/types.py Outdated Show resolved Hide resolved
src/types/mod.rs Outdated Show resolved Hide resolved
src/types/identity.rs Outdated Show resolved Hide resolved
@sansyrox
Copy link
Member

sansyrox commented Oct 6, 2024

Hey @VishnuSanal , some more work is needed here. Also , could you have a look at the conflicts?

robyn/types.py Outdated Show resolved Hide resolved
src/types/multimap.rs Outdated Show resolved Hide resolved
src/types/multimap.rs Outdated Show resolved Hide resolved
Copy link
Member

@sansyrox sansyrox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 😄 Great job ✨

@VishnuSanal
Copy link
Contributor Author

why is this not merged yet? 🤔

@sansyrox sansyrox merged commit 42f87f8 into sparckles:main Oct 18, 2024
60 checks passed
@VishnuSanal VishnuSanal deleted the split-request-params branch October 18, 2024 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants