This repository has been archived by the owner on Aug 25, 2024. It is now read-only.
generated from entelecheia/course-template
-
Notifications
You must be signed in to change notification settings - Fork 18
/
.tasks.toml
124 lines (95 loc) · 3.35 KB
/
.tasks.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[tool.poe.tasks.format-black]
cmd = "black ."
help = "format code with black"
[tool.poe.tasks.format-isort]
cmd = "isort ."
help = "sort imports with isort"
[tool.poe.tasks.format]
sequence = ["format-black", "format-isort"]
help = "format code with black and isort"
[tool.poe.tasks.lint-black]
cmd = "black --check --diff ."
help = "check code formatting with black"
[tool.poe.tasks.lint-flake8]
cmd = "flake8 ."
help = "check code style with flake8"
[tool.poe.tasks.lint-isort]
cmd = "isort --check-only --diff ."
help = "check import sorting with isort"
[tool.poe.tasks.lint-mypy]
cmd = "mypy --config-file project.toml ."
help = "check types with mypy"
[tool.poe.tasks.lint-mypy-reports]
cmd = "mypy --config-file project.toml . --html-report ./tests/mypy-report"
help = "generate an HTML report of the type (mypy) checker"
[tool.poe.tasks.lint]
sequence = ["lint-black", "lint-flake8", "lint-isort"]
help = "check code style with flake8, black, and isort"
[tool.poe.tasks.tests]
cmd = "pytest --doctest-modules"
help = "run tests with pytest"
[tool.poe.tasks.tests-cov]
cmd = "pytest --cov=src --cov-report=xml"
help = "run tests with pytest and generate a coverage report"
[tool.poe.tasks.tests-cov-fail]
shell = "pytest --cov=src --cov-report=xml --cov-fail-under=50 --junitxml=tests/pytest.xml | tee tests/pytest-coverage.txt"
help = "run tests with pytest and generate a coverage report, fail if coverage is below 50%"
[tool.poe.tasks.clean-cov]
cmd = "rm -rf .coverage* tests/htmlcov tests/pytest.xml tests/pytest-coverage.txt"
help = "remove coverage reports"
[tool.poe.tasks.clean-pycache]
cmd = "find . -type d -name __pycache__ -exec rm -rf {} +"
help = "remove __pycache__ directories"
[tool.poe.tasks.clean-build]
cmd = "rm -rf build dist *.egg-info"
help = "remove build/python artifacts"
[tool.poe.tasks.clean-docs]
cmd = "rm -rf book/_build docs/_build _site"
help = "remove documentation artifacts"
[tool.poe.tasks.clean]
sequence = ["clean-cov", "clean-pycache", "clean-build", "clean-docs"]
help = "remove build artifacts and coverage reports"
[tool.poe.tasks.run]
cmd = "os2024"
help = "run the main program"
[tool.poe.tasks.build]
cmd = "poetry build"
help = "build the package"
[tool.poe.tasks.install-ghp-import]
cmd = "pipx install ghp-import"
help = "install ghp-import"
[tool.poe.tasks.install-jupyter-book-pipx]
shell = """
pipx install jupyter-book
pipx inject jupyter-book $(awk '{if(!/^ *#/ && NF) print}' book/requirements.txt)
"""
help = "install jupyter-book with pipx"
[tool.poe.tasks.install-jupyter-book]
shell = """
pip install -r book/requirements.txt
"""
help = "install jupyter-book"
[tool.poe.tasks.book-build]
cmd = "jupyter-book build book"
help = "build the book"
[tool.poe.tasks.book-build-all]
cmd = "jupyter-book build book --all"
help = "build the book with all outputs"
[tool.poe.tasks.book-publish]
cmd = "ghp-import -n -p -f book/_build/html"
help = "publish the book"
[tool.poe.tasks.install]
cmd = "poetry install --without dev"
help = "install dependencies"
[tool.poe.tasks.install-dev]
cmd = "poetry install --with dev"
help = "install dev dependencies"
[tool.poe.tasks.update]
cmd = "poetry update"
help = "update dependencies"
[tool.poe.tasks.lock]
cmd = "poetry lock"
help = "lock dependencies"
[tool.poe.tasks.codecov-validate]
cmd = "curl -X POST --data-binary @codecov.yml https://codecov.io/validate"
help = "Validate codecov.yml"