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

This PR reflects an old change in the data model, where material identifiers become attributes instead of a list of subnodes. #434

Merged
merged 12 commits into from
Mar 11, 2024

Conversation

InnocentBug
Copy link
Collaborator

@InnocentBug InnocentBug commented Mar 1, 2024

Description

This removes the indentifier from Materials.
And instead offers each individual identifier as an attribute.

This is maybe a breaking change, but it reflects the updated data model much better.
And simplifies the code.

Changes

Known Issues

Notes

Checklist

  • My name is on the list of contributors (CONTRIBUTORS.md) in the pull request source branch.
  • I have updated the documentation to reflect my changes.
  • My code changes have been verified by automated tests and pass all relevant test scenarios.

@InnocentBug InnocentBug self-assigned this Mar 1, 2024
Copy link

trunk-io bot commented Mar 1, 2024

Merging to develop in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@InnocentBug InnocentBug marked this pull request as ready for review March 8, 2024 19:27
@InnocentBug InnocentBug requested a review from duboyal March 8, 2024 19:27
# TODO add proper typing in future, using Any for now to avoid circular import error
component: List["Material"] = field(default_factory=list)
process: Optional[Process] = None
property: List[Any] = field(default_factory=list)
parent_material: Optional["Material"] = None
computational_forcefield: Optional[Any] = None
keyword: List[str] = field(default_factory=list)
amino_acid: Optional[str] = None
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

❤️


@classmethod
@beartype
def _from_json(cls, json_dict: Dict):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

With the change, we can delete all of this complication.

@InnocentBug InnocentBug requested a review from Ardi028 March 11, 2024 19:19
@InnocentBug InnocentBug merged commit be6091d into develop Mar 11, 2024
13 checks passed
@InnocentBug InnocentBug deleted the material-identifier branch March 11, 2024 22:12
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