DESTINY repository documentation
This repository contains two frameworks for building robots that interact with the DESTINY repository:
-
base_robotperforms all robot actions in a single run: downloading references, processing them, and uploading the corresponding enhancements. -
cluster_robotis designed for computationally intensive processing on a SLURM cluster. It separates the workflow into three stages: downloading references and submitting a SLURM job, waiting for the job to finish, and uploading the resulting enhancements.
For detailed documentation on each framework, see:
base_robot— framework architecture, implementation, configuration, and examples.cluster_robot— cluster workflow, implementation, configuration, and examples.
base_robot |
cluster_robot |
|
|---|---|---|
| Processing | On the robot machine | On a SLURM cluster |
| Workflow | Single run | Prepare → Wait → Upload |
| Best suited for | Lightweight processing | Computationally intensive processing |
For detailed documentation, see:
DESTINY repository documentation
This repository provides two frameworks for building robots that interact with the DESTINY repository:
base_robot— for robots that download, process, and upload references in a single run.cluster_robot— for computationally intensive robots that perform processing on a SLURM cluster and separate preparation, waiting, and upload into distinct stages.
base_robot |
cluster_robot |
|
|---|---|---|
| Processing | On the robot machine | On a SLURM cluster |
| Workflow | Single run | Prepare → Wait → Upload |
| Best suited for | Lightweight processing | Computationally intensive processing |
For detailed documentation, see:
base_robot— framework architecture, implementation, configuration, and examples.cluster_robot— cluster workflow, implementation, configuration, workspace, and examples.
We use uv to manage Python environments and dependencies.
Choose base_robot for processing that can be performed on the robot machine. Choose cluster_robot if the enhancement generation should run on a SLURM cluster.
For a new robot based on base_robot, use the provided Copier template:
uvx copier copy https://github.com/mcc-apsis/destiny-robot-framework.git my-robotFor a cluster_robot, start from the dummy_cluster_robot example.
See the corresponding framework README for detailed implementation instructions.
Test the robot against a local DESTINY repository before deploying it.
The robot testing guide contains further information.
Once the robot has been tested successfully, register it with the DESTINY repository.
Finally, assign work to the robot.
The examples directory contains minimal implementations demonstrating different types of robots.
query_robot— generates boolean enhancements indicating that all references returned by a query are included.dummy_classification_robot— demonstrates how to integrate a classifier into a robot.
dummy_cluster_robot— demonstrates how to run enhancement generation as a SLURM job.
The scripts directory contains utility scripts for working with the DESTINY repository, including creating enhancement batches from free-text searches.
-
base_robot
Framework architecture, implementation, configuration, and examples. -
cluster_robot
Cluster workflow, implementation, configuration, workspace, and examples.
We use uv to manage Python environments and dependencies.
Choose base_robot for processing that can be performed on the robot
machine. Choose cluster_robot if the enhancement generation should run
on a SLURM cluster.
For a new robot based on base_robot, use the provided Copier template:
uvx copier copy https://github.com/mcc-apsis/destiny-robot-framework.git my-robotWe use uv to manage the Python environment and dependencies. If you don't have uv installed, install it with:
curl -LsSf https://astral.sh/uv/install.sh | shTo create a new base robot, the most common robot framework, you can use the provided template. Simply run:
uvx copier copy https://github.com/mcc-apsis/destiny-robot-framework.git my-robotCopier will ask for the robot name:
Name of the robot:
The template generates the corresponding project structure and implementation skeleton:
my-robot/
├── .env.local.example
├── pyproject.toml
└── src/
├── __init__.py
├── config.py
├── main.py
└── robot.py
After creating the robot, install its dependencies with:
cd my-robot
uv syncCopy the local environment file:
cp .env.local.example .envAdd your robot-specific code in robot.py.
You can test your robot against a locally running DESTINY repository. See the local DESTINY repository instructions and make sure that enhancement batches are available.
Run your robot with:
uv run python -m my-robotFor more details, see the base_robot documentation.
A cluster robot performs its processing on a computing cluster using SLURM.
As a starting point, we recommend using the dummy_cluster_robot in the examples directory.
A cluster robot typically consists of three stages:
- Prepare – download references from the DESTINY repository, prepare the input, and submit a SLURM job.
- Wait – wait for the submitted SLURM job to finish.
- Upload – retrieve and parse the SLURM output and upload the resulting enhancements to the DESTINY repository.
Robot-specific code, such as preparing the input for the SLURM job and parsing its output into Enhancement objects, goes into robot.py. The required SLURM script also needs to be implemented.
Download the references and submit the SLURM job:
uv run python -m my-robot prepareWait for the submitted SLURM job to finish:
uv run python -m my-robot waitThe wait stage calls the SLURM REST API to check the status of the submitted job using its job ID.
After the SLURM job has finished, parse its output and upload the resulting enhancements:
uv run python -m my-robot uploadFor details on the cluster workflow, configuration, workspace structure, and implementation, see the cluster_robot documentation.
The examples directory contains three simple robot implementations.
query_robotsimply generates boolean enhancements indicating that all references returned by a query are included.dummy_classification_robotdemonstrates how to use a classifier within a robot.
dummy_cluster_robotdemonstrates how to run a robot using a SLURM job.
The scripts directory contains useful scripts for:
- creating enhancement batches using a free-text search
Once you implemented your robot, and tested it locally to let it run properly, you need to register it at the DEstiny repository and assign work to it.