Skip to content

Commit

Permalink
Merge branch 'main' into hexPitch
Browse files Browse the repository at this point in the history
  • Loading branch information
mgjarrett committed Oct 4, 2024
2 parents 86b2468 + b436537 commit 428628c
Show file tree
Hide file tree
Showing 292 changed files with 16,087 additions and 9,512 deletions.
35 changes: 0 additions & 35 deletions .coveragerc

This file was deleted.

27 changes: 15 additions & 12 deletions .github/workflows/black.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ name: black

on: [push, pull_request]

permissions:
contents: read

# use workaround due to: https://github.com/psf/black/issues/2079#issuecomment-812359146
jobs:
check-formatting:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Black
run: pip install 'black==22.6.0'
- name: Run black --check .
run: black --check .
check-formatting:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Install Black
run: pip install 'black==22.6.0'
- name: Run black --check .
run: black --check .
34 changes: 23 additions & 11 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Coverage

permissions:
contents: read

on:
push:
branches:
Expand All @@ -10,9 +13,15 @@ on:
paths-ignore:
- 'doc/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-22.04
# Deploying coverage to coveralls.io should not happen on forks
if: github.repository == 'terrapower/armi'
runs-on: ubuntu-24.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
Expand All @@ -24,16 +33,19 @@ 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=pyproject.toml -m pytest -n 4 --cov=armi --cov-config=pyproject.toml --cov-report=lcov --ignore=venv armi
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=pyproject.toml -m pytest --cov=armi --cov-config=pyproject.toml --cov-report=lcov --cov-append --ignore=venv armi/tests/test_mpiFeatures.py || true
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=pyproject.toml -m pytest --cov=armi --cov-config=pyproject.toml --cov-report=lcov --cov-append --ignore=venv armi/tests/test_mpiParameters.py || true
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=pyproject.toml -m pytest --cov=armi --cov-config=pyproject.toml --cov-report=lcov --cov-append --ignore=venv armi/tests/test_mpiDirectoryChangers.py || true
coverage combine --rcfile=pyproject.toml --keep -a
- name: Publish to coveralls.io
uses: coverallsapp/github-action@v1.1.2
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
file: coverage.lcov
20 changes: 14 additions & 6 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

# Building and deploying docs is broken on forked repos
if: github.repository == 'terrapower/armi'
runs-on: ubuntu-22.04

steps:
Expand All @@ -22,14 +27,17 @@ 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
uses: ts-graphviz/setup-graphviz@v2.0.2
- 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
uses: JamesIves/github-pages-deploy-action@v4.6.1
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository-name: ${{ github.repository_owner }}/terrapower.github.io
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/find_test_crumbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
"armi/logs/armiRun.mpi.log",
"armi/tests/tutorials/case-suite/",
"armi/tests/tutorials/logs/",
"armiRun.h5",
"logs/",
]


Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/licensechecker.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Check License Lines

permissions:
contents: read

on: [push, pull_request]

jobs:
check-license-lines:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@master
- name: Check License Lines
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Linting

permissions:
contents: read

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
Expand All @@ -15,7 +18,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 check .
37 changes: 37 additions & 0 deletions .github/workflows/mac_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ARMI MacOS Tests

permissions:
contents: read

on:
push:
branches:
- main
paths-ignore:
- 'doc/**'
pull_request:
paths-ignore:
- 'doc/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

runs-on: macos-14

steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
- name: Upgrade PIP
run: python -m pip install --upgrade pip
- name: Run Unit Tests on MacOS
run: |
brew install openmpi
pip install -e .[memprof,mpi,test]
pytest -n 4 armi
27 changes: 27 additions & 0 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow warns and then closes PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see: https://github.com/actions/stale
name: Mark Stale PRs

on:
schedule:
# once a day at 3:14 AM
- cron: '14 3 * * *'

permissions:
pull-requests: write

jobs:
stale:
runs-on: ubuntu-24.04
steps:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "This pull request has been automatically marked as stale because it has not had any activity in the last 100 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions."
stale-pr-label: "stale"
days-before-pr-stale: 100
days-before-pr-close: 7
days-before-issue-stale: -1
operations-per-run: 100
22 changes: 16 additions & 6 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: ARMI unit tests

permissions:
contents: read

on:
push:
paths-ignore:
Expand All @@ -8,13 +11,17 @@ on:
paths-ignore:
- 'doc/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
python: [3.7, 3.8, 3.9, '3.10', '3.11']
python: [3.9, '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v2
Expand All @@ -26,7 +33,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
run: |
pip install -e .[memprof,mpi,test]
pytest -n 4 armi
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=pyproject.toml -m pytest --cov=armi --cov-config=pyproject.toml --ignore=venv armi/tests/test_mpiFeatures.py || true
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=pyproject.toml -m pytest --cov=armi --cov-config=pyproject.toml --ignore=venv armi/tests/test_mpiParameters.py || true
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=pyproject.toml -m pytest --cov=armi --cov-config=pyproject.toml --ignore=venv armi/utils/tests/test_directoryChangersMpi.py || true
13 changes: 8 additions & 5 deletions .github/workflows/validatemanifest.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: Validate Manifest

permissions:
contents: read

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
- name: Setup Python
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
18 changes: 14 additions & 4 deletions .github/workflows/wintests.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
name: ARMI Windows tests

permissions:
contents: read

on:
push:
branches:
- main
paths-ignore:
- 'doc/**'
pull_request:
paths-ignore:
- 'doc/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:

Expand All @@ -21,9 +30,10 @@ 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 mpi4py==3.1.6
pip install -e .[memprof,mpi,test]
pytest -n 4 armi
- name: Find Test Crumbs
run: python .github/workflows/find_test_crumbs.py
Loading

0 comments on commit 428628c

Please sign in to comment.