semvec/pypi-packages huggingface dataset:
hmd-cli-build 0.1.75
Generic build tool.
License: Apache 2.0

.. HMD hmd-cli-build documentation master file

hmd-cli-build
===============================================================
Generic build tool for NeuronSphere compliant projects.

Declaring Build Steps
--------------------------

A NeuronSphere Project declares which HMD CLI commands are required to build it in the `./meta-data/manifest.json` file.
The package `hmd-cli-build` installs a general build command, `hmd build` that handles calling each required command in order.
The `hmd build` command reads the `./meta-data/manifest.json`, and attempts to run the HMD tools
listed in the `build.commands` section.
The tools listed must be installed separately (most are included in the `neuronsphere` package).

Example:

.. code-block:: json

    {
      "name": "example-project",
      "build": {
        "commands": [["mickey"], ["python"]]
      }
    }

In the above example, `hmd build` will first run `hmd mickey build` and then `hmd python build`.
If a build command errors or fails, the entire build will exit and fail.
All subsequent commands listed will not be called.
Build commands are run sequentially in the order listed.
It is not possible to run commands in parallel.

Build Secrets
+++++++++++++

The `./meta-data/manifest.json` file can also contain a `build.secrets` section.
This section is used to reference secrets that are required by the build commands.
The secrets must be stored in the Admin Environment Secrets Manager.
Valid types are `file` and `env`.
The `file` type will write the secret to a file in ``/tmp/secrets``, and the `env` type will set the secret as an environment variable.

Example:

.. code-block:: json

    {
      "name": "example-project",
      "build": {
        "commands": [["mickey"], ["python"]],
        "secrets": [
          {
            "name": "<aws-secret-name>",
            "type": "env",
            "env": "API_KEY",
            "key": "API_KEY"
          },
          {
            "name": "<aws-secret-name>",
            "type": "file",
          }
        ]
      }
    }

Strict Mode
------------------

By default, `hmd build` runs with `HMD_BUILD_STRICT_MODE=true`, or in **strict mode**.
While in **strict mode**, the build will error and fail if one of the listed build commands is not installed.
This behavior is desirable on a CI or build server, but not for local development.
You can turn off **strict mode** by setting `HMD_BUILD_STRICT_MODE=false`.
This will be set for you when you run `hmd configure` after installing the `neuronsphere` package.

When **strict mode** is disabled, `hmd build` will only warn about a missing command and continue on to the next command.