Skip to main content

Generation of challenge packs

Project description

🛠️ grand-challenge-forge

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


CI PyPI PyPI - Python Version Code style: black

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

PACK generation

grand-challenge-forge pack 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).

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

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

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

Via API pack generation can be done via:

from grand_challenge_forge.forge import generate_challenge_pack
from Pathlib import Path

generate_challenge_pack(
    context={"challenge": {...}}
    output_path=Path("dist/"),
    delete_existing=False,
)

ALGORITHM-TEMPLATE generation

grand-challenge-forge algorithm algorithm-context.json

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

Alternatively, you generate an algorithm template by providing a JSON string directly:

grand-challenge-forge algorithm --output-dir /tmp '{ "algorithm": { ... } }'

This will output an algorithm-template directory in the /tmp directory.

Via API the algorithm-template generation can be done via:

from grand_challenge_forge.forge import generate_algorithm_template
from Pathlib import Path

generate_algorithm_template(
    context={"algorithm": { ... }}
    output_path=Path("dist/"),
    delete_existing=False,
)

🏗️ Development

Install locally

Install 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 formatting 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
  • Jinja2
    • a utility that renders 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.7.0.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grand_challenge_forge-0.7.0-py3-none-any.whl (47.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: grand_challenge_forge-0.7.0.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.12 Linux/6.8.0-1021-azure

File hashes

Hashes for grand_challenge_forge-0.7.0.tar.gz
Algorithm Hash digest
SHA256 ff0be557130a083abff617e1e9a53c60a36a7c3683fc58fe4a00cb4ea796bc0f
MD5 3decc7a8dd8cf0fe927e59b2d8b796b0
BLAKE2b-256 f51d5ab749d0a3f45dc1d5b089341bfe09285bffde00b3a8cb1c66101d07cfdf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for grand_challenge_forge-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bfde8219aeda31d1ef6ea7cab94c638959ef50524f347a9656b2c5e12d43d91f
MD5 758f65d6a874453ed1610bde20c476fd
BLAKE2b-256 15e02a7f7526b98812de5bd90b68a2f5b1f803780459684b7519a6c922a460e3

See more details on using hashes here.

Supported by

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