emmet icon indicating copy to clipboard operation
emmet copied to clipboard

Configure query on request

Open yang-ruoxi opened this issue 1 year ago • 2 comments

summary

  • Added a method in GlobalHeaderProcessor to translate the header to a license query
  • Added None to as allowed license field in LicenseQuery
  • Use the the configure_query_on_request method in materials/core and materials/summary resources

Note that before we actually put in the actual ACLs for our users, the api and website will behave the same. After we update the data, we will prompt the users to accept terms again, and the ACLs will be automatically assigned and this header thing will take effect.

yang-ruoxi avatar Aug 16 '24 21:08 yang-ruoxi

@yang-ruoxi the tests are running again. The latest error is from mypy:

Run python3.11 -m mypy --namespace-package emmet-api/emmet
emmet-api/emmet/api/core/global_header.py:29: error: Unexpected keyword argument "license" for "query" of "QueryOperator"  [call-arg]
/home/runner/.local/lib/python3.11/site-packages/maggma/api/query_operator/core.py:15: note: "query" of "QueryOperator" defined here

tschaume avatar Sep 19 '24 16:09 tschaume

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 72.36%. Comparing base (7b8181e) to head (d97e3ef).

Files with missing lines Patch % Lines
.../api/routes/materials/materials/query_operators.py 0.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1073      +/-   ##
==========================================
- Coverage   72.38%   72.36%   -0.02%     
==========================================
  Files          77       77              
  Lines        5127     5128       +1     
==========================================
  Hits         3711     3711              
- Misses       1416     1417       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Sep 26 '24 19:09 codecov-commenter