Skip to content

Commit 5fbc241

Browse files
committed
Merge branch 'pipeline' into fairgraph-compat
* pipeline: Make the class registry reusable by other packages (e.g., fairgraph) by removing the requirement to have "openminds" in the class path. # Conflicts: # pipeline/src/registry.py
2 parents b4bab49 + dd6704c commit 5fbc241

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pipeline/src/registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def register_class(target_class: Registry):
2424
if target_class.__module__.startswith("openminds"):
2525
parts = target_class.__module__.split(".")
2626
name = ".".join(parts[0:3] + [target_class.__name__]) # e.g. openminds.latest.core.Dataset
27-
# taking the first 3 parts is artbitrary, should add an attribute to each class
28-
# with its preferred import name
27+
# taking the first 3 parts is arbitrary, we could instead set the
28+
# attribute "preferred_import_path" on each class, with its preferred import name.
2929
# e.g. for `openminds.latest.core.research.protocol_execution.ProtocolExecution`
3030
# the preferred import name is `openminds.latest.core.ProtocolExecution`
3131
# because the intermediate directory structure is an implementation detail

0 commit comments

Comments
 (0)