-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
141 lines (128 loc) · 4.29 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
[tool.poetry]
name = "check_shapes"
version = "1.1.1"
description = "A library for annotating and checking the shapes of tensors."
authors = [
"Jesper Nielsen <[email protected]>",
"The GPflow Contributors",
]
license = "Apache-2.0"
readme = "README.md"
homepage = "https://gpflow.github.io/check_shapes"
repository = "https://github.com/GPflow/check_shapes"
documentation = "https://gpflow.github.io/check_shapes"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Debuggers",
"Typing :: Typed",
]
[tool.poetry.dependencies]
dropstackframe = ">=0.1.0"
lark = "^1.1.0"
python = "^3.7"
[tool.poetry.dev-dependencies]
Sphinx = "^5.2.2"
black = "20.8b1" # Pinned for backwards compatibility with the old stuff.
click = "<8.1.0" # Required by `black = "20.8b1"`.
isort = "^5.10.0"
matplotlib = "^3.0.0"
mypy = ">0.920,!=0.982"
numpy = "<1.22.0" # MyPy is unhappy about Python 3.7 and newer versions of NumPy.
# Pandas constrained to reduce Poetry search-time. Feel free to loosen this when we no longer need
# to support Python 3.7:
pandas = ">=1.1.0,<1.4.0"
pylint = "^2.10.0"
pytest = "^6.0.0"
sphinx-autoapi = "^2.0.0"
taskipy = "^1.10.0"
tomlkit = "^0.11.4"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
py_version=37
profile="black"
[tool.black]
target-version = ['py37']
line-length = 100
[tool.mypy]
python_version = "3.7"
show_error_codes = true
# First we turn on *all the checks*, and then we turn off those that are too annoying.
strict = true
disallow_untyped_decorators = false
disable_error_code = "no-untyped-call"
# This is needed because version 1.20.0 of NumPy introduces typing, so some ignores are necessary /
# unnecessary depending on the version of numpy:
warn_unused_ignores = false
[[tool.mypy.overrides]]
module = [
"_pytest.*",
"importlib_metadata.*",
"jax.*",
"matplotlib.*",
"numpy.*", # Newer version of numpy does have stubs. We can get rid of this in the future.
"pandas.*",
"pkg_resources.*",
"pytest.*",
"tensorflow.*",
"tensorflow_probability.*",
"torch.*",
]
ignore_missing_imports = true
[tool.taskipy.tasks]
docs = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX docs XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
rm -rf docs_build
sphinx-build -b html docs docs_build
"""
docs_check = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX docs XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
rm -rf docs_test
sphinx-build -W --keep-going -b html docs docs_test
"""
isort = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX isort XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
isort poetryenv check_shapes tests benchmark
"""
isort_check = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX isort XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
isort --check-only poetryenv check_shapes tests benchmark
"""
black = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX black XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
black poetryenv check_shapes tests benchmark
"""
black_check = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX black XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
black --check poetryenv check_shapes tests benchmark
"""
mypy = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX mypy XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
mypy poetryenv check_shapes tests benchmark
"""
pylint = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX pylint XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
pylint poetryenv check_shapes tests benchmark
"""
pytest = """
echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX pytest XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
pytest tests
"""
format = "task isort && task black"
format_check = "task isort_check && task black_check"
lint = "task format_check && task mypy && task pylint"
format_and_test = "task format && task mypy && task pylint && task pytest"
test = "task lint && task pytest && task docs_check"