Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@ jobs:
run: poetry install --with dev

- name: Check Format
run: |
poetry run poe format
git diff --exit-code HEAD
run: poetry run ruff format --diff

- name: Check Lint
run: poetry run poe lint
run: poetry run ruff check

- name: Test Package
run: poetry run poe test
run: poetry run pytest -v --cov

- name: Build Package
run: poetry build
20 changes: 20 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pre-commit:
piped: true
jobs:
- name: install dependencies
run: poetry install --with dev
glob:
- poetry.lock
- poetry.toml
- pyproject.toml

- name: fix formatting
run: poetry run ruff format
glob: "*.py"

- name: fix lint
run: poetry run ruff check --fix
glob: "*.py"

- name: check diff
run: git diff --exit-code dist {staged_files}
109 changes: 13 additions & 96 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,21 @@ python = "^3.10"
optional = true

[tool.poetry.group.dev.dependencies]
lefthook = "^1.11.14"
pytest = "^8.4.0"
poethepoet = "^0.35.0"
pytest-cov = "^6.2.1"
ruff = "^0.11.13"

[tool.poetry.scripts]
my_fibonacci = "my_fibonacci.__main__:main"

[tool.poe.tasks]
format = "ruff format lib tests"
lint = "ruff check lib tests"
test = "pytest -v --cov=my_fibonacci"

[tool.coverage.report]
fail_under = 100
omit = ["__main__.py"]

[tool.coverage.run]
source = ["my_fibonacci"]

[tool.ruff.lint]
select = ["ALL"]
ignore = ["D"]
Expand Down
Loading