Skip to content

Commit e404a89

Browse files
authored
chore: merge pull request #34 from threeal/introduce-poe-the-poet
Task Management with Poe the Poet
2 parents d255e45 + ebb32a3 commit e404a89

4 files changed

Lines changed: 46 additions & 7 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,13 @@ jobs:
3636
run: poetry install --with dev
3737

3838
- name: Check format
39-
run: |
40-
poetry run isort lib
41-
poetry run black lib
42-
git diff --exit-code HEAD
39+
run: poetry run poe format && git diff --exit-code HEAD
4340

4441
- name: Check lint
45-
run: poetry run flake8 lib
42+
run: poetry run poe lint
4643

4744
- name: Run testing
48-
run: poetry run pytest -v
45+
run: poetry run poe test
4946

5047
- name: Run module
5148
run: poetry run my_fibonacci 10

poetry.lock

Lines changed: 30 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@ black = "^23.10.0"
3636
isort = "^5.12.0"
3737
flake8 = "^6.1.0"
3838
pytest = "^7.4.2"
39+
poethepoet = "^0.24.1"
3940

4041
[tool.poetry.scripts]
4142
my_fibonacci = "my_fibonacci:main"
43+
44+
[tool.poe.tasks]
45+
check = ["format", "lint"]
46+
lint = "flake8 lib tests"
47+
test = "pytest -v"
48+
49+
[tool.poe.tasks.format]
50+
shell = """
51+
isort lib tests
52+
black lib tests
53+
"""

tests/test_sequence.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from my_fibonacci import fibonacci_sequence
22

3+
34
def test_fibonacci_sequence():
45
assert fibonacci_sequence(1) == [1]
56
assert fibonacci_sequence(2) == [1, 1]

0 commit comments

Comments
 (0)