Replies: 1 comment 6 replies
-
The alternative, which would be a big re-write would be to somehow make hierarchy not just a list, but something more complex e.g. hierarchy = [
Home,
(DefaultWP, {('1',): WP1, ('2',): WP2}),
(DefaultSample, {('1', '1'): WP1_1, ('2', '7'): WP1_7}),
(DefaultDataSet, {('5', '3', '1'): DSet5_3_1})
] |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Because the hierarchy cannot be nested all objects at each level need to have the same implementation.
This is fine, except sometimes a Sample in one Experiment may require some very different functionality in another.
One could add additional methods in their project.py, but this leaves the class definition a bit cluttered and unsafe.
One solution would be to add an attribute like
spec
short for specialist.We then add a
spec
decorator that looks something like:The arguments to spec would specify which ids are allowed access to this method. This could even do fancy Regex things.
Then through some internal magic:
Something along these lines.
Alternitve implementations I'm sure would be possible.
Beta Was this translation helpful? Give feedback.
All reactions