Skip to content

Commit

Permalink
Add creosote workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gutzbenj committed Mar 2, 2025
1 parent c5d44a6 commit df044ab
Show file tree
Hide file tree
Showing 3 changed files with 457 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/unused.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Unused

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

# Allow job to be triggered manually.
workflow_dispatch:

# Cancel in-progress jobs when pushing to the same branch.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

env:
PYTHON: "3.13"

jobs:
creosote:
runs-on: ubuntu-latest
steps:
- name: Acquire sources
uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v5
with:
python-version: ${{ env.PYTHON }}

- name: Install project
run: uv sync

- name: Run code-style checks
run: uv run poe creosote
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ dev = [
# formatting and linting
"ruff>=0.3.3",
"poethepoet>=0.27.0",
"creosote>=4.0.1",
]

[tool.poe.tasks]
Expand All @@ -236,6 +237,7 @@ format = [ "format:fmt", "format:lint" ]
"lint:fmt" = "uv run ruff format --check"
"lint:lint" = "uv run ruff check"
lint = [ "lint:fmt", "lint:lint" ]
creosote = "uv run creosote --path wetterdienst"
# docs
docs = "cd docs && make html"
"test:parallel" = "uv run pytest -vvv --numprocesses=auto -m 'not (explorer or cflake)'"
Expand Down Expand Up @@ -295,6 +297,20 @@ unfixable = ["ERA", "F401", "F841", "T20", "ERA001"]
"benchmarks/*" = ["T20", "INP001"]
"examples/*" = ["T20", "INP001"]

[tool.creosote]
paths = [
"wetterdienst",
"tests",
"benchmarks",
"examples",
]
exclude_deps = [
"backports-datetime-fromisoformat",
"diskcache",
"python-dateutil",
"tzdata"
]

[tool.pytest.ini_options]
addopts = "-rsfEX -p pytester --strict-markers --verbosity=3"
#log_cli = true
Expand Down
Loading

0 comments on commit df044ab

Please sign in to comment.