-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
145 lines (122 loc) · 4.06 KB
/
Copy pathpyproject.toml
File metadata and controls
145 lines (122 loc) · 4.06 KB
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
# Project meta information
[project]
name = 'KDE-diffusion'
authors = [{name='John Hennig'}]
version = '1.0.5'
description = 'Kernel density estimation via diffusion in 1d and 2d'
keywords = ['kernel density estimation', 'statistics']
classifiers = [
'Development Status :: 5 - Production/Stable',
'Programming Language :: Python :: 3',
'Operating System :: OS Independent',
'Topic :: Scientific/Engineering :: Information Analysis',
'Intended Audience :: Science/Research',
]
license = 'MIT'
license-files = ['license.txt']
readme = 'PyPI.md'
requires-python = '>= 3.6'
dependencies = [
'NumPy',
'SciPy',
]
[project.optional-dependencies]
docs = [
'Sphinx',
'Furo',
'MyST-parser',
'CommonMark',
]
[dependency-groups]
test = [
'Ruff',
'pyTest',
'pyTest-cov',
'coverage-badge',
]
docs = [
'Sphinx',
'Furo',
'MyST-parser',
'Commonmark',
]
dev = [
{include-group = 'test'},
{include-group = 'docs'},
]
[project.urls]
Documentation = 'https://kde-diffusion.readthedocs.io'
Source = 'https://github.com/john-hen/kde-diffusion'
# Build backend: Flit
[build-system]
requires = ['flit_core >= 3.11']
build-backend = 'flit_core.buildapi'
[tool.flit.module]
name = 'kde_diffusion'
# Code linter: Ruff
[tool.ruff]
line-length = 79
indent-width = 4
target-version = 'py37'
include = ['kde_diffusion/**/*.py', 'tests/**/*.py', 'pyproject.toml']
[tool.ruff.format]
# The project does not actually use the Ruff formatter (only the linter),
# but these settings would be used if it did.
quote-style = 'single'
line-ending = 'cr-lf'
[tool.ruff.lint]
preview = true
select = [
'F', # basic linter rules
'E', # code style errors
'W', # code style warnings
'B', # possible bugs
'C4', # correct comprehensions
'FA', # future annotations
'PIE', # miscellaneous lints
'ARG', # unused function arguments
'RSE', # raised exceptions
'Q', # quotation marks
'SIM', # simplifiable code
'PERF', # performance anti-pattens
'PT', # pyTest style
'PTH', # pathlib use mandatory
'ERA', # commented-out code
'T10', # debugger calls
'UP', # upgradable code
'RUF100', # unnecessary `noqa` directives
]
ignore = [
'E201', # whitespace after (
'E202', # whitespace before (
'E221', # missing whitespace before operator
'E226', # missing whitespace around operator
'E241', # multiple spaces after comma
'E251', # unexpected spaces around keyword equals
'E272', # multiple spaces before keyword
'E731', # assignment of `lambda` expression
'E741', # ambiguous variable name: `l`
'SIM108', # ternary operator instead of if-else
'PT011', # `pytest.raises(ValueError)` too broad
'PT013', # incorrect pytest import
'PTH201', # never use `Path('.')`
]
[tool.ruff.lint.per-file-ignores]
'__init__.py' = [
'F401', # imported but unused
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = 'single'
multiline-quotes = 'double'
docstring-quotes = 'double'
avoid-escape = true
# Test runner: pyTest
[tool.pytest.ini_options]
addopts = '--verbose'
testpaths = ['tests']
# Code coverage: Coverage.py
[tool.coverage.run]
source = ['kde_diffusion/']
relative_files = true
[tool.coverage.report]
exclude_lines = ['pragma: no cover']