Skip to content

Commit

Permalink
Merge pull request #63 from ASFHyP3/nisar-ea-updates
Browse files Browse the repository at this point in the history
Updates for NISAR Early Adopters Workshop
  • Loading branch information
jhkennedy authored Oct 10, 2024
2 parents 6199afe + 15f5405 commit 5e7636b
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ on:
jobs:
call-changelog-check-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
secrets:
USER_TOKEN: {{'${{ secrets.GITHUB_TOKEN }}'}}
uses: ASFHyP3/actions/.github/workflows/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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-release-checklist-comment.yml@v0.11.2
permissions:
pull-requests: write
secrets:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ 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: >-
["3.10", "3.11", "3.12"]
call-version-info-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
with:
python_version: "3.10"
uses: ASFHyP3/actions/.github/workflows/[email protected]

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
Expand Down
1 change: 0 additions & 1 deletion {{cookiecutter.__project_name}}/.trufflehog.txt

This file was deleted.

5 changes: 1 addition & 4 deletions {{cookiecutter.__project_name}}/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 28 additions & 4 deletions {{cookiecutter.__project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -56,3 +53,30 @@ 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

[tool.ruff.lint.extend-per-file-ignores]
"tests/*" = ["D100", "D103", "ANN"]
2 changes: 1 addition & 1 deletion {{cookiecutter.__project_name}}/tests/test_entrypoints.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
def test_{{cookiecutter.__package_name}}(script_runner):
ret = script_runner.run('python', '-m', '{{cookiecutter.__package_name}}', '-h')
ret = script_runner.run(['python', '-m', '{{cookiecutter.__package_name}}', '-h'])
assert ret.success

0 comments on commit 5e7636b

Please sign in to comment.