This repo is meant to be used as a template for robots made for OpenOrchestrator.
-
To use this template simply use this repo as a template (see Creating a repository from a template). Don't include all branches.
-
Go to
robot_framework/__main__.py
and choose between the linear framework or queue based framework. -
Implement all functions in the files:
robot_framework/initialize.py
robot_framework/reset.py
robot_framework/process.py
-
Change
config.py
to your needs. -
Fill out the dependencies in the
pyproject.toml
file with all packages needed by the robot. -
Feel free to add more files as needed. Remember that any additional python files must be located in the folder
robot_framework
or a subfolder of it.
When the robot is run from OpenOrchestrator the main.py
file is run which results
in the following:
- The working directory is changed to where
main.py
is located. - A virtual environment is automatically setup with the required packages.
- The framework is called passing on all arguments needed by OpenOrchestrator.
Minimum python version 3.10
This framework contains two different flows: A linear and a queue based.
You should only ever use one at a time. You choose which one by going into robot_framework/__main__.py
and uncommenting the framework you want. They are both disabled by default and an error will be
raised to remind you if you don't choose.
The linear framework is used when a robot is just going from A to Z without fetching jobs from an OpenOrchestrator queue. The flow of the linear framework is sketched up in the following illustration:
The queue framework is used when the robot is doing multiple bite-sized tasks defined in an OpenOrchestrator queue. The flow of the queue framework is sketched up in the following illustration:
This template is also setup with flake8 and pylint linting in Github Actions.
This workflow will trigger whenever you push your code to Github.
The workflow is defined under .github/workflows/Linting.yml
.