From f0a975dac289690924cf7c03c6ee18684a813f98 Mon Sep 17 00:00:00 2001 From: Jason Boutte Date: Wed, 15 Dec 2021 12:56:24 -0800 Subject: [PATCH] Updates pre-commit config and adds related fixes --- .github/workflows/srt.yml | 2 +- .pre-commit-config.yaml | 8 +- config/cesm/machines/config_machines.xml | 2 +- conftest.py | 7 +- doc/source/users_guide/testing.rst | 4 +- scripts/lib/CIME/SystemTests/ers2.py | 2 +- scripts/lib/CIME/SystemTests/pgn.py | 4 +- .../SystemTests/test_utils/user_nl_utils.py | 10 +- scripts/lib/CIME/XML/machines.py | 11 +- scripts/lib/CIME/XML/test_reporter.py | 5 +- scripts/lib/CIME/provenance.py | 8 +- .../CIME/tests/scripts_regression_tests.py | 132 +++++++++++------- .../lib/CIME/tests/test_sys_create_newcase.py | 44 ++++-- .../lib/CIME/tests/test_sys_test_scheduler.py | 88 +++++++++--- scripts/lib/CIME/tests/test_sys_unittest.py | 6 +- .../lib/CIME/tests/test_unit_user_nl_utils.py | 86 ++++++------ scripts/lib/CIME/utils.py | 9 +- setup.cfg | 2 +- src/build_scripts/buildlib.gptl | 17 +-- 19 files changed, 286 insertions(+), 161 deletions(-) diff --git a/.github/workflows/srt.yml b/.github/workflows/srt.yml index a21efdd8d98..4a9bef5e5fb 100644 --- a/.github/workflows/srt.yml +++ b/.github/workflows/srt.yml @@ -24,7 +24,7 @@ jobs: python-version: 3.9 - name: Install and run pre-commit uses: pre-commit/action@v2.0.3 - + # This workflow contains a single job called "build" build: # The type of runner that the job will run on diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a3b2b182d5d..55c25c564d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,4 @@ -exclude: 'utils/' +exclude: ^utils/.*$ repos: - repo: https://github.com/pre-commit/pre-commit-hooks @@ -16,12 +16,8 @@ repos: - --disable=I,C,R,logging-not-lazy,wildcard-import,unused-wildcard-import,fixme,broad-except,bare-except,eval-used,exec-used,global-statement,logging-format-interpolation,no-name-in-module,arguments-renamed,unspecified-encoding,protected-access,import-error files: 'scripts/lib/CIME' exclude: 'scripts/lib/CIME/tests' - - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 - hooks: - - id: flake8 - repo: https://github.com/psf/black rev: 21.10b0 hooks: - id: black - exclude: "config" + files: 'scripts/lib/CIME' diff --git a/config/cesm/machines/config_machines.xml b/config/cesm/machines/config_machines.xml index 50a046266b7..1180f26f25a 100644 --- a/config/cesm/machines/config_machines.xml +++ b/config/cesm/machines/config_machines.xml @@ -543,7 +543,7 @@ This allows using a different mpirun command to launch unit tests cray-netcdf-hdf5parallel cray-hdf5-parallel - cray-parallel-netcdf + cray-parallel-netcdf