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

Factorize getting required request parameters #1965

Merged
merged 9 commits into from
Oct 12, 2023

Conversation

albertvillanova
Copy link
Member

Factorize getting the required request parameters dataset, config, split, query and where (from the service admin and the endpoints /rows, /search and /filter) to libapi.
Additionally, align their error messages.

@codecov-commenter
Copy link

codecov-commenter commented Oct 11, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (84d048b) 85.44% compared to head (a37293e) 86.53%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1965      +/-   ##
==========================================
+ Coverage   85.44%   86.53%   +1.08%     
==========================================
  Files          23       67      +44     
  Lines         907     3497    +2590     
==========================================
+ Hits          775     3026    +2251     
- Misses        132      471     +339     
Flag Coverage Δ
libs_libapi 88.32% <100.00%> (?)
services_admin 86.11% <71.42%> (+0.66%) ⬆️
services_api 86.79% <ø> (?)
services_rows 84.90% <100.00%> (?)
services_search 79.86% <63.63%> (?)
services_sse-api 94.16% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
libs/libapi/src/libapi/request.py 100.00% <100.00%> (ø)
libs/libapi/tests/test_request.py 100.00% <100.00%> (ø)
services/admin/src/admin/routes/dataset_status.py 91.66% <100.00%> (-0.34%) ⬇️
services/rows/src/rows/routes/rows.py 56.52% <100.00%> (ø)
services/search/src/search/routes/search.py 59.75% <100.00%> (ø)
...ervices/admin/src/admin/routes/dataset_backfill.py 57.14% <75.00%> (+5.41%) ⬆️
...es/admin/src/admin/routes/dataset_backfill_plan.py 56.00% <75.00%> (+6.00%) ⬆️
...ervices/admin/src/admin/routes/recreate_dataset.py 50.00% <75.00%> (+3.65%) ⬆️
services/admin/src/admin/routes/force_refresh.py 66.66% <40.00%> (+3.92%) ⬆️
services/search/src/search/routes/filter.py 50.61% <33.33%> (ø)

... and 40 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Oct 11, 2023

The documentation is not available anymore as the PR was closed or merged.

@severo severo requested a review from AndreaFrancis October 11, 2023 15:16
Copy link
Contributor

@AndreaFrancis AndreaFrancis left a comment

Choose a reason for hiding this comment

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

Nice!

@albertvillanova albertvillanova merged commit d24fc6c into main Oct 12, 2023
15 of 16 checks passed
@albertvillanova albertvillanova deleted the factorize-request-parameters-2 branch October 12, 2023 05:58
AndreaFrancis pushed a commit that referenced this pull request Oct 12, 2023
* Extract function get_request_parameter_dataset

* Move get_request_parameter_dataset to libapi

* Factorize get_request_parameter_config

* Factorize get_request_parameter_split

* Factorize get_required_request_parameter

* Use get_required_request_parameter for query/where

* Remove redundant error messages

* Update openapi.json

* Test get_required_request_parameter
AndreaFrancis added a commit that referenced this pull request Oct 12, 2023
* clean duckdb index files

* refactor to use only one function for cleaning

* minor fixes

* Apply suggestions from code review

Co-authored-by: Sylvain Lesage <[email protected]>

* Factorize getting required request parameters (#1965)

* Extract function get_request_parameter_dataset

* Move get_request_parameter_dataset to libapi

* Factorize get_request_parameter_config

* Factorize get_request_parameter_split

* Factorize get_required_request_parameter

* Use get_required_request_parameter for query/where

* Remove redundant error messages

* Update openapi.json

* Test get_required_request_parameter

* Remove duplicate admin utils (#1970)

* Delete duplicate admin get_json_ok_response

* Use libapi get_json_api_error_response in admin

* Delete duplicate admin EXPOSED_HEADERS

* Remove duplicate admin Endpoint

* Remove duplicate admin are_valid_parameters

* Remove unused admin utils

* refactor directory env for cleaning

* minor changes

* fix style

---------

Co-authored-by: Sylvain Lesage <[email protected]>
Co-authored-by: Albert Villanova del Moral <[email protected]>
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.

4 participants