Base Worker 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:

    .arkindex.yml

    YAML configuration file that allows Arkindex to understand what it should do with this repository.

    To learn more about this file, see YAML configuration.

    .cookiecutter.yaml

    YAML file that stores the options you defined when creating a new worker. This file can be reused to fetch template updates.

    .dockerignore

    Lists which files to exclude from the Docker build context.

    For more information, see the Docker documentation.

    .flake8

    Specifies configuration options for the Flake8 linter.

    For more information, see the Flake8 documentation.

    .gitignore

    Lists which files to exclude from Git versioning.

    For more information, see the Git docs.

    .gitlab-ci.yml

    Configures the GitLab CI jobs and pipelines.

    To learn more about the configuration we provide, see GitLab Continuous Integration for workers.

    .isort.cfg

    Configures the automatic Python import sorting rules.

    For more information, see the isort docs.

    .pre-commit.config.yaml

    Configures the pre-commit hook.

    Dockerfile

    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.

    requirements.txt

    Lists the Python dependencies your worker relies on. Those are automatically installed by the default Dockerfile.

    tox.ini

    Configures the Python unit test runner.

    For more information, see the tox docs.

    setup.py

    Configures the worker's Python package.

    VERSION

    Official version number of your worker. Defaults to 0.1.0.

    ci/build.sh

    Script that gets run by CI pipelines to build the Docker image.

    tests/test_worker.py

    An example unit test file.

    worker_[slug]/__init__.py

    Declares the folder as a Python package.

    worker_[slug]/worker.py

    The core part of the worker. This is where you can write code that processes Arkindex elements.