diff --git a/{{cookiecutter.__project_name}}/.github/workflows/changelog.yml b/{{cookiecutter.__project_name}}/.github/workflows/changelog.yml index 5187c11..1116782 100644 --- a/{{cookiecutter.__project_name}}/.github/workflows/changelog.yml +++ b/{{cookiecutter.__project_name}}/.github/workflows/changelog.yml @@ -14,6 +14,4 @@ on: jobs: call-changelog-check-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.7.1 - secrets: - USER_TOKEN: {{'${{ secrets.GITHUB_TOKEN }}'}} + uses: ASFHyP3/actions/.github/workflows/reusable-changelog-check.yml@v0.11.2 diff --git a/{{cookiecutter.__project_name}}/.github/workflows/labeled-pr.yml b/{{cookiecutter.__project_name}}/.github/workflows/labeled-pr.yml index fffab93..50e66b7 100644 --- a/{{cookiecutter.__project_name}}/.github/workflows/labeled-pr.yml +++ b/{{cookiecutter.__project_name}}/.github/workflows/labeled-pr.yml @@ -13,4 +13,4 @@ on: jobs: call-labeled-pr-check-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.7.1 + uses: ASFHyP3/actions/.github/workflows/reusable-labeled-pr-check.yml@v0.11.2 diff --git a/{{cookiecutter.__project_name}}/.github/workflows/release-checklist-comment.yml b/{{cookiecutter.__project_name}}/.github/workflows/release-checklist-comment.yml index 9c4163f..996438b 100644 --- a/{{cookiecutter.__project_name}}/.github/workflows/release-checklist-comment.yml +++ b/{{cookiecutter.__project_name}}/.github/workflows/release-checklist-comment.yml @@ -6,11 +6,11 @@ on: - opened branches: - main - + jobs: call-release-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-release-checklist-comment.yml@v0.7.1 + uses: ASFHyP3/actions/.github/workflows/reusable-relese-checklist-comment.yml@v0.11.2 permissions: pull-requests: write secrets: diff --git a/{{cookiecutter.__project_name}}/.github/workflows/release.yml b/{{cookiecutter.__project_name}}/.github/workflows/release.yml index 3d246ea..0813d44 100644 --- a/{{cookiecutter.__project_name}}/.github/workflows/release.yml +++ b/{{cookiecutter.__project_name}}/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: jobs: call-release-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.7.1 + uses: ASFHyP3/actions/.github/workflows/reusable-release.yml@v0.11.2 with: release_prefix: {{ cookiecutter.__project_title }} release_branch: main diff --git a/{{cookiecutter.__project_name}}/.github/workflows/static-analysis.yml b/{{cookiecutter.__project_name}}/.github/workflows/static-analysis.yml index bf78b2f..75a83f4 100644 --- a/{{cookiecutter.__project_name}}/.github/workflows/static-analysis.yml +++ b/{{cookiecutter.__project_name}}/.github/workflows/static-analysis.yml @@ -5,10 +5,10 @@ on: push jobs: call-secrets-analysis-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.7.1 + uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.11.2 call-flake8-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-flake8.yml@v0.7.1 + uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.11.2 with: local_package_names: {{ cookiecutter.__package_name }} diff --git a/{{cookiecutter.__project_name}}/.github/workflows/tag-version.yml b/{{cookiecutter.__project_name}}/.github/workflows/tag-version.yml index 8bdb575..bdcedba 100644 --- a/{{cookiecutter.__project_name}}/.github/workflows/tag-version.yml +++ b/{{cookiecutter.__project_name}}/.github/workflows/tag-version.yml @@ -8,7 +8,7 @@ on: jobs: call-bump-version-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.7.1 + uses: ASFHyP3/actions/.github/workflows/reusable-bump-version.yml@v0.11.2 with: user: {{ cookiecutter.github_username }} email: {{ cookiecutter.github_email }} diff --git a/{{cookiecutter.__project_name}}/.github/workflows/test-and-build.yml b/{{cookiecutter.__project_name}}/.github/workflows/test-and-build.yml index 30ab6b8..3d228dd 100644 --- a/{{cookiecutter.__project_name}}/.github/workflows/test-and-build.yml +++ b/{{cookiecutter.__project_name}}/.github/workflows/test-and-build.yml @@ -13,7 +13,7 @@ on: jobs: call-pytest-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.7.1 + uses: ASFHyP3/actions/.github/workflows/reusable-pytest.yml@v0.11.2 with: local_package_name: {{ cookiecutter.__package_name }} python_versions: >- @@ -21,14 +21,12 @@ jobs: call-version-info-workflow: # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.7.1 - with: - python_version: "3.10" + uses: ASFHyP3/actions/.github/workflows/reusable-version-info.yml@v0.11.2 call-docker-ghcr-workflow: needs: call-version-info-workflow # Docs: https://github.com/ASFHyP3/actions - uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.7.1 + uses: ASFHyP3/actions/.github/workflows/reusable-docker-ghcr.yml@v0.11.2 with: version_tag: {{'${{ needs.call-version-info-workflow.outputs.version_tag }}'}} release_branch: main diff --git a/{{cookiecutter.__project_name}}/.trufflehog.txt b/{{cookiecutter.__project_name}}/.trufflehog.txt deleted file mode 100644 index a91912f..0000000 --- a/{{cookiecutter.__project_name}}/.trufflehog.txt +++ /dev/null @@ -1 +0,0 @@ -.*gitleaks.toml$ diff --git a/{{cookiecutter.__project_name}}/environment.yml b/{{cookiecutter.__project_name}}/environment.yml index f41a2b0..0edfc9c 100644 --- a/{{cookiecutter.__project_name}}/environment.yml +++ b/{{cookiecutter.__project_name}}/environment.yml @@ -6,10 +6,7 @@ dependencies: - python>=3.10 - pip # For packaging, and testing - - flake8 - - flake8-import-order - - flake8-blind-except - - flake8-builtins + - ruff - setuptools - setuptools_scm - wheel diff --git a/{{cookiecutter.__project_name}}/pyproject.toml b/{{cookiecutter.__project_name}}/pyproject.toml index ffb84d7..9a78637 100644 --- a/{{cookiecutter.__project_name}}/pyproject.toml +++ b/{{cookiecutter.__project_name}}/pyproject.toml @@ -28,10 +28,7 @@ dynamic = ["version", "readme"] [project.optional-dependencies] develop = [ - "flake8", - "flake8-import-order", - "flake8-blind-except", - "flake8-builtins", + "ruff", "pytest", "pytest-cov", "pytest-console-scripts", @@ -56,3 +53,27 @@ readme = {file = ["README.md"], content-type = "text/markdown"} where = ["src"] [tool.setuptools_scm] + +[tool.ruff] +line-length = 120 +src = ["src", "tests"] + +[tool.ruff.format] +indent-style = "space" +quote-style = "single" + +[tool.ruff.lint] +extend-select = [ + "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] +convention = "google" + +[tool.ruff.lint.isort] +case-sensitive = true +lines-after-imports = 2