Skip to content

Conversation

@galactikvoyager
Copy link
Contributor

Started to work on

  • env_node.py
  • environment.py
  • base_envvar.py

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.
Copy link
Member

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

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:
Copy link
Member

Choose a reason for hiding this comment

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

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()
Copy link
Member

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

Same here those need to be defined.


"""
config = ConfigObj(indent_type=' ', encoding='utf-8')
config.update(self.node.preferences_from_members())
Copy link
Member

Choose a reason for hiding this comment

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

node needs to be defined.

#: Refrence to the parent env_var.
parent = ForwardTyped(lambda: BaseEnvVar)

value = Value().tag(pref=True)
Copy link
Member

Choose a reason for hiding this comment

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

Will need doc.

DEP_TYPE = 'exopy.envvar'


class BaseEnvVar(Atom):
Copy link
Member

Choose a reason for hiding this comment

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

Should inherit from HasPrefsAtom


metadata = Dict().tag(pref=True)

def preferences_from_members(self):
Copy link
Member

Choose a reason for hiding this comment

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

Implemented in HasPrefsAtom

Dictionary holding the necessary classes needed when rebuilding..

"""
raise NotImplementedError()
Copy link
Member

Choose a reason for hiding this comment

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

Can be implemented using update_members_from_preferences from HasPrefsAtom

Base automatically changed from master to main January 19, 2021 10:00
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.

3 participants