We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As per our discussion, @mcgeorge102938 , here's the sample file we whipped up (storing here so I don't have to keep track of it on my computer)
# autogator's __init__' __CONFIG_DIR__ = appdirs.path # registry.py from autogator import __CONFIG_DIR__ if __CONFIG_DIR__ / "register.yaml" exists: load(item in config_dir) class Registry: def __init__(self): self.register = {} def register(self, name, device): self.register[name] = device def get(self, name): return device def save(self): # writes configuration/registry to the yaml config file pass class LocalDevice: pass class PyrolabDevice: pass registry = Registry() # In scripts, we could then do something like this: from autogator.registry import registry registry.register("laser", LocalDevice("lasers.tsl550")) registry.register("motion_x", PyrolabDevice("motion.kcubes.bpc303")) registry.register("motion_y", LocalDevice(34878427)) motionstage = registry.get('motion_y') motionstage.jog(0.1) # experiment.py class Experiment: def __init__(self): self.instruments = registry.get_instruments() def run(self): raise NotImplementedError class MyExperiment(Experiment): def run(): laser = self.instruments['laser'] laser.sweep() scope.acquire() # Future testrunner for batched tests from autogator import testrunner testrunner.add_test(MyExperiment) testrunner.run_all() """ Review ------ * Naming conventions * Logical modules * tests folder * examples folder * Clean up parser * Installation directory, pyyaml config files, persisting devices 1. refactor 2. example 3. test framework 4. added features (persistence, registry, testrunner) """
The text was updated successfully, but these errors were encountered:
sequoiap
mcgeorge102938
No branches or pull requests
As per our discussion, @mcgeorge102938 , here's the sample file we whipped up (storing here so I don't have to keep track of it on my computer)
The text was updated successfully, but these errors were encountered: