Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 240-add-dev-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
abhaasgoyal committed Mar 4, 2024
2 parents bfe27d8 + 9482458 commit 77d0a54
Show file tree
Hide file tree
Showing 51 changed files with 2,109 additions and 810 deletions.
17 changes: 15 additions & 2 deletions .conda/benchcab-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
name: benchcab-dev
channels:
- conda-forge
- accessnri
- coecms
- defaults

dependencies:
- python=3.9
- payu
- pip
- f90nml
- netcdf4
- pytest-cov
- pyyaml
- flatdict
- cerberus>=1.3.5
- gitpython
- gitpython
# CI
- pytest-cov
# Dev Dependencies
- pytest
- mypy
- black
- ruff
- pip:
- -r mkdocs-requirements.txt
2 changes: 2 additions & 0 deletions .conda/build_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

channels:
- conda-forge
- accessnri
- coecms
- default

dependencies:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
- name: Test conda build
run: |
conda install conda-build
conda build -c conda-forge .
conda build -c conda-forge -c accessnri -c coecms .
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ mkdocs:
# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: mkdocs-requirements.txt
- requirements: .conda/mkdocs-requirements.txt
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,20 @@

- checks out the model versions specified by the user
- builds the required executables
- runs each model version across N standard science configurations
- runs each model version across N standard science configurations for a variety of meteorological forcings
- performs bitwise comparison checks on model outputs across model versions

The user can then pipe the model outputs into a benchmark analysis via [modelevaluation.org][meorg] to assess model performance.

The full documentation is available at [benchcab.readthedocs.io][docs].

## Supported configurations

`benchcab` currently tests the following model configurations for CABLE:

- **Flux site simulations (offline)** - running CABLE forced with observed eddy covariance data at a single site
- **Global/regional simulations (offline)** - running CABLE forced with meteorological fields over a region (global or regional)

## License

`benchcab` is distributed under [an Apache License v2.0][apache-license].
Expand Down
6 changes: 5 additions & 1 deletion benchcab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

import importlib.metadata

from benchcab.utils import get_logger

try:
__version__ = importlib.metadata.version("benchcab")
except importlib.metadata.PackageNotFoundError:
__version__ = ""
print("Warning: unable to interrogate version string from installed distribution.")
get_logger().warn(
"unable to interrogate version string from installed distribution."
)
# Note: cannot re-raise exception here as this will break pytest
# when running without first installing the package
Loading

0 comments on commit 77d0a54

Please sign in to comment.