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

Check for carbon in elements for Hill #586

Merged

Conversation

CasperWA
Copy link
Member

@CasperWA CasperWA commented Nov 3, 2020

Fixes #585.

If carbon is not present, the elements should be sorted alphabetically (including hydrogen).

This changes a test to the corrected definition of Hill notation.

If carbon is not present, the elements should be sorted alphabetically
(including hydrogen).
@CasperWA CasperWA requested a review from ml-evs November 3, 2020 14:23
@codecov
Copy link

codecov bot commented Nov 3, 2020

Codecov Report

Merging #586 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #586      +/-   ##
==========================================
- Coverage   91.77%   91.77%   -0.01%     
==========================================
  Files          62       62              
  Lines        3222     3220       -2     
==========================================
- Hits         2957     2955       -2     
  Misses        265      265              
Flag Coverage Δ
project 91.77% <100.00%> (-0.01%) ⬇️
validator 64.68% <0.00%> (+0.07%) ⬆️

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

Impacted Files Coverage Δ
optimade/models/structures.py 95.75% <100.00%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d48b7a8...c596ddc. Read the comment docs.

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for spotting this

@ml-evs ml-evs self-requested a review November 3, 2020 14:35
@ml-evs
Copy link
Member

ml-evs commented Nov 3, 2020

Actually, why don't the tests I just added fail, e.g.

{"chemical_formula_hill": "GeHSi"},
"Elements in 'chemical_formula_hill' must appear in Hill order: ['H', 'Ge', 'Si'] not ['Ge', 'H', 'Si']",
),

@ml-evs
Copy link
Member

ml-evs commented Nov 3, 2020

Actually, why don't the tests I just added fail, e.g.

{"chemical_formula_hill": "GeHSi"},
"Elements in 'chemical_formula_hill' must appear in Hill order: ['H', 'Ge', 'Si'] not ['Ge', 'H', 'Si']",
),

Okay mb, I see that test was updated (it just looked different to my local version)

@CasperWA
Copy link
Member Author

CasperWA commented Nov 3, 2020

Actually, why don't the tests I just added fail, e.g.

{"chemical_formula_hill": "GeHSi"},
"Elements in 'chemical_formula_hill' must appear in Hill order: ['H', 'Ge', 'Si'] not ['Ge', 'H', 'Si']",
),

Because I updated this exact test (as mentioned in the OP and found in the git diff).

@CasperWA CasperWA merged commit e9a2b22 into Materials-Consortia:master Nov 3, 2020
@CasperWA CasperWA deleted the fix_585_fix-hill-notation branch November 3, 2020 14:41
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.

Hill notation wrong (still)
2 participants