Adding the Resource Library Packages#
Your adapter will need to import the resource library and driver-client for the hardware you want to connect to. Adapters need to reference all packages for actions they wish to be able to use in workflows such as base resource libraries like artificial-adapter-common
, artificial-resource-base-library
, and artificial-protocol-runner-library
. These references are in your pyproject.toml.
To do this, you will need to:
Open your adapter’s git repository in Visual Studio Code. Make sure you open it in the container.
Run
uv add artificial-<resource name>-resource-library
to add the resource library to your adapter.Update
plugin.py
andconfig.yaml
to integrate the new resource library into your adapter. For your specific instrument, look up the specific page and follow any instructions there. See Supported Equipment.Finish adapter setup. See Setting Up An Adapter.
Here’s an example snippet for our resource library for the Tecan Fluent.
dependencies = [
"nest-asyncio1.5.6",
"tecan-driver-client==2.6.*",
"artificial-adapter-common==0.17.0",
"artificial-resource-base-library==0.4.*",
"artificial-protocol-runner-library==0.3.*",
"artificial-fluent-adapter==1.*",
]