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:

  1. Open your adapter’s git repository in Visual Studio Code. Make sure you open it in the container.

  2. Open Pipfile and update the packages and their versions. Required packages and versions for supported resources can be found here Supported Equipment.

  3. Run pipenv lock. You can see that the version has updated in Pipfile.lock.

  4. Rebuild your container.

  5. Update plugin.py and config.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.

  6. Finish adapter setup. See Setting Up An Adapter.

Here’s an example snippet for our resource library for the Tecan Fluent.

Pipfile#
[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.*"