Skip to main content

A build system for explainable science

Project description

Artisan is a lightweight experiment-management library with support for gradual typing. It allows you to write code like this:

class SineWave(artisan.Artifact):
    'sin(2πf⋅t + φ) for t ∈ [0, 1sec), sampled at 44.1kHz.'

    class Spec(Protocol):
        f: float; 'Frequency'
        φ: float = 0.0; 'Phase shift'

    def __init__(self, spec: Spec) -> None:
        self.t = np.linspace(0, 1, 44100)
        self.x = np.sin(2 * np.pi * spec.f * self.t + spec.φ)

to generate file trees like this:

├── SineWave_0000/
│   ├── _meta_.json
│   ├── t.cbor
│   └── x.cbor
└── SineWave_0001/
    ├── _meta_.json
    ├── t.cbor
    └── x.cbor

that can be viewed as customizable, live-updated, interactive documents like this:

– artisan-ui screenshot –

to facilitate an explorable, explainable, composable-component-based approach to scientific, analytical, and artistic programming. Complete documentation is available on Read the Docs.


> pip install artisan-builder

Artisan works with CPython and PyPy 3.6+.


To install the project’s dependencies:

To run the test suite:

> poetry run pytest

To build the HTML documentation:

> poetry run task build-docs

To build the HTML documentation with live-previewing:

> poetry run task serve-docs

Project details

Download files

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

Files for artisan-builder, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size artisan_builder-0.3.0-py3-none-any.whl (31.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size artisan-builder-0.3.0.tar.gz (27.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page