Skip to content

Commit d6da2c3

Browse files
Merge pull request #141 from rosswhitfield/docs_updates
Update docs about cori tests, _etc_. Bump static analysis versions
2 parents eff5427 + 3040d28 commit d6da2c3

File tree

5 files changed

+44
-6
lines changed

5 files changed

+44
-6
lines changed

.github/workflows/workflows.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
python-version: 3.8
1818
- name: Install python testing dependencies
19-
run: pip install flake8==3.9.2 pylint==2.9.5 bandit==1.7.0 codespell==2.1.0 dask distributed
19+
run: pip install flake8==3.9.2 pylint==2.9.6 bandit==1.7.0 codespell==2.1.0 dask distributed
2020
- name: flake8
2121
run: flake8
2222
- name: pylint
@@ -36,7 +36,7 @@ jobs:
3636
matrix:
3737
os: [ubuntu-latest, macos-latest]
3838
python-version: [3.6, 3.7, 3.8, 3.9]
39-
dask-version: ['2021.07.1']
39+
dask-version: ['2021.07.2']
4040
include:
4141
# same as NERSC Cori module python/3.7-anaconda-2019.10
4242
- os: ubuntu-latest
@@ -97,7 +97,7 @@ jobs:
9797
python3-pip
9898
python-is-python3
9999
- name: Install python testing dependencies
100-
run: python -m pip install pytest-cov pytest-timeout psutil dask==2021.07.1 distributed==2021.07.1
100+
run: python -m pip install pytest-cov pytest-timeout psutil dask==2021.07.2 distributed==2021.07.2
101101
- name: Install IPS (in develop mode)
102102
run: python -m pip install -e .
103103
- name: testing running IPS (--help)

doc/development.rst

+36
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,37 @@ You can then also run ``python -m coverage report -m`` to show exactly
135135
which lines are missing test coverage.
136136

137137

138+
.. _cori-tests :
139+
140+
Cori only tests
141+
~~~~~~~~~~~~~~~
142+
143+
The are some tests that only run on Cori at NERSC and these are not
144+
run as part of the :ref:`CI <continuous integration>` and must be run
145+
manually. To run those test you need to add the option ``--runcori``
146+
to the ``pytest``. There are tests for the :ref:`shifter
147+
functionally<dask_shifter>` that is Cori specific.
148+
149+
An example batch script for running the unit tests is:
150+
151+
.. code-block:: bash
152+
153+
#!/bin/bash
154+
#SBATCH -p debug
155+
#SBATCH --nodes=1
156+
#SBATCH --tasks-per-node=1
157+
#SBATCH --cpus-per-task=32
158+
#SBATCH -t 00:10:00
159+
#SBATCH -C haswell
160+
#SBATCH -J pytest
161+
#SBATCH -e pytest.err
162+
#SBATCH -o pytest.out
163+
#SBATCH --image=continuumio/anaconda3:2020.11
164+
module load python/3.8-anaconda-2020.11
165+
python -m pytest --runcori
166+
167+
The check the output in ``pytest.out`` to see that all the tests passed.
168+
138169
Writing Tests
139170
~~~~~~~~~~~~~
140171

@@ -145,6 +176,8 @@ Tests should be added to ``tests`` directory. If writing component to
145176
use for testing that should go into ``tests/components`` and any
146177
executable should go into ``tests/bin``.
147178

179+
.. _continuous integration:
180+
148181
Continuous Integration (CI)
149182
---------------------------
150183

@@ -220,3 +253,6 @@ https://github.com/HPC-SimTools/IPS-framework/releases
220253
We will publish a release candidate versions for any major or minor
221254
release before the full release to allow feedback from users. Patch
222255
versions will not normally have an release candidate.
256+
257+
Before a release is finalized the :ref:`Cori only tests<cori-tests>`
258+
should be run.

doc/user_guides/dask.rst

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ simulation log is shown:
5454
.. literalinclude:: ../examples/dask/simulation_log.json
5555
:language: JSON
5656

57+
.. _dask_shifter:
5758

5859
Running dask in shifter
5960
-----------------------

doc/user_guides/nersc_conda.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ Miniconda or Anaconda can can be installed to your home directory for easy devel
172172
.. code-block:: bash
173173
174174
wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh
175-
bash Anaconda3-2019.10-Linux-x86_64.sh -b -p $HOME/miniconda3
176-
source $HOME/miniconda3/bin/activate
175+
bash Anaconda3-2019.10-Linux-x86_64.sh -b -p $HOME/anaconda3
176+
source $HOME/anaconda3/bin/activate
177177
conda install netcdf4
178178
MPICC="$(which cc) --shared" python -m pip install --no-binary mpi4py mpi4py
179179
python -m pip install dask-mpi

setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
'Programming Language :: Python :: 3.8',
5555
'Programming Language :: Python :: 3.9',
5656
"License :: OSI Approved :: BSD License",
57-
"Operating System :: OS Independent",
57+
"Operating System :: MacOS :: MacOS X",
58+
"Operating System :: POSIX :: Linux",
5859
],
5960
python_requires='>=3.6',
6061
zip_safe=True

0 commit comments

Comments
 (0)