Skip to content

[WIP] Dynamically reevaluate dependencies on subobjects#411

Closed
philippjfr wants to merge 2 commits into
masterfrom
410_dynamic_depends
Closed

[WIP] Dynamically reevaluate dependencies on subobjects#411
philippjfr wants to merge 2 commits into
masterfrom
410_dynamic_depends

Conversation

@philippjfr
Copy link
Copy Markdown
Member

Implements #410

Comment thread param/parameterized.py
(p.inst or p.cls).param.watch(_m_caller(self, n), p.name, p.what, queued=queued)

self.initialized = True
key = (n, p.name, p.what)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Need to make sure this key is sufficient to uniquely identify a callback.

Comment thread param/parameterized.py Outdated
obj.__dict__[self._internal_name] = val

self._post_setter(obj, val)
if hasattr(val, '_setup_dependencies'):
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ideally would have a better condition here, but can't do isinstance(val, Parameterized) since this is evaluated before Parameterized exists.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense.

@philippjfr philippjfr force-pushed the 410_dynamic_depends branch from d47325d to 0d47be5 Compare May 14, 2020 23:41
@coveralls
Copy link
Copy Markdown

coveralls commented May 14, 2020

Coverage Status

Coverage decreased (-0.06%) to 76.388% when pulling 84a10cd on 410_dynamic_depends into a8e34b2 on master.

@tonyfast
Copy link
Copy Markdown
Contributor

@philippjfr can you merge or close this pr.

@tonyfast tonyfast added this to the 2.0 milestone Aug 31, 2020
@philippjfr philippjfr closed this Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants