Skip to content

Commit 51828a1

Browse files
committed
Merge PR #472 'xylar/add_compass_docs' into develop
Add Travis CI and skeleton COMPASS docs #472 This merge adds support for [Travis CI](https://travis-ci.org/) to run on MPAS-Model pull requests. Travis currently runs two tests: * `docs`: builds a skeleton of documentation using a [ReadTheDocs](https://readthedocs.org/) template, similar to what is used for [MPAS-Analysis](https://mpas-dev.github.io/MPAS-Analysis/stable/index.html), [MPAS-Tools](https://mpas-dev.github.io/MPAS-Tools/stable/index.html), [geometric_features](https://mpas-dev.github.io/geometric_features/stable/index.html) and [pyremap](https://mpas-dev.github.io/pyremap/stable/index.html). The documentation is currently almost entirely focused on COMPASS, because that is where the most pressing need for improved documentation seems to be. * `compass`: creates conda environment with the latest version of the [compass](https://github.com/MPAS-Dev/MPAS-Tools/blob/master/compass/meta.yaml) metapackage, then tests to make sure the 4 basic COMPASS scripts exist and their help screens can be seen (requiring that all their dependencies are present in the conda environment.) Stubs are in place for adding future CI for `ocean`, `atmosphere`, `lancice` and `seaice` if anyone would care to do this.
2 parents 2f75bc5 + 0d60e7c commit 51828a1

29 files changed

+2139
-0
lines changed

.travis.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Based on https://github.com/NOAA-ORR-ERD/gridded/blob/master/.travis.yml
2+
language: minimal
3+
4+
sudo: false
5+
6+
notifications:
7+
email: false
8+
9+
# safelist
10+
branches:
11+
only:
12+
- master
13+
- develop
14+
- ocean/develop
15+
- ocean/coastal
16+
- landice/devleop
17+
18+
jobs:
19+
include:
20+
- name: "docs"
21+
- name: "compass"
22+
# Add new jobs, along with the corresponding travis_ci/install_<name>.bash
23+
# and travis_ci/test_<name>.bash
24+
#- name: "atmosphere"
25+
#- name: "landice"
26+
#- name: "ocean"
27+
#- name: "seaice"
28+
# The following is not needed now but could be added as the "safelist" and
29+
# job list evolves
30+
# exclude:
31+
# -
32+
# name: "compass"
33+
# if: branch == seaice/develop OR branch == e3sm/develop
34+
35+
env:
36+
global:
37+
secure: "Ckovv5psUv9pdBVaNjsgrk0hXGJbNTi5dzLSWsNQA3Ub4hUXvzgBvX1TgS+CZvq3fkJnxV6SYZIlOkrCqqxdlUzFewDiuzzYxEZObFZ8FceWiYs4K3LMS30MPLzIYaV9ORqXJ0/P/ii62KhGIraX7ryzZ5+IG5uDOd7gumD6GiCPURFQIGpWS7MasKmEQRnokrGO3B2JjGEB0vMTdMZGbj8XY+X4Q0zcdQnjrLtG7PiuED95CrfEI7HfJ/ifPRgI4EMey6YI89DUF6hdQ1N1QxyAnxlKBDkqCvy6uowej7xPwMMZsyykr6EoAcwk9kYluVRogKe1iBMq1P4WCOOUj3c3Q9Dp885TiXlsW1aDKT2RSkx/SV5cE73vrpUhmm2Nf/wWAZktOYJSGlmRqSnjkQhDJqQSOaIQbwBfUtuGMt0Go0Q/3/qlMc7I9AjG5yBuYcY8WN98qKABP3IKjSsIFUPyo1kXCHt++oV7z1p9oBdGS54e+9rEYWixvAwvw0GvrNrbQdiq2sq8BheI4ppzeSGoneHguNDn5QyVeMu4WZ0gsCwuVW0lXiuUSlYHG5ZctX1cQySCyL3IOcpYa1a1/DKINpkwr/Z7T8oOM+UHnXDK96UJfbaG5n5+JZOfWJ6N/Em7weKuwnRiobGQfDqlyEtc1hgcLfvMnkpikENKhss="
38+
39+
before_install:
40+
- |
41+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
42+
bash miniconda.sh -b -p $HOME/miniconda
43+
source $HOME/miniconda/etc/profile.d/conda.sh
44+
conda activate base
45+
conda config --set always_yes yes --set changeps1 no --set show_channel_urls true
46+
conda update conda
47+
conda config --add channels conda-forge --force
48+
conda config --set channel_priority strict
49+
50+
install:
51+
- ./travis_ci/install_${TRAVIS_JOB_NAME}.bash
52+
53+
script:
54+
- ./travis_ci/test_${TRAVIS_JOB_NAME}.bash

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = mpas_model
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/compass/clean_testcase.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.. _compass_clean_testcase:
2+
3+
clean\_testcase.py
4+
==================
5+
6+
This script is used to clean one or more test cases that have already been
7+
setup.
8+
9+
It will remove directories and driver scripts that were generated as part of
10+
setting up a test case.
11+
12+
Command-line options::
13+
14+
$ ./clean_testcase.py -h
15+
usage: clean_testcase.py [-h] [-o CORE] [-c CONFIG] [-r RES] [-t TEST]
16+
[-n NUM] [-q] [-a] [--work_dir PATH]
17+
18+
This script is used to clean one or more test cases that have already been
19+
setup.
20+
21+
It will remove directories / driver scripts that were generated as part of
22+
setting up a test case.
23+
24+
optional arguments:
25+
-h, --help show this help message and exit
26+
-o CORE, --core CORE Core that contains configurations to clean
27+
-c CONFIG, --configuration CONFIG
28+
Configuration to clean
29+
-r RES, --resolution RES
30+
Resolution of configuration to clean
31+
-t TEST, --test TEST Test name within a resolution to clean
32+
-n NUM, --case_number NUM
33+
Case number to clean, as listed from list_testcases.py. Can be a comma delimited list of case numbers.
34+
-q, --quiet If set, script will not write a command_history file
35+
-a, --all Is set, the script will clean all test cases in the work_dir.
36+
--work_dir PATH If set, script will clean case directories in work_dir rather than the current directory.
37+

0 commit comments

Comments
 (0)