From 75c774aa3062befb886b0c1e1f4af6b0e88d3f88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:48:10 +0000 Subject: [PATCH 01/13] Bump aws-actions/amazon-ecr-login from 1 to 2 Bumps [aws-actions/amazon-ecr-login](https://github.com/aws-actions/amazon-ecr-login) from 1 to 2. - [Release notes](https://github.com/aws-actions/amazon-ecr-login/releases) - [Changelog](https://github.com/aws-actions/amazon-ecr-login/blob/main/CHANGELOG.md) - [Commits](https://github.com/aws-actions/amazon-ecr-login/compare/v1...v2) --- updated-dependencies: - dependency-name: aws-actions/amazon-ecr-login dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/reusable-docker-ecr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-docker-ecr.yml b/.github/workflows/reusable-docker-ecr.yml index 9a09493..0fcdbf9 100644 --- a/.github/workflows/reusable-docker-ecr.yml +++ b/.github/workflows/reusable-docker-ecr.yml @@ -47,7 +47,7 @@ jobs: aws-region: ${{ inputs.aws_region }} - name: Login to Amazon ECR - uses: aws-actions/amazon-ecr-login@v1 + uses: aws-actions/amazon-ecr-login@v2 - name: Lowercase repo for container registry run: | From 110975461a5eaebcceb75b9d78223bb4ee2176ee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 12:19:38 +0000 Subject: [PATCH 02/13] Bump ASFHyP3/actions from 0.8.2 to 0.8.3 Bumps [ASFHyP3/actions](https://github.com/asfhyp3/actions) from 0.8.2 to 0.8.3. - [Release notes](https://github.com/asfhyp3/actions/releases) - [Changelog](https://github.com/ASFHyP3/actions/blob/develop/CHANGELOG.md) - [Commits](https://github.com/asfhyp3/actions/compare/v0.8.2...v0.8.3) --- updated-dependencies: - dependency-name: ASFHyP3/actions dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/changelog.yml | 2 +- .github/workflows/create-jira-issue.yml | 2 +- .github/workflows/labeled-pr.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/static-analysis.yml | 2 +- .github/workflows/tag-version.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 600e8b8..05481a0 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -11,6 +11,6 @@ on: - develop jobs: call-changelog-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.3 secrets: USER_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/create-jira-issue.yml b/.github/workflows/create-jira-issue.yml index 3615af1..3a138e9 100644 --- a/.github/workflows/create-jira-issue.yml +++ b/.github/workflows/create-jira-issue.yml @@ -6,7 +6,7 @@ on: jobs: call-create-jira-issue-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.8.3 secrets: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} diff --git a/.github/workflows/labeled-pr.yml b/.github/workflows/labeled-pr.yml index ee8a5f5..103ae29 100644 --- a/.github/workflows/labeled-pr.yml +++ b/.github/workflows/labeled-pr.yml @@ -12,4 +12,4 @@ on: jobs: call-labeled-pr-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5997a7..5890a93 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: call-release-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.3 with: release_prefix: Actions secrets: diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 209c902..6207a26 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -4,4 +4,4 @@ on: push jobs: call-secrets-analysis-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.8.3 diff --git a/.github/workflows/tag-version.yml b/.github/workflows/tag-version.yml index 5053fe6..5130be2 100644 --- a/.github/workflows/tag-version.yml +++ b/.github/workflows/tag-version.yml @@ -7,6 +7,6 @@ on: jobs: call-bump-version-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.3 secrets: USER_TOKEN: ${{ secrets.TOOLS_BOT_PAK }} From a84528f71a08d0f4a8fa302702844c01bc0a737e Mon Sep 17 00:00:00 2001 From: Forrest Williams Date: Thu, 9 Nov 2023 08:35:04 -0600 Subject: [PATCH 03/13] add ruff reusable action --- .github/workflows/reusable-ruff.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/reusable-ruff.yml diff --git a/.github/workflows/reusable-ruff.yml b/.github/workflows/reusable-ruff.yml new file mode 100644 index 0000000..9d1093c --- /dev/null +++ b/.github/workflows/reusable-ruff.yml @@ -0,0 +1,22 @@ +on: + workflow_call: + +jobs: + check-with-ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + - name: Ruff linting check + run: ruff check --output-format=github . + - name: Ruff imports check + run: ruff check --select I --output-format=github . + - name: Ruff format check + run: ruff format check . From d6d3f0fdba310f6165bb9163c12e8130e04bef90 Mon Sep 17 00:00:00 2001 From: Forrest Williams Date: Thu, 9 Nov 2023 08:50:48 -0600 Subject: [PATCH 04/13] update changelog, float python version --- .github/workflows/reusable-ruff.yml | 2 +- CHANGELOG.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reusable-ruff.yml b/.github/workflows/reusable-ruff.yml index 9d1093c..36fde82 100644 --- a/.github/workflows/reusable-ruff.yml +++ b/.github/workflows/reusable-ruff.yml @@ -9,7 +9,7 @@ jobs: - name: Install Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: 3.x - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/CHANGELOG.md b/CHANGELOG.md index f3b787d..f2ad580 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/) and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.8.4] + +### Added +- `reusable-ruff` workflow for perform linting and static analysis with [Ruff](https://github.com/astral-sh/ruff). ## [0.8.3] From d3072f657125f3a35d52d461b0000e402622d231 Mon Sep 17 00:00:00 2001 From: Forrest Williams Date: Thu, 9 Nov 2023 12:24:03 -0600 Subject: [PATCH 05/13] update readme and formatting --- .github/workflows/reusable-ruff.yml | 7 +++- README.md | 61 ++++++++++++++++++++++------- 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/.github/workflows/reusable-ruff.yml b/.github/workflows/reusable-ruff.yml index 36fde82..4bc59d2 100644 --- a/.github/workflows/reusable-ruff.yml +++ b/.github/workflows/reusable-ruff.yml @@ -6,17 +6,22 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - name: Install Python uses: actions/setup-python@v4 with: python-version: 3.x + - name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff + python -m pip install ruff + - name: Ruff linting check run: ruff check --output-format=github . + - name: Ruff imports check run: ruff check --select I --output-format=github . + - name: Ruff format check run: ruff format check . diff --git a/README.md b/README.md index fcc7cfe..1f3a7b0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ on: jobs: call-bump-version-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.4 with: user: tools-bot # Optional; default shown email: UAF-asf-apd@alaska.edu # Optional; default shown @@ -57,7 +57,7 @@ on: jobs: call-changelog-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.4 secrets: USER_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` @@ -77,7 +77,7 @@ on: jobs: call-create-jira-issue-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.8.4 secrets: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} @@ -130,13 +130,13 @@ on: jobs: call-version-info-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.4 with: conda_env_name: hyp3-plugin call-docker-ecr-workflow: needs: call-version-info-workflow - uses: ASFHyP3/actions/.github/workflows/reusable-docker-ecr.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-docker-ecr.yml@v0.8.4 with: version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }} ecr_registry: 845172464411.dkr.ecr.us-west-2.amazonaws.com @@ -171,13 +171,13 @@ on: jobs: call-version-info-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.4 with: conda_env_name: hyp3-plugin call-docker-ghcr-workflow: needs: call-version-info-workflow - uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.8.4 with: version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }} user: ${{ github.actor }} @@ -198,7 +198,7 @@ on: push jobs: call-flake8-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-flake8.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-flake8.yml@v0.8.4 with: local_package_names: hyp3_plugin # Required; comma-seperated list of names that should be considered local to your application excludes: hyp3_plugin/ugly.py # Optional; comma-separated list of glob patterns to exclude from checks @@ -206,6 +206,37 @@ jobs: to ensure the Python code is styled correctly. +### [`reusable-ruff.yml`](./.github/workflows/reusable-ruff.yml) + +Runs [Ruff](https://docs.astral.sh/ruff/) to enforce a configurable Python style guide. Use like: + +```yaml +name: Static analysis + +on: push + +jobs: + call-ruff-workflow: + uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.8.4 +``` + +to ensure the Python code is styled correctly. + +To conform to ASFHyP3's Python style add the following to your project's `pyproject.toml`: +```toml +[tool.ruff] +line-length = 120 +src = ["src", "tests"] + +[tool.ruff.format] +indent-style = "space" +quote-style = "single" + +[tool.ruff.lint.isort] +case-sensitive = true +lines-after-imports = 2 +``` + ### [`reusable-git-object-name.yml`](./.github/workflows/reusable-git-object-name.yml) Outputs the human-readable git object name from [`git describe --dirty --tags --long --match "*[0-9]*"`](https://git-scm.com/docs/git-describe) @@ -226,7 +257,7 @@ on: jobs: call-git-object-name-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-git-object-name.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-git-object-name.yml@v0.8.4 echo-git-object-name-outputs: needs: call-git-object-name-workflow @@ -256,7 +287,7 @@ on: jobs: call-labeled-pr-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.4 ``` to ensure a release label is included on any PR to `main`. @@ -280,7 +311,7 @@ on: jobs: call-pytest-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.8.4 with: local_package_name: hyp3_plugin # Required; package to produce a coverage report for fail_fast: false # Optional; default shown @@ -309,7 +340,7 @@ on: jobs: call-release-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.4 with: release_prefix: HyP3-CI release_branch: main # Optional; default shown @@ -338,7 +369,7 @@ on: jobs: call-release-checklist-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.8.4 permissions: pull-requests: write with: @@ -367,7 +398,7 @@ on: push jobs: call-secrets-analysis-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.8.4 ``` to scan every push for secrets. @@ -393,7 +424,7 @@ on: jobs: call-version-info-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.2 + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.4 with: python_version: '3.9' # Optional; default shown From 2fca54a2f566fc21f29ff516fa77c001c025f6fe Mon Sep 17 00:00:00 2001 From: Forrest Williams Date: Thu, 9 Nov 2023 12:49:02 -0600 Subject: [PATCH 06/13] fix ruff format bug --- .github/workflows/reusable-ruff.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-ruff.yml b/.github/workflows/reusable-ruff.yml index 4bc59d2..d414f40 100644 --- a/.github/workflows/reusable-ruff.yml +++ b/.github/workflows/reusable-ruff.yml @@ -24,4 +24,4 @@ jobs: run: ruff check --select I --output-format=github . - name: Ruff format check - run: ruff format check . + run: ruff format --check . From ccf78d1e42323cab55c832353ffc459dcfd30915 Mon Sep 17 00:00:00 2001 From: Forrest Williams Date: Thu, 9 Nov 2023 13:18:14 -0600 Subject: [PATCH 07/13] use format --diff not --check --- .github/workflows/reusable-ruff.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-ruff.yml b/.github/workflows/reusable-ruff.yml index d414f40..fe24520 100644 --- a/.github/workflows/reusable-ruff.yml +++ b/.github/workflows/reusable-ruff.yml @@ -24,4 +24,4 @@ jobs: run: ruff check --select I --output-format=github . - name: Ruff format check - run: ruff format --check . + run: ruff format --diff . From 52328fd46326473acb4ef72780485a50259f161e Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Thu, 9 Nov 2023 21:38:47 -0900 Subject: [PATCH 08/13] Update ruff config, remove duplicate check command, and add fix commands to README --- .github/workflows/reusable-ruff.yml | 3 --- README.md | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-ruff.yml b/.github/workflows/reusable-ruff.yml index fe24520..b1cc2bd 100644 --- a/.github/workflows/reusable-ruff.yml +++ b/.github/workflows/reusable-ruff.yml @@ -20,8 +20,5 @@ jobs: - name: Ruff linting check run: ruff check --output-format=github . - - name: Ruff imports check - run: ruff check --select I --output-format=github . - - name: Ruff format check run: ruff format --diff . diff --git a/README.md b/README.md index 1f3a7b0..37ff60b 100644 --- a/README.md +++ b/README.md @@ -232,11 +232,28 @@ src = ["src", "tests"] indent-style = "space" quote-style = "single" +[tool.ruff.lint] +extend-select = [ + "UP", # pyupgrade + "D", # pydocstyle + "ANN", # annotations + "PTH", # use-pathlib-pth +] + +[tool.ruff.lint.pydocstyle] +convention = "google" + [tool.ruff.lint.isort] case-sensitive = true lines-after-imports = 2 ``` +Ruff can automatically fix many linting errors and reformat code to match your Python style by running these commands: +```shell +ruff check --fix . +ruff format . +``` + ### [`reusable-git-object-name.yml`](./.github/workflows/reusable-git-object-name.yml) Outputs the human-readable git object name from [`git describe --dirty --tags --long --match "*[0-9]*"`](https://git-scm.com/docs/git-describe) From 7298bea1656c1fee2055ad441a3251de1e24eb16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Nov 2023 12:21:30 +0000 Subject: [PATCH 09/13] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/reusable-ruff.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-ruff.yml b/.github/workflows/reusable-ruff.yml index b1cc2bd..6a0700c 100644 --- a/.github/workflows/reusable-ruff.yml +++ b/.github/workflows/reusable-ruff.yml @@ -5,7 +5,7 @@ jobs: check-with-ruff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Python uses: actions/setup-python@v4 From cbe2ef954e37fc5f9a789d45e85306165e1f9542 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Wed, 29 Nov 2023 18:24:06 -0900 Subject: [PATCH 10/13] Add workflow to update version in README --- .github/workflows/update-examples.yml | 50 +++++++++++++++++++++++++++ CHANGELOG.md | 3 +- README.md | 32 ++++++++--------- 3 files changed, 68 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/update-examples.yml diff --git a/.github/workflows/update-examples.yml b/.github/workflows/update-examples.yml new file mode 100644 index 0000000..7c83454 --- /dev/null +++ b/.github/workflows/update-examples.yml @@ -0,0 +1,50 @@ +name: Update Actions Examples + +on: + push: + tags: + - v* + +jobs: + call-git-object-name-workflow: + uses: ASFHyP3/actions/.github/workflows/reusable-git-object-name.yml@v0.8.4 + + upate_actions_examples: + needs: call-git-object-name-workflow + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.TOOLS_BOT_PAK }} + + - name: Create update branch + id: update + env: + ACTIONS_VERSION: ${{ needs.call-git-object-name-workflow.outputs.name }} + UPDATE_BRANCH: update-examples-to-${{ needs.call-git-object-name-workflow.outputs.name }} + run: | + git config user.name "tools-bot" + git config user.email "UAF-asf-apd@alaska.edu" + + echo "::set-output name=branch::${UPDATE_BRANCH}" + git checkout -b ${UPDATE_BRANCH} + + export SEARCH_PATTERN='(ASFHyP3/actions/.github/workflows/.*.yml)@v[0-9]+\.[0-9]+\.[0-9]+' + sed -i -r "s|$SEARCH_PATTERN|\1@${ACTIONS_VERSION}|g" README.md + + git commit -am "Bump actions example's version to ${ACTIONS_VERSION}" + git push origin ${UPDATE_BRANCH} + + - name: open PR + uses: repo-sync/pull-request@v2 + with: + source_branch: ${{ steps.update.outputs.branch }} + destination_branch: develop + pr_title: Update Actions example versions to ${{ needs.call-git-object-name-workflow.outputs.name }} + pr_body: | + PR created by a new `v*` tag push event + pr_assignee: ASFHyP3/tools + pr_label: tools-bot + pr_draft: false + pr_allow_empty: true + github_token: ${{ secrets.TOOLS_BOT_PAK }} diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ad580..afdc93e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.8.4] ### Added -- `reusable-ruff` workflow for perform linting and static analysis with [Ruff](https://github.com/astral-sh/ruff). +- [`reusable-ruff`](.github/workflows/reusable-ruff.yml) reusable workflow for perform linting and static analysis with [Ruff](https://github.com/astral-sh/ruff). +- [`update-examples`](.github/workflows/update-examples.yml) workflow to keep the pinned version number in the README examples up to date ## [0.8.3] diff --git a/README.md b/README.md index 37ff60b..5d6810c 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ on: jobs: call-bump-version-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.8.3 with: user: tools-bot # Optional; default shown email: UAF-asf-apd@alaska.edu # Optional; default shown @@ -57,7 +57,7 @@ on: jobs: call-changelog-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.8.3 secrets: USER_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` @@ -77,7 +77,7 @@ on: jobs: call-create-jira-issue-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-create-jira-issue.yml@v0.8.3 secrets: JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} @@ -130,13 +130,13 @@ on: jobs: call-version-info-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.3 with: conda_env_name: hyp3-plugin call-docker-ecr-workflow: needs: call-version-info-workflow - uses: ASFHyP3/actions/.github/workflows/reusable-docker-ecr.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-docker-ecr.yml@v0.8.3 with: version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }} ecr_registry: 845172464411.dkr.ecr.us-west-2.amazonaws.com @@ -171,13 +171,13 @@ on: jobs: call-version-info-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.3 with: conda_env_name: hyp3-plugin call-docker-ghcr-workflow: needs: call-version-info-workflow - uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.8.3 with: version_tag: ${{ needs.call-version-info-workflow.outputs.version_tag }} user: ${{ github.actor }} @@ -198,7 +198,7 @@ on: push jobs: call-flake8-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-flake8.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-flake8.yml@v0.8.3 with: local_package_names: hyp3_plugin # Required; comma-seperated list of names that should be considered local to your application excludes: hyp3_plugin/ugly.py # Optional; comma-separated list of glob patterns to exclude from checks @@ -217,7 +217,7 @@ on: push jobs: call-ruff-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.8.3 ``` to ensure the Python code is styled correctly. @@ -274,7 +274,7 @@ on: jobs: call-git-object-name-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-git-object-name.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-git-object-name.yml@v0.8.3 echo-git-object-name-outputs: needs: call-git-object-name-workflow @@ -304,7 +304,7 @@ on: jobs: call-labeled-pr-check-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.8.3 ``` to ensure a release label is included on any PR to `main`. @@ -328,7 +328,7 @@ on: jobs: call-pytest-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.8.3 with: local_package_name: hyp3_plugin # Required; package to produce a coverage report for fail_fast: false # Optional; default shown @@ -357,7 +357,7 @@ on: jobs: call-release-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.8.3 with: release_prefix: HyP3-CI release_branch: main # Optional; default shown @@ -386,7 +386,7 @@ on: jobs: call-release-checklist-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.8.3 permissions: pull-requests: write with: @@ -415,7 +415,7 @@ on: push jobs: call-secrets-analysis-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.8.3 ``` to scan every push for secrets. @@ -441,7 +441,7 @@ on: jobs: call-version-info-workflow: - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.4 + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.8.3 with: python_version: '3.9' # Optional; default shown From f6cec4e4c8f2d2003ccd2674f6b5f1a3600de7e7 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Wed, 29 Nov 2023 18:49:33 -0900 Subject: [PATCH 11/13] uniform changelogstyle --- CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index afdc93e..fc3a3a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,10 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.8.4] ### Added -- [`reusable-ruff`](.github/workflows/reusable-ruff.yml) reusable workflow for perform linting and static analysis with [Ruff](https://github.com/astral-sh/ruff). -- [`update-examples`](.github/workflows/update-examples.yml) workflow to keep the pinned version number in the README examples up to date +- [`reusable-ruff`](.github/workflows/reusable-ruff.yml) reusable workflow for perform linting and static analysis +- with [Ruff](https://github.com/astral-sh/ruff). +- [`update-examples`](.github/workflows/update-examples.yml) workflow to keep the pinned version number in the README +- examples up to date. ## [0.8.3] @@ -20,7 +22,8 @@ and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.8.2] ### Changed -* `reusable-pytest` and `reusable-version-info` now use [`setup-micromamba`](https://github.com/mamba-org/setup-micromamba) rather than `provision-with-micromamba` which has been deprecated. +* `reusable-pytest` and `reusable-version-info` now use [`setup-micromamba`](https://github.com/mamba-org/setup-micromamba) rather than + `provision-with-micromamba` which has been deprecated. ## [0.8.1] From f1ca4882bead6990ef5e6220bb4cd9a348d02e91 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Wed, 29 Nov 2023 18:57:23 -0900 Subject: [PATCH 12/13] more appropriate version number --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc3a3a3..f4d3b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [PEP 440](https://www.python.org/dev/peps/pep-0440/) and uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.8.4] +## [0.9.0] ### Added - [`reusable-ruff`](.github/workflows/reusable-ruff.yml) reusable workflow for perform linting and static analysis From e80df631f32f341197b2fb6f3fb5b991c194eb01 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Thu, 30 Nov 2023 11:45:18 -0900 Subject: [PATCH 13/13] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 37ff60b..68f7da4 100644 --- a/README.md +++ b/README.md @@ -234,10 +234,11 @@ quote-style = "single" [tool.ruff.lint] extend-select = [ - "UP", # pyupgrade - "D", # pydocstyle - "ANN", # annotations - "PTH", # use-pathlib-pth + "I", # isort: https://docs.astral.sh/ruff/rules/#isort-i + "UP", # pyupgrade: https://docs.astral.sh/ruff/rules/#pyupgrade-up + "D", # pydocstyle: https://docs.astral.sh/ruff/rules/#pydocstyle-d + "ANN", # annotations: https://docs.astral.sh/ruff/rules/#flake8-annotations-ann + "PTH", # use-pathlib-pth: https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth ] [tool.ruff.lint.pydocstyle]