Skip to content

Commit

Permalink
Merge 034d614 into 6b34896
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Apr 8, 2024
2 parents 6b34896 + 034d614 commit d94bdc4
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 133 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ jobs:
python-version: '3.11'
- name: Update package index
run: sudo apt-get update
- name: Install mpi libs
run: sudo apt-get -y install libopenmpi-dev
- name: Install Tox and any other packages
run: pip install tox
- name: Run Coverage Part 1
run: tox -e cov1
- name: Run Coverage Part 2
run: tox -e cov2 || true
- name: Install ARMI and MPI
run: |
sudo apt-get -y install libopenmpi-dev
pip install -e .[memprof,mpi,test]
- name: Run Coverage
run: |
coverage run --rcfile=.coveragerc -m pytest -n 4 --cov=armi --cov-config=.coveragerc --cov-report=lcov --ignore=venv armi
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=.coveragerc -m pytest --cov=armi --cov-config=.coveragerc --cov-report=lcov --cov-append --ignore=venv armi/tests/test_mpiFeatures.py || true
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=.coveragerc -m pytest --cov=armi --cov-config=.coveragerc --cov-report=lcov --cov-append --ignore=venv armi/tests/test_mpiParameters.py || true
coverage combine --rcfile=.coveragerc --keep -a
- name: Publish to coveralls.io
uses: coverallsapp/github-action@v1.1.2
with:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ jobs:
run: sudo apt-get -y install libopenmpi-dev
- name: Install Pandoc
run: sudo apt-get -y install pandoc
- name: Install Tox and any other packages
run: pip install tox
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Make HTML Docs
run: tox -e doc
run: |
pip install -e .[memprof,mpi,test,docs]
cd doc
git submodule init
git submodule update
make html
- name: deploy
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
python-version: '3.9'
- name: Update package index
run: sudo apt-get update
- name: Install Tox and any other packages
run: pip install tox
- name: Run Linter
run: tox -e lint
run: |
pip install -e .[test]
ruff .
11 changes: 7 additions & 4 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ jobs:
run: sudo apt-get update
- name: Install mpi libs
run: sudo apt-get -y install libopenmpi-dev
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
run: tox -e test,mpitest
- name: Run Tests and Coverage
run: |
pip install -e .[memprof,mpi,test]
pytest -n 4 armi
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=.coveragerc -m pytest --cov=armi --cov-config=.coveragerc --cov-report=lcov --cov-append --ignore=venv armi/tests/test_mpiFeatures.py || true
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=.coveragerc -m pytest --cov=armi --cov-config=.coveragerc --cov-report=lcov --cov-append --ignore=venv armi/tests/test_mpiParameters.py || true
coverage combine --rcfile=.coveragerc --keep -a
8 changes: 4 additions & 4 deletions .github/workflows/validatemanifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Tox and any other packages
run: pip install tox
- name: Run Tox
run: tox -e manifest
- name: Validate Manifest
run: |
pip install toml
python .github/workflows/validatemanifest.py
8 changes: 4 additions & 4 deletions .github/workflows/wintests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
python-version: '3.11'
- name: Upgrade PIP
run: python -m pip install --upgrade pip
- name: Install deps
run: python -m pip install tox tox-gh-actions
- name: Run Tox
run: tox -e test
- name: Run Unit Tests on Windows
run: |
pip install -e .[memprof,mpi,test]
pytest -n 4 armi
- name: Find Test Crumbs
run: python .github/workflows/find_test_crumbs.py
12 changes: 2 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,8 @@ Now clone and install ARMI::
$ pip install -e .
$ armi --help

The easiest way to run the tests is to install `tox <https://tox.readthedocs.io/en/latest/>`_
and then run::

$ pip install -e ".[test]"
$ tox -- -n 6

This runs the unit tests in parallel on 6 processes. Omit the ``-n 6`` argument
to run on a single process.

The tests can also be run directly, using ``pytest``::
The ARMI tests are meant to be run using `pytest <https://docs.pytest.org/en/8.0.x/>`_
locally ::

$ pip install -e ".[test]"
$ pytest -n 4 armi
Expand Down
13 changes: 3 additions & 10 deletions doc/developer/first_time_contributors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,10 @@ Any contribution must pass all included unit tests. You will frequently have to
tests your code changes break. And you should definitely add tests to cover anything
new your code does.

The standard way to run the tests is to install and use `tox <https://tox.readthedocs.io/en/latest/>`_::
The ARMI tests are meant to be run using `pytest <https://docs.pytest.org/en/8.0.x/>`_
locally ::

$ pip install tox
$ tox -- -n 6

This runs the unit tests in parallel on 6 processes. Omit the ``-n 6`` argument
to run on a single process.

Or the tests can also be run using ``pytest`` directly::

$ pip intall -e .[test]
$ pip install -e .[test]
$ pytest -n 4 armi

Submitting Changes
Expand Down
87 changes: 0 additions & 87 deletions tox.ini

This file was deleted.

0 comments on commit d94bdc4

Please sign in to comment.