diff --git a/.cicd/Jenkinsfile b/.cicd/Jenkinsfile deleted file mode 100644 index 4d0ce26b2..000000000 --- a/.cicd/Jenkinsfile +++ /dev/null @@ -1,75 +0,0 @@ -pipeline { - agent none - stages { - stage('Run UFS Workflow Tools') { - parallel { - stage('Run UFS Workflow tools on Cheyenne') { - agent { - label "cheyenne" - } - steps { - cleanWs() - checkout changelog: false, poll: false, scm: scmGit(branches: [[name: 'develop']], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: 'https://github.com/ufs-community/workflow-tools']]) - sh ''' - module use /glade/work/epicufsrt/contrib/miniconda3/modulefiles - module load miniconda3/4.12.0 - conda activate workflow_tools - - ${WORKSPACE}/.cicd/jobs/lint_and_test.sh - ''' - } - } - - stage('Run UFS Workflow tools on Jet') { - agent { - label "jet" - } - steps { - cleanWs() - checkout changelog: false, poll: false, scm: scmGit(branches: [[name: 'develop']], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: 'https://github.com/ufs-community/workflow-tools']]) - sh ''' - module use /mnt/lfs4/HFIP/hfv3gfs/role.epic/miniconda3/modulefiles - module load miniconda3/4.12.0 - conda activate workflow_tools - - ${WORKSPACE}/.cicd/jobs/lint_and_test.sh - ''' - } - } - - stage('Run UFS Workflow tools on Hera') { - agent { - label "hera" - } - steps { - cleanWs() - checkout changelog: false, poll: false, scm: scmGit(branches: [[name: 'develop']], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: 'https://github.com/ufs-community/workflow-tools']]) - sh ''' - module use /scratch1/NCEPDEV/nems/role.epic/miniconda3/modulefiles - module load miniconda3/4.12.0 - conda activate workflow_tools - - ${WORKSPACE}/.cicd/jobs/lint_and_test.sh - ''' - } - } - stage('Run UFS Workflow tools on Orion') { - agent { - label "Orion" - } - steps { - cleanWs() - checkout changelog: false, poll: false, scm: scmGit(branches: [[name: 'develop']], extensions: [], gitTool: 'Default', userRemoteConfigs: [[url: 'https://github.com/ufs-community/workflow-tools']]) - sh ''' - module use /work/noaa/epic-ps/role-epic-ps/miniconda3/modulefiles - module load miniconda3/4.12.0 - conda activate workflow_tools - - ${WORKSPACE}/.cicd/jobs/lint_and_test.sh - ''' - } - } - } - } - } -} diff --git a/.cicd/jobs/lint_and_test.sh b/.cicd/jobs/lint_and_test.sh deleted file mode 100755 index 047c042d8..000000000 --- a/.cicd/jobs/lint_and_test.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash -ux - -# Setup PYTHONPATH for uwtools -export PYTHONPATH=${PWD}:${PWD}/src - -# Check for pytest and pylint -for pkg in pytest pylint ; do - if hash $pkg 2>/dev/null; then - echo "$pkg installed, moving on!". - else - echo "$pkg is not installed" - exit 1 - fi -done - -# Run tests -pytest -k "not test_validate_yaml_salad" | tee -a ${WORKSPACE}/results.txt -status=${PIPESTATUS[0]} -test $status == 0 || ( echo "pytest failed" && exit $status ) - -# Lint -pylint --ignore-imports=y tests scripts src/uwtools -status=$? -test $status == 0 || ( echo "linting failed" && exit $status ) - diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8b058dbd9..6c04a87b5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,10 +1,10 @@ # See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners -# Side-wide code owners: +# Code owners: * @NaureenBharwaniNOAA @christinaholtNOAA @elcarpenterNOAA @fgabelmannjr @maddenp-noaa @weirae -# Documentation-system config owners: +# Documentation owners: .readthedocs.yaml @christinaholtNOAA @jprestop @maddenp-noaa docs/* @christinaholtNOAA @jprestop @maddenp-noaa diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 83539d78b..d649b8e26 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -20,7 +20,7 @@ Your desired feature may already have an issue created! If so, please consider using that Issue to expand on the feature capabilities or requirements. Your bug may have already been reported! -Please look through the existing issues on the [Issue tracker](https://github.com/ufs-community/workflow-tools/issues) to see if this issue has been created. +Please look through the existing issues on the [Issue tracker](https://github.com/ufs-community/uwtools/issues) to see if this issue has been created. If so, please consider using that Issue to add any additional information. **Expected behavior** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 9206fe28e..bef50a593 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -18,7 +18,7 @@ Please copy any output files into a Github gist (for e.g.) and link to the gist, If this is a bug, please consider using the [Bug Report](./bug_report.md) template. Your issue may already have been created! -Please look through the existing issues on the [Issue tracker](https://github.com/ufs-community/workflow-tools/issues) to see if this issue has been created. +Please look through the existing issues on the [Issue tracker](https://github.com/ufs-community/uwtools/issues) to see if this issue has been created. If so, please consider using that Issue to add any additional information. **Description** diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 041d9ff60..ebb860eaf 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,61 +1,39 @@ -**Description** +INSTRUCTIONS - - - +- Please do not commit temporary, backup, or binary files. +- Please remove commented-out code. +- Please ensure code, config files, etc., contain no hardcoded paths. +- Please format code snippets in PR description/comments with ```code block``` or `inline code`. +- Please consider adding your own review comments to guide other reviewers. - - +--> -**Type of change** +**Synopsis** -Please delete options that are not relevant. + -- [ ] Bug fix (non-breaking change which fixes an issue) -- [ ] New feature (non-breaking change which adds functionality) -- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) -- [ ] This change requires a documentation update +**Type** -**How Has This Been Tested?** + - - - +- [ ] Bug fix (corrects a known issue) +- [ ] Code maintenance (refactoring, etc. without behavior change) +- [ ] Documentation +- [ ] Enhancement (adds a new functionality) +- [ ] Tooling (CI, code-quality, packaging, revision-control, etc.) - - +**Impact** -**Checklist** + + +- [ ] This is a non-breaking change (existing functionality continues to work as expected) +- [ ] This is a breaking change (changes existing functionality) -- [ ] My code follows the style guidelines of this project -- [ ] I have performed a self-review of my own code -- [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] My changes need updates to the documentation. I have made corresponding changes to the documentation -- [ ] My changes generate no new warnings -- [ ] New and existing tests pass with my changes -- [ ] Any dependent changes have been merged and published +**Checklist** - -Update the final commit message (when squashing and merging) to include `Co-authored-by: name ` (e.g. `Co-authored-by: Jane Doe `). Each co-author must have their own line, and the email address used must be the email address connected with their GitHub account. ---> +- [ ] I have added myself and any co-authors to the PR's _Assignees_ list. +- [ ] I have reviewed the documentation and have made any updates necessitated by this change. diff --git a/.github/scripts/build-documentation b/.github/scripts/build-documentation deleted file mode 100755 index 1e37d576d..000000000 --- a/.github/scripts/build-documentation +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# Set up build environment. - -set -e -source conda/etc/profile.d/conda.sh -conda activate -pip install sphinx sphinx-gallery sphinx_rtd_theme -set +e - -# Path to docs directory relative to top level of repository. $GITHUB_WORKSPACE -# is set if the actions/checkout@v2 action is run first. - -DOCS_DIR=$GITHUB_WORKSPACE/docs - -# Build the documentation. - -buildcmd="make -C $DOCS_DIR clean html" -$buildcmd -status=$? - -# Copy HTML output to create an artifact. - -dstdir=artifact/documentation -mkdir -pv $dstdir -cp -r $DOCS_DIR/_build/html/* $dstdir/ - -# If the build failed and/or the warnings log has content, copy it to the -# artifact and documentation directories, and print a report about issues that -# were encountered during the build. - -warnings=$DOCS_DIR/_build/warnings.log - -if [[ $status != 0 || -s $warnings ]]; then - test $status -eq 0 && echo "ERROR: '$buildcmd' failed with status $status." - cp -v $warnings artifact/ - cp -v $warnings $dstdir/ - echo ERROR: Found warnings/errors! - echo Summary: - grep WARNING $warnings - grep ERROR $warnings - grep CRITICAL $warnings - echo Review this log file or download $(basename $warnings) artifact. - exit 1 -fi - -echo INFO: Documentation was built successfully. diff --git a/.github/scripts/common.sh b/.github/scripts/common.sh new file mode 100644 index 000000000..a1fa7255e --- /dev/null +++ b/.github/scripts/common.sh @@ -0,0 +1,9 @@ +# Shared resources for workflow scripts. + +CI_CONDA_DIR=/tmp/conda +CI_CONDA_SH=$CI_CONDA_DIR/etc/profile.d/conda.sh + +ci_conda_activate() { + source $CI_CONDA_SH + conda activate +} diff --git a/.github/scripts/format-check.sh b/.github/scripts/format-check.sh new file mode 100755 index 000000000..5483487f9 --- /dev/null +++ b/.github/scripts/format-check.sh @@ -0,0 +1,17 @@ +# Actions invokes script with: bash -e