Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/artiq
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1cb8f642b4d8
Choose a base ref
...
head repository: m-labs/artiq
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 73bbe2ae661a
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Sep 7, 2016

  1. Copy the full SHA
    5fbcdac View commit details
  2. RELEASE_NOTES: clarify

    sbourdeauducq committed Sep 7, 2016
    Copy the full SHA
    73bbe2a View commit details
Showing with 14 additions and 2 deletions.
  1. +4 −1 RELEASE_NOTES.rst
  2. +10 −1 artiq/language/environment.py
5 changes: 4 additions & 1 deletion RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
@@ -7,7 +7,10 @@ Release notes
----------------

* The --embed option of applets is replaced with the environment variable
ARTIQ_APPLET_EMBED.
ARTIQ_APPLET_EMBED. The GUI sets this enviroment variable itself and the
user simply needs to remove the --embed argument.
* EnvExperiment's prepare calls prepare for all its children.


2.0rc1
------
11 changes: 10 additions & 1 deletion artiq/language/environment.py
Original file line number Diff line number Diff line change
@@ -194,6 +194,7 @@ class HasEnvironment:
"""Provides methods to manage the environment of an experiment (arguments,
devices, datasets)."""
def __init__(self, managers_or_parent, *args, **kwargs):
self.children = []
if isinstance(managers_or_parent, tuple):
self.__device_mgr = managers_or_parent[0]
self.__dataset_mgr = managers_or_parent[1]
@@ -202,11 +203,15 @@ def __init__(self, managers_or_parent, *args, **kwargs):
self.__device_mgr = managers_or_parent.__device_mgr
self.__dataset_mgr = managers_or_parent.__dataset_mgr
self.__argument_mgr = managers_or_parent.__argument_mgr
managers_or_parent.register_child(self)

self.__in_build = True
self.build(*args, **kwargs)
self.__in_build = False

def register_child(self, child):
self.children.append(child)

def build(self):
"""Should be implemented by the user to request arguments.
@@ -373,7 +378,11 @@ class EnvExperiment(Experiment, HasEnvironment):
environment manager.
Most experiment should derive from this class."""
pass
def prepare(self):
"""The default prepare method calls prepare for all children, in the
order of instantiation."""
for child in self.children:
child.prepare()


def is_experiment(o):