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.
Installation
> pip install artisan-builder
Artisan works with CPython and PyPy 3.6+.
Development
To install the project’s dependencies:
Install Python 3.6+.
Install Poetry.
Run poetry install –no-root.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for artisan_builder-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdf3ea69f297f7c811448e6fd2c3ccbdeb876f5cbf774082d8a3499e1b8e667b |
|
MD5 | 7fe66e32eda9d23cbe5b654aa05b8cad |
|
BLAKE2b-256 | 6f9a020e5bb3030c061feb2d0839367395fb5999f37cd6a62484b9a68d102a97 |