forked from entelecheia/lecture
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tasks.toml
202 lines (155 loc) · 5.39 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
[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 --doctest-modules --cov=src --cov-report term-missing --cov-report=html"
help = "run tests with pytest and generate a coverage report"
[tool.poe.tasks.tests-cov-fail]
shell = "pytest --doctest-modules --cov=src --cov-report term-missing --cov-report=html --cov-fail-under=80 --junitxml=tests/pytest.xml | tee tests/pytest-coverage.txt"
help = "run tests with pytest and generate a coverage report, fail if coverage is below 80%"
[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.version]
cmd = "semantic-release print-version --current"
help = "print the current version"
[tool.poe.tasks.next-version]
cmd = "semantic-release print-version --next"
help = "print the next version"
[tool.poe.tasks.changelog]
cmd = "semantic-release changelog --released"
help = "print the changelog for the current version"
[tool.poe.tasks.next-changelog]
cmd = "semantic-release changelog --unreleased"
help = "print the changelog for the next version"
[tool.poe.tasks.release-noop]
cmd = "semantic-release publish --noop -v DEBUG"
help = "run a dry-run of the release process"
[tool.poe.tasks.release-ci]
cmd = "semantic-release publish -v DEBUG -D commit_author='github-actions <action@github.com>'"
help = "run the release process in CI"
[tool.poe.tasks.prerelease-noop]
cmd = "semantic-release publish --noop -v DEBUG --prerelease"
help = "run a dry-run of the prerelease process"
[tool.poe.tasks.show-branches]
cmd = "git show-branch --list"
help = "show branches"
[tool.poe.tasks.show-tags]
cmd = "git tag --list"
help = "show tags"
[tool.poe.tasks.show-remotes]
cmd = "git remote --verbose"
help = "show remotes"
[tool.poe.tasks.show-refs]
cmd = "git show-ref"
help = "show refs"
[tool.poe.tasks.branch-checkout-upstream]
sequence = [
{ cmd = "git checkout -B ${branch}" },
{ cmd = "git push --set-upstream origin ${branch}" },
]
help = "create a new branch and push it to origin"
args = ["branch"]
[tool.poe.tasks.branch-checkout]
cmd = "git checkout ${branch}"
help = "checkout a branch"
args = ["branch"]
[tool.poe.tasks.main-checkout]
cmd = "git checkout main"
help = "checkout main"
[tool.poe.tasks.install-ghp-import]
cmd = "pipx install ghp-import"
help = "install ghp-import"
[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.git-lfs-install]
cmd = "git lfs install"
help = "git lfs install"
[tool.poe.tasks.git-lfs-track]
cmd = "git lfs track ${patterns}"
help = "git lfs track"
args = [
{ name = "patterns", default = "*.pdf" },
]
[tool.poe.tasks.git-lfs-migrate]
cmd = "git lfs migrate import --everything --include=${patterns}"
help = "git lfs migrate"
args = [
{ name = "patterns", default = "*.pdf" },
]
[tool.poe.tasks.git-add-submodule]
cmd = "git submodule add ${url} ${path}"
help = "git submodule add ${url} ${path}"
args = [
{ name = "url" },
{ name = "path" },
]
[tool.poe.tasks.git-init-submodule]
cmd = "git submodule update --init --recursive"
help = "git submodule update --init --recursive"
[tool.poe.tasks.git-update-submodule]
cmd = "git submodule update --recursive --remote"
help = "git submodule update --recursive --remote"