-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
127 lines (109 loc) · 2.63 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
[tool.poetry]
name = "bayesian-stats"
version = "0.1.0"
description = "Sanbox library for learning Bayesian statistics and probabilistic programming"
authors = ["libertininick <[email protected]>"]
license = "MIT"
readme = "README.md"
packages = [{include = "bayesian_stats", from = "src" }]
[tool.poetry.dependencies]
python = ">=3.11,<3.13"
conda-lock = "^2.1.0"
numpy = "^1.25.0"
arviz = "^0.15.1"
matplotlib = "^3.7.1"
pandas = "^2.0.2"
scipy = "^1.11.0"
xarray = "^2023.6.0"
pyro-ppl = "^1.8.6"
torch = ">=2.0.0, !=2.0.1, !=2.1.0"
python-dotenv = "^1.0.0"
einops = "^0.7.0"
[tool.poetry.group.dev.dependencies]
coverage = "^7.2.7"
mypy = "^1.4.1"
typeguard = "^4.0.0"
pytest = "^7.4.0"
hypothesis = "^6.88.1"
pytest-check = "^2.2.2"
ruff = "^0.1.6"
[tool.poetry.group.jupyter.dependencies]
ipykernel = "^6.25.1"
ipympl = "^0.9.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.coverage.run]
branch = true
data_file = "build/.coverage"
source = [
"src",
"tests",
]
[tool.coverage.report]
exclude_also = [
"def __repr__"
]
fail_under = 90
precision = 1
show_missing = true
skip_covered = true
skip_empty = true
[tool.mypy]
cache_dir = "./build/mypy"
disallow_untyped_defs = true
ignore_missing_imports = true
plugins = "numpy.typing.mypy_plugin"
pretty = true
show_column_numbers = true
show_error_context = true
warn_unreachable = true
[tool.pytest.ini_options]
addopts = "-rf --doctest-modules --strict-markers"
cache_dir = "./build/pytest"
console_output_style = "progress"
markers = [
"slow"
]
minversion = "6.0"
testpaths = [
"src",
"tests",
]
[tool.ruff]
cache-dir = "./build/ruff"
line-length = 79 # set max line length
indent-width = 4
target-version = "py311" # python version of code
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
pydocstyle = {convention = "numpy"}
mccabe = {max-complexity = 10}
select = [
"B", # flake8-bugbear
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"S", # flake8-bandit
"C4", # flake8-comprehensions
"C9", # max-complexity
"UP", # pyupgrade
"ANN", # flake8-annotations
"RUF", # Ruff-specific rules
"SIM", # flake8-simplify
"E501", # `line-too-long` rule
]
ignore = [
"ANN002", # Missing type annotation for `*args`
"ANN003", # Missing type annotation for `**kwargs`
"ANN101", # missing-type-self
"ANN102", # missing-type-cls
"ANN401", # disallow any-type
]
per-file-ignores = {"**/{tests}/*" = ["S101"]} # ignore asserts in tests