Skip to content

Commit

Permalink
Merge branch 'main' into py_313
Browse files Browse the repository at this point in the history
  • Loading branch information
john-science committed Oct 31, 2024
2 parents 74ece1b + e777af7 commit 199a624
Show file tree
Hide file tree
Showing 264 changed files with 15,744 additions and 12,199 deletions.
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-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 .
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 .
15 changes: 13 additions & 2 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,8 +13,14 @@ on:
paths-ignore:
- 'doc/**'

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

jobs:
build:
# 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 }}
Expand All @@ -33,9 +42,11 @@ jobs:
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
coverage report --rcfile=pyproject.toml -i --skip-empty --skip-covered --sort=cover --fail-under=90
- 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
7 changes: 6 additions & 1 deletion .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 Down
5 changes: 5 additions & 0 deletions .github/workflows/licensechecker.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Check License Lines

permissions:
contents: read

on: [push, pull_request]

jobs:
check-license-lines:
runs-on: ubuntu-24.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linting.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Linting

permissions:
contents: read

on: [push, pull_request]

jobs:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/mac_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
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:

Expand Down
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
8 changes: 8 additions & 0 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,6 +11,10 @@ on:
paths-ignore:
- 'doc/**'

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

jobs:
build:

Expand All @@ -33,3 +40,4 @@ jobs:
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
3 changes: 3 additions & 0 deletions .github/workflows/validatemanifest.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Validate Manifest

permissions:
contents: read

on: [push, pull_request]

jobs:
Expand Down
9 changes: 9 additions & 0 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 Down
102 changes: 51 additions & 51 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
# No non-source python resources.
# No non-source python resources
*.pyc
*.pyo
*.pyd
*.pyo
*.pyx

# No build artifacts
build
wheelhouse
*.lib
*.dll
bin/*
*.lib
.apidocs/
/bin
dist/
armi/tests/tutorials/case-suite
bin/*
build
coverage.lcov
coverage.xml
coverage_results.*
dist-*/
dist/
doc/_build
doc/user/tutorials
doc/tutorials/anl-afci-177*
doc/tutorials/case-suite
armi/tests/tutorials/case-suite
.apidocs/
doc/anl-afci-177
doc/gallery
doc/gallery-src/framework/*.yaml
.coverage
coverage.xml
coverage.lcov
coverage_results.*
doc/tutorials/anl-afci-177*
doc/tutorials/case-suite
doc/user/tutorials
htmlcov/
monkeytype.*
wheelhouse

# No workspace crumbs.
*~
.*.swp
.settings
.vscode
.project
.metadata
.idea/
.pydevproject
# No workspace crumbs
**/.coverage*
**/__pycache__
**/logs/*
*.ascii
*.egg-info/
*.sublime-project
*.sublime-workspace
*.egg-info/
phabricator-lint.txt
temp-*
tags
*.temp
.externalToolBuilders/
*~
.*.swp
.cache/
.coverage
.DS_Store
.externalToolBuilders/
.hypothesis/
.idea/
.ipynb_checkpoints
.metadata
.mypy_cache/
.project
.pydevproject
.pytest_cache/
pytestdebug.log
dump-temp-*
dump-tests*
.ruff_cache/
.settings
.tox
.vim-bookmarks
.vscode
armi-venv/*
dump-temp-*
dump-tests*
phabricator-lint.txt
pytestdebug.log
reportsOutputFiles/
tags
temp-*
venv*/
.mypy_cache/
**/__pycache__
**/.coverage*
**/logs/*
*.ascii

# Misc. exclusions
*.html
*.diff
# Ignore common data files
*.avi
*.ppm
*.mp4
*.diff
*.h5
*.html
*.mp4
*.ppm
*.txt

# metadata file specific to MacOS
.DS_Store

# vis files
*.vtu
*.vtd
*.vtu
*.xdmf

# fixtures
.ipynb_checkpoints
.tox
5 changes: 2 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ found in [#touranarmi]_.

Quick start
-----------
Before starting, you need to have `Python <https://www.python.org/downloads/>`_ 3.9+ on
Windows or Linux.
Before starting, you need to have `Python <https://www.python.org/downloads/>`_ 3.9+.

Get the ARMI code, install the prerequisites, and fire up the launcher with the following
commands. You probably want to do this in a virtual environment as described in the `Installation
Expand All @@ -70,7 +69,7 @@ dependencies could conflict with your system dependencies.

First, upgrade your version of pip::

$ pip install pip>=22.1
$ pip install -U pip>=22.1

Now clone and install ARMI::

Expand Down
15 changes: 0 additions & 15 deletions armi/_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@
# limitations under the License.

"""Code that needs to be executed before most ARMI components are safe to import."""

import sys

# This is a courtesy, to help people who accidently run ARMI with an old version of Python.
if (
sys.version_info.major < 3
or sys.version_info.major == 3
and sys.version_info.minor < 7
):
raise RuntimeError(
"ARMI highly recommends using Python 3.9 or 3.11. Are you sure you are using the "
f"correct interpreter?\nYou are using: {sys.executable}"
)


from armi.nucDirectory import nuclideBases # noqa: E402

# Nuclide bases get built explicitly here to have better determinism
Expand Down
Loading

0 comments on commit 199a624

Please sign in to comment.