forked from pymc-labs/pymc-marketing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
177 lines (155 loc) · 4.85 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
167
168
169
170
171
172
173
174
175
176
177
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling<2", "hatch-fancy-pypi-readme"]
[project]
name = "pymc-marketing"
description = "Marketing Statistical Models in PyMC"
requires-python = ">=3.10"
license = { file = "LICENSE" }
dynamic = ["version", "readme"]
maintainers = [{ name = "PyMC Labs", email = "[email protected]" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Operating System :: OS Independent",
"Typing :: Typed",
]
dependencies = [
"arviz>=0.13.0",
"matplotlib>=3.5.1",
"numpy>=1.17",
"pandas",
"pydantic>=2.1.0",
# NOTE: Used as minimum pymc version with ci.yml `OLDEST_PYMC_VERSION`
"pymc>=5.13.0,<5.16.0",
"scikit-learn>=1.1.1",
"seaborn>=0.12.2",
"xarray>=2024.1.0",
"xarray-einstats>=0.5.1",
]
[project.optional-dependencies]
docs = [
"blackjax",
"fastprogress",
"graphviz",
"ipython!=8.7.0",
"ipywidgets",
"labs-sphinx-theme",
"lifetimes",
"myst-nb<=1.0.0",
"myst-parser",
"numba",
"numpydoc",
"numpyro",
"nutpie",
"pylint",
"pyprojroot",
"sphinx-autodoc-typehints",
"sphinx-copybutton",
"sphinx-design",
"sphinx-notfound-page",
"sphinx",
"sphinxext-opengraph",
"watermark",
"mlflow>=2.0.0",
]
lint = ["mypy", "pandas-stubs", "pre-commit>=2.19.0", "ruff>=0.1.4"]
test = [
"blackjax",
"nutpie",
"numpyro",
"graphviz>=0.20.1",
"lifetimes==0.11.3",
"papermill",
"preliz>=0.8.0",
"pytest-cov>=3.0.0",
"pytest-mock>=3.14.0",
"pytest>=7.0.1",
"mlflow>=2.0.0",
]
[tool.hatch.build.targets.sdist]
exclude = [
"docs",
]
[tool.hatch.version]
path = "pymc_marketing/version.py"
# <https://github.com/hynek/hatch-fancy-pypi-readme>
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
# Image links should go to the raw content on GitHub
# <https://stackoverflow.com/a/46875147>
pattern = '\[(.*?)\]\(((?!https?://)\S+\.(png|jpe?g|svg|gif))\)'
replacement = '[\1](https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/\g<2>)'
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
# Handle also HTML image tags
pattern = '''(<img\b[^>]*\bsrc=)(['"])((?!https?://)[^'"]+)(['"][^>]*>)'''
replacement = '<img src="https://raw.githubusercontent.com/pymc-labs/pymc-marketing/main/\g<3>\g<4>'
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
# Remaining non-image relative links map to the normal absolute GitHub URL
# <https://stackoverflow.com/a/46875147>
pattern = '\[(.*?)\]\(((?!https?://)\S+)\)'
replacement = '[\1](https://github.com/pymc-labs/pymc-marketing/tree/main/\g<2>)'
[project.urls]
repository = "https://github.com/pymc-labs/pymc-marketing"
homepage = "https://www.pymc-marketing.io"
[tool.ruff.lint]
select = ["B", "D", "DOC", "E", "F", "I", "RUF", "S", "UP", "W"]
pydocstyle.convention = "numpy"
ignore = [
"B008", # Do not perform calls in argument defaults (this is ok with Field from pydantic)
"B904", # raise-without-from-inside-except
"RUF001", # String contains ambiguous character (such as Greek letters)
"RUF002", # Docstring contains ambiguous character (such as Greek letters)
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]
[tool.ruff.lint.per-file-ignores]
"docs/source/notebooks/*" = [
"B018", # Checks for "useless" expressions. Not useful for notebooks.
"D103", # Missing docstring in public function.
]
"tests/*" = [
"B018", # Checks for "useless" expressions. This is useful for tests.
"D",
"S101", # Use of assert
]
"scripts/*" = ["D"]
[tool.ruff.lint.pycodestyle]
max-line-length = 120
[tool.ruff]
extend-include = ["*.ipynb"]
[tool.pytest.ini_options]
addopts = [
"-v",
"--strict-markers",
"--strict-config",
"--cov=pymc_marketing",
"--cov-report=term-missing",
"--color=yes",
]
filterwarnings = ["ignore::DeprecationWarning:bokeh.core.property.primitive:37"]
testpaths = "tests"
[tool.mypy]
files = "pymc_marketing/*.py"
plugins = "numpy.typing.mypy_plugin"
exclude = "build|dist|docs|examples|tests|setup.py"
[tool.mypy-matplotlib]
ignore_missing_imports = true
[tool.mypy-pymc]
ignore_missing_imports = true
[tool.mypy-seaborn]
ignore_missing_imports = true
[tool.mypy-sklearn]
ignore_missing_imports = true
[tool.mypy-scipy]
ignore_missing_imports = true