# `env`

Set and get capymoa environment variables.

CapyMOA supports a few environment variables that can be used to customize its behavior.
None of these are required, but they can be useful in certain situations.

* Use `CAPYMOA_DATASETS_DIR` to specify a custom directory where datasets will be stored.
  : (See [`capymoa_datasets_dir()`](#capymoa.env.capymoa_datasets_dir))
* Use `CAPYMOA_JVM_ARGS` to specify custom JVM arguments.
  : (See [`capymoa_jvm_args()`](#capymoa.env.capymoa_jvm_args))
* Use `CAPYMOA_MOA_JAR` to specify a custom MOA jar file.
  : (See [`capymoa_moa_jar()`](#capymoa.env.capymoa_moa_jar))
* Use `JAVA_HOME` to specify the path to your Java installation.

## Functions

| [`capymoa_datasets_dir`](#capymoa.env.capymoa_datasets_dir)   | Return the `CAPYMOA_DATASETS_DIR` environment variable or the default value `./data`.     |
|-------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
| [`capymoa_jvm_args`](#capymoa.env.capymoa_jvm_args)       | Return the `CAPYMOA_JVM_ARGS` environment variable or the default value `-Xmx8g -Xss10M`. |
| [`capymoa_moa_jar`](#capymoa.env.capymoa_moa_jar)        | Return the `CAPYMOA_MOA_JAR` environment variable or the built-in MOA jar file.           |

### capymoa.env.capymoa_datasets_dir() → [Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/env.py#L19)

Return the `CAPYMOA_DATASETS_DIR` environment variable or the default value `./data`.

The `CAPYMOA_DATASETS_DIR` environment variable can be used to specify a custom
directory where datasets will be stored. Set it to a custom value in bash like this:

```bash
export CAPYMOA_DATASETS_DIR=/path/to/datasets
python my_capy_moa_script.py
```

We recommend setting this environment variable in your shell configuration file.

* **Returns:**
  The path to the datasets directory.

### capymoa.env.capymoa_jvm_args() → [list](https://docs.python.org/3/builtins/stdtypes.html#list)[[str](https://docs.python.org/3/builtins/stdtypes.html#str)][[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/env.py#L40)

Return the `CAPYMOA_JVM_ARGS` environment variable or the default value `-Xmx8g -Xss10M`.

The `CAPYMOA_JVM_ARGS` environment variable can be used to specify custom JVM
arguments. Set it to a custom value in bash like this:

```bash
export CAPYMOA_JVM_ARGS="-Xmx16g -Xss10M"
python my_capy_moa_script.py
```

* **Returns:**
  A list of JVM arguments.

### capymoa.env.capymoa_moa_jar() → [Path](https://docs.python.org/3/library/pathlib.html#pathlib.Path)[[source]](https://github.com/adaptive-machine-learning/CapyMOA/blob/3e255b1/src/capymoa/env.py#L56)

Return the `CAPYMOA_MOA_JAR` environment variable or the built-in MOA jar file.

**This is an advanced feature that is unnecessary for most users.**

The `CAPYMOA_MOA_JAR` environment variable can be used to specify a custom path to
the MOA jar file. Set it to a custom value in bash like this:

```bash
export CAPYMOA_MOA_JAR=/path/to/moa.jar
python my_capy_moa_script.py
```

* **Returns:**
  The path to the MOA jar file.
