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

Add solutions category and resolve bug in combine_components #106

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

ka-sarthak
Copy link
Collaborator

@ka-sarthak ka-sarthak commented Sep 30, 2024

  • Add entry data category for solutions schemas
  • When a solute component is added without any volume, the normalization runs into error:
    Traceback (most recent call last):
    File "/opt/venv/lib/python3.11/site-packages/nomad/normalizing/metainfo.py", line 38, in normalize_section
      normalize(archive, logger)
    File "/opt/venv/lib/python3.11/site-packages/nomad_material_processing/solution/general.py", line 514, in normalize
      self.solvents = self.combine_components(self.solvents, logger)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/venv/lib/python3.11/site-packages/nomad_material_processing/solution/general.py", line 425, in combine_components
      combined_components[comparison_key] = component.m_copy(deep=True)
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/venv/lib/python3.11/site-packages/nomad/metainfo/metainfo.py", line 2394, in m_copy
      sub_sections_copy.append(sub_section.m_copy(deep=True, parent=copy))
                               ^^^^^^^^^^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'm_copy'
    This is an error from MSection.m_copy method. To be resolved in nomad-lab: https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR/-/merge_requests/2127

Copy link
Collaborator

@aalbino2 aalbino2 left a comment

Choose a reason for hiding this comment

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

Thanks, it looks good. Good you figured out this m_copy thing

@ka-sarthak ka-sarthak merged commit edd6285 into main Oct 1, 2024
5 checks passed
@ka-sarthak ka-sarthak deleted the modify-solution-schemas branch October 1, 2024 15:30
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.

2 participants