-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
166 lines (151 loc) · 3.58 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
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pylater"
dynamic = ["version"]
description = "A Python library for working with LATER ('Linear Approach to Threshold with Ergodic Rate for Reaction Times') models using Bayesian methods in PyMC."
readme = "README.md"
requires-python = ">=3.10,<3.12"
license = "MIT"
keywords = []
authors = [
{name = "Damien Mannion", email = "damien.mannion@unimelb.edu.au"},
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"numpy",
"scipy",
"pymc",
"matplotlib",
"xarray",
"arviz",
]
[project.urls]
Documentation = "https://unimelbmdap.github.io/pylater/"
Issues = "https://github.com/unimelbmdap/pylater/issues"
Source = "https://github.com/unimelbmdap/pylater"
[tool.hatch]
version.path = "src/pylater/__init__.py"
# dev
envs.dev.extra-dependencies = [
"ruff",
"black",
"sp-repo-review[cli]",
]
envs.dev.scripts.lint = "ruff {args:check src/pylater tests}"
envs.dev.scripts.style = "black {args:.}"
envs.dev.scripts.review = "repo-review {args:.}"
# ipython
envs.interactive.extra-dependencies = [
"ipython",
"pyqt6",
"pickleshare",
]
envs.interactive.scripts.session = "ipython --pylab=qt"
# mypy
envs.types.extra-dependencies = [
"mypy"
]
envs.types.scripts.check = "mypy {args:src/pylater tests}"
# docs
envs.docs.scripts.build = "sphinx-build docs/ gh-pages"
envs.docs.scripts.build_clean = "sphinx-build --fresh-env docs/ gh-pages"
envs.docs.scripts.jupyterlab = "jupyter lab"
envs.docs.extra-dependencies = [
"sphinx",
"myst-nb",
"jupyterlab",
"watermark",
"ipywidgets",
"jupytext",
"matplotlib",
"pyqt6",
"sphinx-autodoc-typehints",
"sphinx_rtd_theme",
"ipympl",
"graphviz",
"sphinxcontrib-bibtex",
"furo",
]
# tests
envs.tests.extra-dependencies = ["pytest"]
envs.tests.scripts.test = "pytest {args}"
[[tool.hatch.envs.tests.matrix]]
python = ["3.10", "3.11"]
[tool.mypy]
plugins = "numpy.typing.mypy_plugin"
# corresponding to --strict
strict = true
warn_unused_configs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
no_implicit_reexport = true
strict_equality = true
extra_checks = true
warn_unreachable = true
untyped_calls_exclude = ["arviz"]
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
[[tool.mypy.overrides]]
module = [
"scipy",
"scipy.stats",
"pymc",
]
ignore_missing_imports = true
[tool.black]
line-length = 88
preview = false
skip-source-first-line = false
skip-string-normalization = false
skip-magic-trailing-comma = false
[tool.ruff]
src = ["src"]
exclude = []
lint.select = [
"E", # error
"F", # pyflakes
"UP", # pyupgrade
"N", # pep8-naming
"ANN", # flake8-annotations
"A", # flake8-builtins
"PTH", # flake8-usepathlib
"B", # flake8-bugbear
"Q", # flake8-quotes
"ARG", # flake8-unused-arguments
"NPY", # numpy
"PERF", # perflint
"RUF", # ruff
]
lint.ignore = [
"ANN101", # typing self
]
[tool.repo-review]
ignore = [
"RTD", # not using readthedocs
"RF102", # not a fan of isort
"PC", "PY006", # not using pre-commit
]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = ["error"]
log_cli_level = "info"
testpaths = ["tests"]