Creating a new cadCAD project that is Labs-ready is very simple using the cadCAD CLI labs
template.
You can find the CLI here. Follow the included installation instructions for your specific operating system.
First, create a new directory for your model:
mkdir my-model
Next, from inside that new directory, invoke the cadCAD CLI by specifying the Labs template:
cadcad-cli --template=https://github.com/blockscience-labs/cadcad-template-labs
Optionally, you can install the labs
template for future use (negating the need to specify the URL with each scaffold):
cadcad-cli --install-template=https://github.com/blockscience-labs/cadcad-template-labs --name=labs
And scaffold with:
cadcad-cli --template=labs
The Labs model you scaffold from our template will be built against cadCAD 0.4.28 and will include the following:
example-data.csv
: a CSV file containing pre-generated data that you can experiment with right awayexample-labs.ipynb
: a Jupyter Notebook containing example code demonstrating the use of the Labs SDK for fetching simulation results directly from the Labs platform and an example demonstrating how to use the SDK to import simulation results from an exported CSV fileexample-local.ipynb
: a Jupyter Notebook containing example code demonstrating the offline execution of the model directly from within the notebook itselfmodel
: a directory containing a very simple Robots and Marbles model configured for 3 monte-carlo runs and amodel_id
ofdefault
labs.py
: a Labs-required file that makes yourExperiment
object available and defines the parent directory containing all your model logicrequirements.txt
: the Python dependencies required for your model to run -- these are installed automatically by the Labs platform if presentpost-requirements.txt
: the Python dependencies required for post-processing and analytics pipelines -- these are installed automatically by the Labs platform when you start a JupyerLab instance if presentdocs
: a directory containing the mkdocs docsite for the projectmkdocs.yml
: a configuration for mkdocs that dictates how to build the projects docsite