Tethys Platform
Table Of Contents
Table Of Contents

gen command

Generate supporting files for Tethys installations.

Note

The package_json option is designed to be used when setting the STATICFILES_USE_NPM setting to True, which requires that the Tethys Portal JavaScript dependencies be served by Tethys. The package_json command will generate a package.json and then run npm install to download the JS dependencies.

usage: tethys gen [-h] [-d DIRECTORY] [-p {major,minor,patch,none}]
                  [--client-max-body-size CLIENT_MAX_BODY_SIZE]
                  [--asgi-processes ASGI_PROCESSES]
                  [--conda-prefix CONDA_PREFIX] [--tethys-port TETHYS_PORT]
                  [--micromamba] [--overwrite]
                  {asgi_service,nginx,nginx_service,portal_config,services,install,metayaml,package_json,requirements}

Positional Arguments

type

Possible choices: asgi_service, nginx, nginx_service, portal_config, services, install, metayaml, package_json, requirements

The type of object to generate.

options

-d, --directory

Destination directory for the generated object.

-p, --pin-level

Possible choices: major, minor, patch, none

Level to pin dependencies when generating the meta.yaml. One of "major", "minor", "patch", or "none". Defaults to "none".

Default: "none"

--client-max-body-size

Populate the client_max_body_size parameter for nginx config. Defaults to "75M".

Default: "75M"

--asgi-processes

The maximum number of asgi worker processes. Defaults to 1.

Default: 1

--conda-prefix

The path to the Tethys conda environment. Required if $CONDA_PREFIX is not defined.

Default: False

--tethys-port

Port for the Tethys Server to run on in production. This is used when generating the Daphne and nginx configuration files. Defaults to 8000.

Default: 8000

--micromamba

Generate files to work in a Micromamba environment. Used when generating the configuration files for a Docker build (the Docker image uses the micromamba image as the base image).

Default: False

--overwrite

Overwrite existing file without prompting.

Default: False