Conversation
Started to work on - [ ] env_node.py - [ ] environment.py - [ ] base_envvar.py
| @@ -0,0 +1,176 @@ | |||
| # -*- coding: utf-8 -*- | |||
| # ----------------------------------------------------------------------------- | |||
| # Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details. | |||
There was a problem hiding this comment.
The copyright should not predate the creation of the file ideally.
| """ | ||
| #: List of all the children of the env_var. The list should not be | ||
| #: manipulated directly by user code. | ||
| #: The tag 'child' is used to mark that a member can contain child env_var |
There was a problem hiding this comment.
The tag is not needed in that case, since we ruled out the need for multiple child location.
|
|
||
| # In the absence of a root envvar do nothing else than inserting the | ||
| # child. | ||
| if self.has_root: |
There was a problem hiding this comment.
has_root does not exist and was removed from ComplexTask as being an horror, if you need to add a root element (not sure) the check should simply check if it None or not.
| # child. | ||
| if self.has_root: | ||
| child.depth = self.depth + 1 | ||
| child.path = self._child_path() |
There was a problem hiding this comment.
Those attributes need to be defined.
| # Give him its root so that it can proceed to any child | ||
| # registration it needs to. | ||
| child.parent = self | ||
| child.root = self.root |
There was a problem hiding this comment.
Same here those need to be defined.
|
|
||
| """ | ||
| config = ConfigObj(indent_type=' ', encoding='utf-8') | ||
| config.update(self.node.preferences_from_members()) |
There was a problem hiding this comment.
node needs to be defined.
| #: Refrence to the parent env_var. | ||
| parent = ForwardTyped(lambda: BaseEnvVar) | ||
|
|
||
| value = Value().tag(pref=True) |
| DEP_TYPE = 'exopy.envvar' | ||
|
|
||
|
|
||
| class BaseEnvVar(Atom): |
There was a problem hiding this comment.
Should inherit from HasPrefsAtom
|
|
||
| metadata = Dict().tag(pref=True) | ||
|
|
||
| def preferences_from_members(self): |
There was a problem hiding this comment.
Implemented in HasPrefsAtom
| Dictionary holding the necessary classes needed when rebuilding.. | ||
|
|
||
| """ | ||
| raise NotImplementedError() |
There was a problem hiding this comment.
Can be implemented using update_members_from_preferences from HasPrefsAtom
Started to work on