Skip to main content

Generation of challenge packs

Project description

CI PyPI PyPI - Python Version Code style: black

🛠️ grand-challenge-forge

A utility that generates distributable items that help challenge organizers set up their challenge more easily on Grand-Challenge.org.

Install

Install via PyPi:

pip install grand-challenge-forge
grand-challenge-forge --help

🎒 Challenge packs

A challenge pack consists of challenge-tailored examples for the following:

  • A script to automate uploading data to an archive
  • A submission algorithm that can be submitted to a challenge phase
  • An evaluation method that evaluates algorithm submissions and generates performance metrics for ranking

Usage

grand-challenge-forge pack-context.json

Will use the context found in pack-context.json and generate a pack at the current working directory in a directory dist/ (default).

Example of the content of pack-context.json
{
    "challenge": {
        "slug": "challenge-slug",
        "phases": [
            {
                "slug": "phase-slug",
                "archive": {
                    "url": "https://grand-challenge.org/archives/archive-slug/"
                },
                "inputs": [
                    {
                        "slug": "input-ci-slug",
                        "kind": "Segmentation",
                        "super_kind": "Image",
                        "relative_path": "images/input-value"
                    },
                    {
                        "slug": "another-input-ci-slug",
                        "kind": "Anything",
                        "super_kind": "File",
                        "relative_path": "another-input-value.json"
                    }
                ],
                "outputs": [
                    {
                        "slug": "output-ci-slug",
                        "kind": "Image",
                        "super_kind": "Image",
                        "relative_path": "images/output-value"
                    },
                    {
                        "slug": "another-output-ci-slug",
                        "kind": "Anything",
                        "super_kind": "File",
                        "relative_path": "output-value.json"
                    }
                ]
            },
            {
                "slug": "another-phase-slug",
                "archive": {
                    "url": "https://grand-challenge.org/archives/another-archive-slug/"
                },
                "inputs": [
                    {
                        "slug": "input-ci-slug",
                        "kind": "Image",
                        "super_kind": "Image",
                        "relative_path": "images/input-value"
                    }
                ],
                "outputs": [
                    {
                        "slug": "another-output-ci-slug",
                        "kind": "Anything",
                        "super_kind": "File",
                        "relative_path": "output-value.json"
                    }
                ]
            }
        ]
    }
}

Alternatively, you generate a pack by providing a JSON string directly:

grand-challenge-forge --output-dir /tmp '{ "challenge": { "slug": "a-slug"...'

This will output a pack directory in the /tmp directory.

[!NOTE] By default, the forge does quality checks on the pack that may require docker. You can disable these via -n

🏗️ Development

Install locally

Install locally grand-challenge-forge locally (requires poetry):

git clone https://github.com/DIAGNijmegen/rse-grand-challenge-forge.git
cd rse-grand-challenge-forge
poetry install
poetry run grand-challenge-forge --help

Pre-commit hooks

Several linters and stylers run to check the formating during continuous integration. Ensure they are run before committing by installing pre-commit.

Running Tests

use tox to run all tests across all supported python versions:

$ pip install tox
$ tox

Dependencies

Under the hood grand-challenge-forge uses:

  • Click
    • a composable command line interface toolkit
  • Cookiecutter
    • a utility that creates projects from project templates

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grand_challenge_forge-0.2.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

grand_challenge_forge-0.2.0-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file grand_challenge_forge-0.2.0.tar.gz.

File metadata

  • Download URL: grand_challenge_forge-0.2.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/6.2.0-1018-azure

File hashes

Hashes for grand_challenge_forge-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5eb3024494c675ce0d090f3efd987a1f6051a0f2bc89b65cb51b940fb4915ca1
MD5 8b6e107794c65b9dda77d618e3d2e44c
BLAKE2b-256 80e48a2dafeb17dd105c79ef91a0eb1f8bf29cf2adcb284c31f35878e59c8d55

See more details on using hashes here.

File details

Details for the file grand_challenge_forge-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for grand_challenge_forge-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2e39be7c83169b0cf539c443eaf1f04113a6b5928a04ce949e676d13f3c30c2
MD5 7edf278c2f8334f8aec267f12dc4ea49
BLAKE2b-256 1d8c0629d83fcbdf411040146ab3e6fb6d1e1a90b6d819b557e950a52a1c88f5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page