From c62420da961116549bac4059b30e9ebbc17be930 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 13 Dec 2022 09:53:41 -0500 Subject: [PATCH 1/2] fix the norm in hosts.py after adding singularity --- workflow/hosts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/hosts.py b/workflow/hosts.py index ee9510df9e..b97ac67d89 100644 --- a/workflow/hosts.py +++ b/workflow/hosts.py @@ -32,7 +32,7 @@ def __init__(self, host=None): def detect(cls): machine = 'NOTFOUND' - container = os.getenv('SINGULARITY_NAME') + container = os.getenv('SINGULARITY_NAME', None) if os.path.exists('/scratch1/NCEPDEV'): machine = 'HERA' @@ -44,7 +44,7 @@ def detect(cls): machine = 'WCOSS2' elif os.path.exists('/data/prod'): machine = 'S4' - elif container != None: + elif container is not None: machine = 'CONTAINER' if machine not in Host.SUPPORTED_HOSTS: From f5366d7d4903176c337207e3f47eb4ca2c5ed177 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 13 Dec 2022 09:55:42 -0500 Subject: [PATCH 2/2] ignore .git and .github dirs when checking norms --- .github/workflows/pynorms.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pynorms.yaml b/.github/workflows/pynorms.yaml index 6f9046c734..3d90e9b221 100644 --- a/.github/workflows/pynorms.yaml +++ b/.github/workflows/pynorms.yaml @@ -21,4 +21,4 @@ jobs: - name: Run pycodestyle run: | cd $GITHUB_WORKSPACE/global-workflow - pycodestyle -v --config ./.pycodestyle . + pycodestyle -v --config ./.pycodestyle --exclude='.git,.github' ./