emmet
emmet copied to clipboard
Configure query on request
summary
- Added a method in
GlobalHeaderProcessorto translate the header to a license query - Added
Noneto as allowed license field inLicenseQuery - Use the the
configure_query_on_requestmethod 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 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
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.