CLI
CLI is for data scientist or software engineers to trigger a simulation run via bash
Requirement
- Authenticated gcloud cli running
gcloud auth application-default login
- Set the default project-id
gcloud config set project almanak-production
Installation
Add this to ~/.pypirc
[distutils]
index-servers =
almanak-py
[almanak-py]
repository: https://europe-west4-python.pkg.dev/almanak-production/almanak-py/
Make sure this is in the pip.conf file of which the location you can fine
here. (If the
file is in the wrong location it won't work, for me it's
~/.config/pip/pip.conf
)
[global]
extra-index-url = https://europe-west4-python.pkg.dev/almanak-production/almanak-py/simple/
If this is set you can do
pip install simcli
Commands for simcli
Generate
Generate will create a local folder with the boilerplate setup for a simulation.
It uses the lastest version of the simulation and gives you several files so you
can get started quickly. It requires a folderName
which is the name of the
folder it will make and put the boilerplate files into.
simcli generate folderName
Create
When create command is ran
- A UUID4 id will be generated for the simulation
- Files such as configuration and models at the root of the where the
create
command is ran will be uploaded to Google cloud storage - Simulation meta data be added to Firestore.
simcli create
Get
Expects the a uuid to be provided and will return the status and GCS url of the simulation if a simulation with that ID exists.
simcli get XXXX
Logs
To make troubleshooting easier you can retreive the simulation logs using the logs command. It requires an id
and will only return logs if the simulation started. It might take a few seconds for the simulation to start producing logs so be patient.
simcli logs XXXX