-
Notifications
You must be signed in to change notification settings - Fork 229
/
Copy pathpyproject.toml
246 lines (215 loc) · 6.02 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
########## Project ##########
[project]
name = "plotnine"
description = "A Grammar of Graphics for Python"
license = {file = "LICENSE"}
authors = [
{name = "Hassan Kibirige", email = "[email protected]"},
]
dynamic = ["version"]
readme = "README.md"
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: Matplotlib",
"Topic :: Scientific/Engineering :: Visualization"
]
dependencies = [
"matplotlib>=3.8.0",
"pandas>=2.2.0",
"mizani~=0.13.0",
"numpy>=1.23.5",
"scipy>=1.8.0",
"statsmodels>=0.14.0",
]
requires-python = ">=3.10"
[project.optional-dependencies]
all = [
"plotnine[extra]",
"plotnine[doc]",
"plotnine[lint]",
"plotnine[test]",
"plotnine[build]",
"plotnine[dev]",
]
extra = [
"adjustText>=1.2.0",
"geopandas>=1.0.0",
"scikit-learn>1.2.0",
"scikit-misc>=0.5.1"
]
doc = [
"jupyter",
"nbsphinx",
"click",
"numpydoc>=0.9.1",
"quartodoc>=0.7.2",
]
lint = [
"ruff",
]
test = [
"pytest-cov>=4.0.0"
]
build = [
"build",
"wheel",
]
dev = [
"twine",
"plotnine[typing]",
"pre-commit",
]
typing = [
"pyright==1.1.391",
"ipython",
"pandas-stubs",
]
[project.urls]
homepage = "https://plotnine.readthedocs.io/en/stable"
repository = "https://github.com/has2k1/plotnine"
changelog = "https://plotnine.readthedocs.io/en/stable/changelog.html"
ci = "https://github.com/has2k1/plotnine/actions"
########## Build System ##########
# Reference https://github.com/pydata/xarray/blob/main/pyproject.toml
[build-system]
requires = [
"setuptools>=59",
"setuptools_scm[toml]>=6.4",
"wheel",
]
build-backend = "setuptools.build_meta"
########## Tool - Setuptools ##########
# If you only specify the top-level package (=plotnine) setuptools complains
# about not listing the sub-packages. Since we want every sub-package in the
# plotnine package, it is easier to use find directive.
[tool.setuptools.packages.find]
include = ["plotnine*"]
[tool.setuptools_scm]
fallback_version = "999"
version_scheme = 'post-release'
########## Tool - Pytest ##########
[tool.pytest.ini_options]
testpaths = [
"tests"
]
doctest_optionflags = "ALLOW_BYTES NORMALIZE_WHITESPACE"
addopts = "--pyargs --cov=plotnine --cov-report=xml --import-mode=importlib"
########## Tool - Coverage ##########
# Coverage.py
[tool.coverage.run]
branch = true
source = ["plotnine"]
include = [
"plotnine/*"
]
omit = [
"tests/*",
"plotnine/typing.py",
"plotnine/_utils/dev.py",
]
disable_warnings = ["include-ignored"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"^def test_",
"if __name__ == .__main__.:",
"raise NotImplementedError('Not Implemented')",
"if typing.TYPE_CHECKING:",
"if TYPE_CHECKING:",
"except ImportError:",
"except PackageNotFoundError:",
]
precision = 1
########## Tool - Pyright ##########
[tool.pyright]
# Paths of directories or files that should be included. If no paths
# are specified, pyright defaults to the directory that contains the
# config file. Paths may contain wildcard characters ** (a directory or
# multiple levels of directories), * (a sequence of zero or more
# characters), or ? (a single character). If no include paths are
# specified, the root path for the workspace is assumed.
include = [
"plotnine/"
]
# Paths of directories or files whose diagnostic output (errors and
# warnings) should be suppressed even if they are an included file or
# within the transitive closure of an included file. Paths may contain
# wildcard characters ** (a directory or multiple levels of
# directories), * (a sequence of zero or more characters), or ? (a
# single character).
ignore = []
# Set of identifiers that should be assumed to contain a constant
# value wherever used within this program. For example, { "DEBUG": true
# } indicates that pyright should assume that the identifier DEBUG will
# always be equal to True. If this identifier is used within a
# conditional expression (such as if not DEBUG:) pyright will use the
# indicated value to determine whether the guarded block is reachable
# or not. Member expressions that reference one of these constants
# (e.g. my_module.DEBUG) are also supported.
defineConstant = { DEBUG = true }
# typeCheckingMode = "strict"
useLibraryCodeForTypes = true
reportUnnecessaryTypeIgnoreComment = true
# Specifies a list of execution environments (see below). Execution
# environments are searched from start to finish by comparing the path
# of a source file with the root path specified in the execution
# environment.
executionEnvironments = []
stubPath = ""
########## Tool - Ruff ##########
[tool.ruff]
line-length = 79
[tool.ruff.lint]
select = [
"E",
"F",
"I",
"TCH",
"Q",
"PIE",
"PTH",
"PD",
"PYI",
"RSE",
"SIM",
"B904",
"FLY",
"NPY",
"PERF102"
]
ignore = [
"E741", # Ambiguous l
"E743", # Ambiguous I
# .reset_index, .rename, .replace
# This will remain the correct choice until we enable copy-on-write
"PD002",
# Use specific rule codes when ignoring type issues and
# not # type: ignore
"PGH003"
]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
"plotnine/themes/seaborn_rcmod.py",
"**/__pycache__",
"node_modules"
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.lint.per-file-ignores]
"plotnine/__init__.py" = ["F403", "F405"]
"plotnine/typing.py" = ["F401", "TCH001"]
"doc/_renderers/numpydoc.py" = ["F811"]
"doc/_renderers/format.py" = ["F811"]
"doc/_renderer.py" = ["F811"]