From 2576036ba10310dd43714333eba59a4eb6b67e97 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 17 Jul 2015 19:32:38 +0200 Subject: [PATCH] language,worker: preserve order of arguments --- artiq/language/environment.py | 3 ++- artiq/master/worker_impl.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/artiq/language/environment.py b/artiq/language/environment.py index 9d43d8da6..2f1f10690 100644 --- a/artiq/language/environment.py +++ b/artiq/language/environment.py @@ -1,3 +1,4 @@ +from collections import OrderedDict from inspect import isclass @@ -41,7 +42,7 @@ class HasEnvironment: parameters, results, arguments).""" def __init__(self, dmgr=None, pdb=None, rdb=None, *, param_override=dict(), default_arg_none=False, **kwargs): - self.requested_args = dict() + self.requested_args = OrderedDict() self.__dmgr = dmgr self.__pdb = pdb diff --git a/artiq/master/worker_impl.py b/artiq/master/worker_impl.py index 23de27b22..b733a054d 100644 --- a/artiq/master/worker_impl.py +++ b/artiq/master/worker_impl.py @@ -127,8 +127,8 @@ def examine(dmgr, pdb, rdb, file): if name[-1] == ".": name = name[:-1] exp_inst = exp_class(dmgr, pdb, rdb, default_arg_none=True) - arguments = {k: v.describe() - for k, v in exp_inst.requested_args.items()} + arguments = [(k, v.describe()) + for k, v in exp_inst.requested_args.items()] register_experiment(class_name, name, arguments)