# QuantEcon Operations Manual

This is the QuantEcon operations manual and userguide.

It documents QuantEcon operations and provides a single point of reference for
understanding how infrastructure is setup and maintained to support the
day to day operations of the project.

It provides **more opinionated** suggested workflows compared to the standard documentation
provided by projects such as [jupyter-book](https://jupyterbook.org/intro.html)

```{note}
This manual includes automated preview builds for Pull Requests. When you submit changes,
a preview of the updated documentation will be automatically built and made available
for review before merging.
```

```{warning}
When updating this site please **do not** add any credential data or private information.
This repository powers a public facing website to improve accessibility

For these items please use the [wiki](https://github.com/QuantEcon/QuantEcon.manual/wiki)
```

(quantecon-environment)=
## The `quantecon` environment

There is a {download}`environment.yml <https://raw.githubusercontent.com/QuantEcon/.github/main/environment.yml>` file available to setup a general anaconda environment that can be used to build all `quantecon` projects.

:::{tip}
If you are using an Apple running on `arm64` such as the `M1` or `M2` you will need the following additional steps before setting up your environment. 

1. Ensure you install the `M1` version of Anaconda Python. 
1. Install [homebrew](https://brew.sh) to install some binary packages
2. Run

   ```bash
   brew install cbc pkg-config
   ```
:::

To use it:

1. Download the {download}`environment.yml <https://raw.githubusercontent.com/QuantEcon/.github/main/environment.yml>` file
2. Use `conda` to build the environment using:
   ```bash
   conda env create -f environment.yml
   ```
3. Activate the evironment using:
   ```bash
   conda activate quantecon
   ```

:::{tip}
If you already have a `quantecon` environment you can remove it using:

```bash
conda env remove -n quantecon
```

and then reinstall a fresh environment.

It is also possible to `update` your `quantecon` environment using:

```bash
conda env update --file environment.yml  --prune
```

with further info in the [conda docs](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#updating-an-environment)
:::

