Table of Contents
Automation
You can automate the auth
and init
stages of the biomodal CLI for CI and test purposes.
9.1. ‘biomodal auth’ stage
When running a biomodal auth
command you can optionally pass
in username and password credentials using the command line flags below:
auth Login to biomodal
-u | --username <email> username
-p | --password <password> password
--password-stdin Take the password from stdin (recommended)
Username and passwords can also be passed in as environment variables BIOMODAL_USERNAME
and BIOMODAL_PASSWORD
. Environment set variables will always take precedence over CLI applied variables, so please bear this in mind if using this method.
(back to main documentation) | (back to top)
9.2. ‘biomodal init’ stage
When re-running the biomodal init
command you can skip prompts for setting your temp directory and init folder location by setting an environment variable IGNORE_INIT_PROMPTS=true
. Please note that you have to either edit the config file or follow the prompts the initial time the script is run.
You can also do this by adding ignore_init_prompts: true
to your config.yaml
file.
You can also skip biomodal CLI prompts for error strategy by setting an error strategy in your config.yaml
file.
Normally you’ll be prompted to choose either a normal
or failfast
error strategy. If you set either one of these values in your config.yaml
file the biomodal CLI will skip this prompt:
error_strategy: <normal|failfast>
Alternatively you can set the environment variable ERROR_STRATEGY
to normal
or failfast
.
Finally you can also define whether to share events and metrics reports by either setting the SHARE_METRICS
environment variable to true
or false
, or by setting the value directly in the config.yaml
file:
share_metrics: <true|false>
If neither of these are set, the biomodal CLI will require user input as to whether to set these values.
Note Settings in the config.yaml
file will take precedence over environment variables. If these values are both set but there are disparities between the two, you may experience unexpected results.