Build OPTIMADE fields according to supplied fields#189
Open
CasperWA wants to merge 3 commits intoaiidateam:developfrom
Open
Build OPTIMADE fields according to supplied fields#189CasperWA wants to merge 3 commits intoaiidateam:developfrom
CasperWA wants to merge 3 commits intoaiidateam:developfrom
Conversation
Since the command will _always_ recalculate fields if already present, this is more appropriate.
New `--minimized-fields` option for `aiida-optimade init`. This will try to avoid calculating big-valued OPTIONAL fields. To ensure this, all translator field methods have gotten a new property `store` on whether the calculated field should be stored in the `optimade` extra or not. This is to be able to calculate some fields that depend on others (like `structure_features`), but still _only_ saving the value of `structure_features` and not the others. Specifically for `structure_features` a post-treatment is needed to ensure the correct features are set/unset.
Build attributes only with supplied "desired" fields. This ensures the `-m/--minimized-fields` option for `aiida-optimade init` works as intended.
ecc9bf1 to
88e7654
Compare
Codecov Report
@@ Coverage Diff @@
## develop #189 +/- ##
===========================================
+ Coverage 90.51% 90.61% +0.10%
===========================================
Files 30 30
Lines 1223 1268 +45
===========================================
+ Hits 1107 1149 +42
- Misses 116 119 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #188
The
build_attributesmapper function now builds only the "desired" attributes, ensuring a new-m/--minimized-fieldsoption foraiida-optimade initwill work.The new option builds OPTIMADE fields for all but
cartesian_site_positions,species_at_sitesandnsites.