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

Set correct meta->schema value automatically #1323

Merged
merged 4 commits into from Sep 6, 2022

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Sep 5, 2022

This PR adds a config option that tracks whether the reference server is in index or non-index mode, then uses that to correctly set the meta->schema value in that server's responses.

This means that a value no longer needs to be provided to the meta_values function if not necessary (see aiidateam/aiida-optimade#375).

Also tweaks the OpenAPI schema with a formatting change due to dependency updates.

Copy link
Contributor

@JPBergsma JPBergsma left a comment

Choose a reason for hiding this comment

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

I noticed you have not added any tests. Do you think it would be possible/worthwhile to do so ?

@ml-evs
Copy link
Member Author

ml-evs commented Sep 6, 2022

I noticed you have not added any tests. Do you think it would be possible/worthwhile to do so ?

Done!

Copy link
Contributor

@JPBergsma JPBergsma 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.

@codecov
Copy link

codecov bot commented Sep 6, 2022

Codecov Report

Merging #1323 (6655e0c) into master (99f47ee) will decrease coverage by 0.03%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##           master    #1323      +/-   ##
==========================================
- Coverage   91.49%   91.46%   -0.04%     
==========================================
  Files          72       72              
  Lines        4364     4368       +4     
==========================================
+ Hits         3993     3995       +2     
- Misses        371      373       +2     
Flag Coverage Δ
project 91.46% <60.00%> (-0.04%) ⬇️
validator 90.86% <60.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
optimade/server/main_index.py 93.10% <0.00%> (-1.64%) ⬇️
optimade/server/routers/utils.py 97.24% <66.66%> (-0.89%) ⬇️
optimade/server/config.py 93.54% <100.00%> (+0.07%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ml-evs ml-evs merged commit 72d38f8 into master Sep 6, 2022
@ml-evs ml-evs deleted the ml-evs/simplify_schema_meta branch September 6, 2022 09:54
@ml-evs ml-evs added the enhancement New feature or request label Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants