From 92228cf7718eb1f272a9de434b6d08646ada0a84 Mon Sep 17 00:00:00 2001
From: David Hoese <david.hoese@ssec.wisc.edu>
Date: Tue, 14 Mar 2023 13:46:55 -0500
Subject: [PATCH] Add operational environment YAML

---
 README.md        | 38 ++++++++++++++++++++++++++++++++++++++
 environment.yaml | 12 ++++++++++++
 pyproject.toml   |  2 ++
 3 files changed, 52 insertions(+)
 create mode 100644 environment.yaml

diff --git a/README.md b/README.md
index 396f1ad..ff1e8c9 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,39 @@
 # AOSS Tower
+
+## Operational conda environment
+
+These instructions assume the operational "standard practice" that is current
+at the time of writing. This practice is to create a conda environment using
+the "root" user under `/opt/metobs/aoss_tower`.
+
+1. Get and install the conda environment:
+
+   ```bash
+   cd /tmp
+   curl -O "https://gitlab.ssec.wisc.edu/metobs/AossTower/-/raw/master/environment.yaml"
+   sudo /opt/miniconda3/condabin/conda env create --file environment.yaml --prefix /opt/metobs/aoss_tower
+   ```
+
+2. Clone the git repository into the environment and other setup:
+
+   ```bash
+   cd /opt/metobs/aoss_tower
+   sudo mkdir -p repos/git log lock
+   sudo chown metobs:metobsgrp log lock
+   sudo git clone "https://gitlab.ssec.wisc.edu/metobs/AossTower.git" repos/git/AossTower
+   sudo ln -s repos/git/AossTower/scripts ./scripts
+   sudo git clone "https://gitlab.ssec.wisc.edu/metobs/MetObsCommon.git" repos/git/MetObsCommon
+   ```
+
+3. Install the metobsapi python package:
+
+   ```bash
+   sudo /opt/metobs/aoss_tower/bin/pip install -e repos/git/MetObsCommon/
+   sudo /opt/metobs/aoss_tower/bin/pip install -e repos/git/MetObsAPI/
+   ```
+
+4. Copy `etc` files from MetObsCommon if necessary:
+
+   ```bash
+   sudo cp repos/git/MetObsCommon/etc/... /etc/...
+   ```
diff --git a/environment.yaml b/environment.yaml
new file mode 100644
index 0000000..caa6ea3
--- /dev/null
+++ b/environment.yaml
@@ -0,0 +1,12 @@
+name: aoss_tower
+channels:
+  - conda-forge
+dependencies:
+  - matplotlib
+  - netcdf4
+  - numpy
+  - pandas
+  - pytest
+  - requests
+  - sh
+  - python=3.11
diff --git a/pyproject.toml b/pyproject.toml
index e8dff0b..b5cedae 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -74,6 +74,8 @@ requires-python = ">=3.10"
 dependencies = [
     "numpy",
     "pandas",
+    "netcdf4",
+    "requests",
 ]
 dynamic = ["version"]
 
-- 
GitLab