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

Configure query on request #1073

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

yang-ruoxi
Copy link
Member

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.

@tschaume
Copy link
Member

@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-commenter
Copy link

codecov-commenter commented Sep 26, 2024

Codecov Report

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

Project coverage is 90.38%. Comparing base (7c46d98) to head (8accd12).
Report is 35 commits behind head on main.

Files with missing lines Patch % Lines
.../api/routes/materials/materials/query_operators.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1073      +/-   ##
==========================================
- Coverage   90.39%   90.38%   -0.02%     
==========================================
  Files         147      147              
  Lines       14406    14409       +3     
==========================================
  Hits        13023    13023              
- Misses       1383     1386       +3     

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

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