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

Adoption python pipeline to new namespace #44

Merged

Conversation

Peyman-N
Copy link
Member

@Peyman-N Peyman-N commented Dec 9, 2024

No description provided.

@Peyman-N Peyman-N requested a review from apdavison December 9, 2024 14:51
@Peyman-N Peyman-N changed the title ipeline namespace Adoption python pipeline to new namespace Dec 9, 2024
@@ -85,6 +85,12 @@ def save(self, path, individual_files=False, include_empty_properties=False):
# we first re-add all child nodes to the collection.
# This is probably not the most elegant or fast way to do this, but it is simple and robust.
for node in tuple(self.nodes.values()):

if node.type_.startswith("https://openminds.ebrains.eu/"):
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not the best way to detect the version. Perhaps we should add a property to the collection JSON file when saving, indicating which version of openMINDS it was produced with.

Copy link
Member

@apdavison apdavison left a comment

Choose a reason for hiding this comment

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

I haven't tried the code, but it looks generally good. A few suggestions inline.

@@ -252,3 +261,32 @@ def get_edges(self):
embedded.update(property.get("_embeddedTypes", []))
linked.update(property.get("_linkedTypes", []))
return embedded, linked

def get_module_dict(self,class_module_dict):
Copy link
Member

Choose a reason for hiding this comment

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

I suggest renaming this update_class_to_module_map

@apdavison apdavison merged commit 0085b83 into openMetadataInitiative:pipeline Feb 6, 2025
1 check passed
@Peyman-N Peyman-N deleted the pipeline_namespace branch February 11, 2025 15:26
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