-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kwargs break build_fragment #254
Comments
Currently passing a kwarg into |
The above link doesn't seem to be to a public repo… |
Sorry! updated to point to upstream. Here is a (pseudocode) test case which should fail at the moment: import ndscan.experiment as nd
class Foo(nd.Fragment):
def build_fragment(self, transition):
self.setattr_param('t_pi',
nd.FloatParam,
"π pulse duration",
f"dataset('{transition}.t_pi', 3*us)",
unit="us",
min=0.0)
class bar(nd.ExpFragment):
def build_fragment(self):
self.setattr_fragment("baz0", Foo, transition='a')
self.setattr_fragment("baz1", Foo, transition='b') This check fails https://github.com/OxIonics/ndscan/blob/3fcc4e1077ad9e0f327854c6015279c3300bebcc/ndscan/experiment/fragment.py#L446 because it doesn't like the different default data sets for the two If we pass these in as positional args (so no |
@dnadlinger I haven't got a good mental model of how to think about fqns in ndscan. I roughly get how they are used, but any clarifications would help. Why does the fqn need to include the arguments passed into build_fragment? |
ndscan/ndscan/experiment/fragment.py
Line 69 in a657fe8
The text was updated successfully, but these errors were encountered: