Skip to content

Commit

Permalink
Merge branch 'develop' into cli-ish
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon authored Jan 18, 2024
2 parents f867d17 + 067ef1e commit aa33d33
Show file tree
Hide file tree
Showing 44 changed files with 25,033 additions and 130 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ jobs:
extra-specs: |
pytest
- name: Install MM
run: python -m pip install -e . --no-deps -v

- if: ${{ matrix.monet == 'dev' }}
name: Install development versions of monet and monetio
run: |
Expand All @@ -49,7 +46,7 @@ jobs:
python -c "import monet; print('monet.__version__', getattr(monet, '__version__', '?'))"
- name: pytest
run: python -m pytest melodies_monet
run: python -m pytest -v melodies_monet

- name: Run docs/examples notebooks as scripts
run: |
Expand All @@ -62,12 +59,33 @@ jobs:
done
cd -
- name: Prepare idealized save/read cases
shell: python
run: |
from copy import deepcopy
import yaml
with open('docs/examples/control_idealized.yaml') as f:
ctl = yaml.safe_load(f)
assert {'save', 'read'} < ctl['analysis'].keys()
ctl_save = deepcopy(ctl)
del ctl_save['analysis']['read']
with open('docs/examples/control_idealized_save.yaml', 'w') as f:
yaml.safe_dump(ctl_save, f)
ctl_read = deepcopy(ctl)
del ctl_read['analysis']['save']
with open('docs/examples/control_idealized_read.yaml', 'w') as f:
yaml.safe_dump(ctl_read, f)
- name: Check CLI works
run: |
cd docs/examples
melodies-monet --version
python -m melodies_monet --version
melodies-monet run control_idealized.yaml
melodies-monet run control_idealized_save.yaml
melodies-monet run control_idealized_read.yaml
cd -
docs:
Expand All @@ -81,7 +99,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Python (micromamba)
uses: mamba-org/provision-with-micromamba@v12
uses: mamba-org/provision-with-micromamba@v15
with:
environment-file: docs/environment-docs.yml
cache-env: true
Expand Down
8 changes: 6 additions & 2 deletions docs/appendix/yaml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ data (e.g., surf_only: True).
Typically this is set at the horizontal resolution of your model * 1.5. Setting
this to a smaller value will speed up the pairing process.

**apply_ak:** This is an optional argument used for pairing of satellite data. This
should be set to True when application of satellite averaging kernels or apriori data
to model observations is desired.

**mapping:** This is the mapping dictionary for all variables to be plotted.
For each observational dataset, add a mapping dictionary where the model
variable name is first (i.e., key) and the observation variable name is second
Expand Down Expand Up @@ -362,8 +366,8 @@ observation label is first and the model label is second
used for averaging and plotting. Options are 'time' for UTC or 'time_local'
for local time
* **ts_avg_window:** This is for timeseries plots only. This is the averaging
window applied to the data. Options are None for no averaging or a pandas
resample rule (e.g., 'H' is hourly, 'D' is daily).
window applied to the data. No averaging done if not provided in the yaml file (i.e., ts_avg_window is optional). Averaging is done if a pandas
resample rule (e.g., 'H' is hourly, 'D' is daily) is specified.

Stats
-----
Expand Down
5 changes: 5 additions & 0 deletions docs/background/gridded_datasets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Gridded Datasets
================

Gridded datasets

5 changes: 5 additions & 0 deletions docs/background/time_chunking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Time Chunking
================

Time chunking

1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@
# Sphinx 4.5 linkcheck having problem:
"https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account",
]
user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:25.0) Gecko/20100101 Firefox/25.0"

autosectionlabel_prefix_document = True
autosectionlabel_maxdepth = 2
2 changes: 1 addition & 1 deletion docs/develop/developers_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ these instructions:

$ conda create --name melodies-monet python=3.9
$ conda activate melodies-monet
$ conda install -y -c conda-forge pyyaml monet monetio netcdf4 wrf-python typer rich pooch jupyterlab
$ conda install -y -c conda-forge pyyaml pandas=1 monet monetio netcdf4 wrf-python typer rich pooch jupyterlab

(b) Clone [#clone]_ and link the latest development versions of MONET and MONETIO from GitHub to
your conda environment::
Expand Down
1 change: 1 addition & 0 deletions docs/environment-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
- netcdf4
- numpy
- pandas<2
- pillow<10
#
# Extras
- pooch
Expand Down
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ MONETIO please refer to:
background/supported_analyses
background/supported_plots
background/supported_stats
background/time_chunking
background/gridded_datasets

.. toctree::
:hidden:
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ First create and activate a conda environment::

Add dependencies from conda-forge::

$ conda install -y -c conda-forge pyyaml monet monetio netcdf4 wrf-python typer rich pooch
$ conda install -y -c conda-forge pyyaml pandas=1 monet monetio netcdf4 wrf-python typer rich pooch

Now, install the stable branch of MELODIES MONET to the environment::

Expand Down
Loading

0 comments on commit aa33d33

Please sign in to comment.