Skip to content

The automation software that powers the NIST Autonomous Formulation Lab! A flexible, web-based backend for device integration, drivers for some devices we've found useful, and glue that makes the AFL run.

License

Notifications You must be signed in to change notification settings

usnistgov/AFL-automation

Repository files navigation

NIST Autonomous Formulation Laboratory - Automation Software

This package contains the core laboratory automation software used in the NIST AFL platform.

Its core is the 'DeviceServer' API, a simple way of exposing functionality in simple Python classes to the outside world via HTTP servers. It includes robust item queueing support, output rendering, and hooks to allow for 'smart' generation of user interfaces automatically.

Specific deviceserver instances are provided for a variety of hardware used in the AFL platform: syringe pumps, valves, multiposition flow selectors, UV-Vis spectrometers, x-ray and neutron scattering instruments/beamlines. There are further deviceserver classes that integrate these base devices to perform higher-level functions, e.g. "loading". These classes aim to specify instructions for running a particular protocol in a hardware-agnostic way.

Production deployment

By default the APIServer will use the waitress WSGI server if it is installed. To fall back to Flask's built-in server pass --no-waitress to AFL.automation.shared.launcher.

Running tests

This repository uses pytest for unit tests. A GitHub Actions workflow runs the tests automatically on every push and pull request using .github/workflows/test.yaml. The workflow installs the package along with the dependencies listed in pyproject.toml.

To execute the tests locally, install the package in editable mode and run pytest. If the installation fails because the package version cannot be determined from Git tags, set SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 as in the CI workflow:

SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 pip install -e .
pytest

About

The automation software that powers the NIST Autonomous Formulation Lab! A flexible, web-based backend for device integration, drivers for some devices we've found useful, and glue that makes the AFL run.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 7