diff --git a/.github/workflows/black.yaml b/.github/workflows/black.yaml deleted file mode 100644 index 5e8b698d6..000000000 --- a/.github/workflows/black.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: black - -on: [push, pull_request] - -# 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 . diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml deleted file mode 100644 index b3cd8de03..000000000 --- a/.github/workflows/coverage.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Coverage - -on: - push: - branches: - - main - paths-ignore: - - 'doc/**' - pull_request: - paths-ignore: - - 'doc/**' - -jobs: - build: - runs-on: ubuntu-22.04 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: '3.11' - - name: Update package index - run: sudo apt-get update - - 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 - coverage combine --rcfile=pyproject.toml --keep -a - - name: Publish to coveralls.io - uses: coverallsapp/github-action@v1.1.2 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - path-to-lcov: coverage.lcov diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml deleted file mode 100644 index 4e928c4f7..000000000 --- a/.github/workflows/docs.yaml +++ /dev/null @@ -1,41 +0,0 @@ -name: Documentation - -on: - push: - branches: - - main - -jobs: - build: - - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Update package index - run: sudo apt-get update - - name: Install mpi libs - run: sudo apt-get -y install libopenmpi-dev - - name: Install Pandoc - run: sudo apt-get -y install pandoc - - name: Setup Graphviz - uses: ts-graphviz/setup-graphviz@v1 - - name: Make HTML Docs - 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: - token: ${{ secrets.ACCESS_TOKEN }} - repository-name: ${{ github.repository_owner }}/terrapower.github.io - branch: main - folder: doc/_build/html - target-folder: armi diff --git a/.github/workflows/licensechecker.yaml b/.github/workflows/licensechecker.yaml deleted file mode 100644 index 8663b647c..000000000 --- a/.github/workflows/licensechecker.yaml +++ /dev/null @@ -1,9 +0,0 @@ -name: Check License Lines -on: [push, pull_request] -jobs: - check-license-lines: - runs-on: ubuntu-22.04 - steps: - - uses: actions/checkout@master - - name: Check License Lines - uses: kt3k/license_checker@v1.0.6 diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml deleted file mode 100644 index c9cba039e..000000000 --- a/.github/workflows/linting.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Linting - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: '3.9' - - name: Update package index - run: sudo apt-get update - - name: Run Linter - run: | - pip install -e .[test] - ruff . diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml deleted file mode 100644 index 15c0b2364..000000000 --- a/.github/workflows/unittests.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: ARMI unit tests - -on: - push: - paths-ignore: - - 'doc/**' - pull_request: - paths-ignore: - - 'doc/**' - -jobs: - build: - - runs-on: ubuntu-22.04 - strategy: - matrix: - python: [3.7, 3.8, 3.9, '3.10', '3.11'] - - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - name: Update package index - run: sudo apt-get update - - name: Install mpi libs - run: sudo apt-get -y install libopenmpi-dev - - 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=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 - coverage combine --rcfile=pyproject.toml --keep -a diff --git a/.github/workflows/validatemanifest.py b/.github/workflows/validatemanifest.py deleted file mode 100644 index 2e1fd901a..000000000 --- a/.github/workflows/validatemanifest.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2022 TerraPower, LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" -Validating the package-data in the pyproject.toml. - -Validate that we aren't trying to include files that don't exist. -""" - -from glob import glob -import os -import toml - -# CONSTANTS -ARMI_DIR = "armi/" -PRPROJECT = "pyproject.toml" - - -def main(): - # parse the data files out of the pyproject.toml - txt = open(PRPROJECT, "r").read() - data = toml.loads(txt) - fileChunks = data["tool"]["setuptools"]["package-data"]["armi"] - - # loop through each line in the package-data and find all the file paths - errors = [] - for i, line in enumerate(fileChunks): - # make sure the file exists - path = ARMI_DIR + line.strip() - if "*" in path: - paths = [f for f in glob(path) if len(f) > 3] - if not len(paths): - errors.append((i, path)) - else: - if not os.path.exists(path): - errors.append((i, path)) - - # If there were any missing files, raise an Error. - if errors: - for (i, line) in errors: - print("Nonexistant file on line {}: {}".format(i, line)) - raise ValueError("Package-data file is incorrect: includes non-existant files.") - - -if __name__ == "__main__": - main() diff --git a/.github/workflows/validatemanifest.yaml b/.github/workflows/validatemanifest.yaml deleted file mode 100644 index 90b53f0be..000000000 --- a/.github/workflows/validatemanifest.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Validate Manifest - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v2 - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: '3.11' - - name: Validate Manifest - run: | - pip install toml - python .github/workflows/validatemanifest.py diff --git a/.github/workflows/wintests.yaml b/.github/workflows/wintests.yaml index 132e22529..b733177f4 100644 --- a/.github/workflows/wintests.yaml +++ b/.github/workflows/wintests.yaml @@ -1,4 +1,4 @@ -name: ARMI Windows tests +name: ARMI Windows Reactor tests on: push: @@ -24,6 +24,6 @@ jobs: - name: Run Unit Tests on Windows run: | pip install -e .[memprof,mpi,test] - pytest armi + pytest armi/reactor - name: Find Test Crumbs run: python .github/workflows/find_test_crumbs.py diff --git a/.github/workflows/wintests2.yaml b/.github/workflows/wintests2.yaml new file mode 100644 index 000000000..c819dbece --- /dev/null +++ b/.github/workflows/wintests2.yaml @@ -0,0 +1,29 @@ +name: ARMI Windows Physics tests + +on: + push: + paths-ignore: + - 'doc/**' + pull_request: + paths-ignore: + - 'doc/**' + +jobs: + build: + + runs-on: windows-2022 + + 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 Windows + run: | + pip install -e .[memprof,mpi,test] + pytest armi/physics + - name: Find Test Crumbs + run: python .github/workflows/find_test_crumbs.py diff --git a/.github/workflows/wintests3.yaml b/.github/workflows/wintests3.yaml new file mode 100644 index 000000000..85578d271 --- /dev/null +++ b/.github/workflows/wintests3.yaml @@ -0,0 +1,29 @@ +name: ARMI Windows tests + +on: + push: + paths-ignore: + - 'doc/**' + pull_request: + paths-ignore: + - 'doc/**' + +jobs: + build: + + runs-on: windows-2022 + + 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 Windows + run: | + pip install -e .[memprof,mpi,test] + pytest armi/tests + - name: Find Test Crumbs + run: python .github/workflows/find_test_crumbs.py