-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
91 lines (78 loc) · 1.99 KB
/
pyproject.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
[tool.poetry]
name = "kickstarter-project-analysis"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = ">=3.10,<3.11"
numpy = "^1.26.0"
matplotlib = "^3.8.0"
pandas = "^2.1.1"
jupyter = "^1.0.0"
statsmodels = "^0.14.0"
scikit-learn = "^1.3.1"
seaborn = "^0.13.0"
lifelines = "^0.27.8"
papermill = "^2.5.0"
[tool.poetry.group.dev.dependencies]
black = {extras = ["jupyter"], version = "^23.10.0"}
isort = "^5.12.0"
nbqa = "^1.7.0"
nbdev = "^2.3.13"
nb-clean = "^3.1.0"
flake8 = "^6.1.0"
flake8-annotations = "^3.0.1"
flake8-bugbear = "^23.9.16"
pandas-vet = "^2023.8.2"
poethepoet = "^0.24.3"
sphinx = "^7.2.6"
sphinx-book-theme = "^1.0.1"
myst-parser = "^2.0.0"
myst-nb = "^1.0.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
profile = "black"
[tool.poe]
[tool.poe.tasks.format]
help = "Format the files"
sequence = [
{ cmd = "black ." },
{ cmd = "isort ." },
{ cmd = "nbqa isort . --float-to-top" },
]
[tool.poe.tasks.lint]
help = "Lint the files"
sequence = [
{ cmd = "flake8 ." },
{ cmd = "nbqa flake8 ." },
]
[tool.poe.tasks.nbcheck]
help = "Check notebooks for metadata"
cmd = "nb-clean check . --preserve-cell-outputs --remove-empty-cells"
[tool.poe.tasks.nbclean]
help = "Clean notebook metadatas"
sequence = [
{ cmd = "nbdev_clean --fname ." },
{ cmd = "nb-clean clean . --preserve-cell-outputs --remove-empty-cells"},
]
[tool.poe.tasks.nbrun]
help = "Run notebooks to see if they work"
shell = """
RED='\\033[0;31m'
NC='\\033[0m' # No Color
for input_file in $(find src docs/source -type f -name "*.ipynb"); do
echo "${RED}Notebook: ${input_file}${NC}"
papermill "$input_file" temp.ipynb
done
rm temp.ipynb
"""
[tool.poe.tasks.nbqa]
help = "Run all QA tools on notebooks"
sequence = [
{ ref = "format" },
{ ref = "nbclean" },
{ ref = "nbcheck" },
{ ref = "nbrun" },
]