Skip to content

Template structure

When building a new worker from our official template, a file structure gets created for you to ease the burden of setting up a Python package, a Docker build, with the best development practices:

YAML configuration file that allows Arkindex to understand what it should do with this repository. To learn more about this file, see YAML configuration.
JSON file that stores the options you defined when creating a new worker. This file can be reused to fetch template updates.
Lists which files to exclude from the Docker build context. For more information, see the Docker documentation.
Lists which files to exclude from Git versioning. For more information, see the Git docs.
Configures the GitLab CI jobs and pipelines. To learn more about the configuration we provide, see GitLab Continuous Integration for workers.
Configures the pre-commit hook.
Specifies how the Docker image will be built. You can change the instructions in this file to update the image to the needs of your worker, for example to install system dependencies.
Mostly used to build releases of a worker more easily. For more information, see Maintaining a worker.
Configures the Python unit test runner. For more information, see the tox docs.
Configures the worker’s Python package.
Script that gets run by CI pipelines to build the Docker image.
An example unit test file. For more information, see Writing tests for your worker.
Describe your worker in this file. The file should be named after its slug. The content should be valid Markdown. It will be published and visible on Arkindex.
Declares the folder as a Python package.
The core part of the worker. This is where you can write code that processes Arkindex elements. For more information, see Implementing an Elements worker.