-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
119 lines (107 loc) · 3.06 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
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
[project]
name = "common-nb-preprocessors"
version = "1.1.1"
description = "preprocessors"
authors = [
{name = "Kai Norman Clasen", email= "[email protected]"},
]
license = {text = "MIT license"}
readme = "README.md"
#- Uses the < syntax instead of <= because conda-forge does not work correctly with <=
# deps-start
# FUTURE: Remove upper version constraint if pandas-stubs get updated!
# Nope, I am not willing to 'infect' my maximum requirements and
# code-base for two pandas-stubs
requires-python = ">=3.8"
dependencies = [
"nbformat>=5.4.0",
"nbconvert>=6.5.0",
"pydantic>=1.9.1",
"pyyaml>=6.0",
]
# deps-end
[project.urls]
homepage = "https://github.com/kai-tub/common-nb-preprocessors/"
repository = "https://github.com/kai-tub/common-nb-preprocessors/"
documentation = "https://kai-tub.github.io/common-nb-preprocessors/"
[project.optional-dependencies]
[build-system]
requires = ["pdm-pep517>=1.0.0"]
build-backend = "pdm.pep517.api"
# Currently it looks like a pdm bug that doesn't acknowledge
# a different package-dir
[tool.pdm.build]
includes = ["LICENSE", "src"]
# I _think_ the minimum myst-nb version for which this works
# is v0.14, which was the big rewrite release
# As of now, jupyter-book requires myst-nb=0.13
# https://github.com/executablebooks/jupyter-book/blob/master/pyproject.toml
# This doesn't allow the default config to be used to overwrite the ipynb reader
[tool.pdm.dev-dependencies]
docs = [
"myst-nb<1.0,>=0.16",
"Sphinx<6.0,>=4.5",
"sphinx-autobuild",
"sphinx-external-toc",
"linkify-it-py",
"furo",
"rich>=12.5.1",
]
test = [
"pytest",
"pre-commit",
"jupyter",
"notebook",
"coverage>=6.4.2",
]
lint = [
"black[jupyter]>=22.6.0",
"isort",
"nbstripout",
"mypy",
]
dev = [
"html5lib>=1.1",
"pandas>=1.4.3",
"lxml>=4.9.1",
"jupyter-book>=0.6.5",
"sphinx-design>=0.2.0",
"hypothesis>=6.50.1",
]
mypy = [
"types-PyYAML>=6.0.10",
# "pandas-stubs>=1.4.3.220718",
]
[tool.mypy]
exclude = ["tests"]
# common plugins:
# plugins = "numpy.typing.mypy_plugin"
[[tool.mypy.overrides]]
module = ["nbconvert.*", "pandas.*"]
ignore_missing_imports = true
[tool.isort]
profile = "black"
[tool.pdm.scripts]
check-pre-commit = "pre-commit run --all-files"
tests = "coverage run --parallel --source common_nb_preprocessors -m pytest tests"
# manually adjust per project the fail-under settings
coverage_report.composite = [
"coverage combine",
"coverage report --fail-under 95",
]
coverage_html_report = "coverage html"
check-types = "mypy src"
lint.composite = [
"check-pre-commit",
"check-types",
]
lint.help = "Will check if all files are formatted with black & isort"
build-docs.cmd = "sphinx-build docs docs/_build/"
build-docs.help = "Build Sphinx documentation"
serve-sphinx-docs.cmd = "sphinx-autobuild docs docs/_build --open-browser"
serve-sphinx-docs.help = "Serve the Sphinx documentation with sphinx-autobuild"
coverage_html.composite = [
"tests",
"coverage_html_report"
]
coverage_html.help = "Run the coverage with pytest and produce the html"