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 pipfile.
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.
Open
Pipfile
and update the packages and their versions. Required packages and versions for supported resources can be found here Supported Equipment.Run
pipenv lock
. You can see that the version has updated inPipfile.lock
.Rebuild your container.
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.
[packages]
nest-asyncio = "1.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.*"