-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
180 lines (144 loc) · 4.16 KB
/
pyproject.toml
File metadata and controls
180 lines (144 loc) · 4.16 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
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
## Build system related stuff
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
include = ["loggink*"]
[tool.setuptools.dynamic]
version = {attr = "loggink.version.__version__"}
## Project related stuff
[project]
name = "loggink"
dynamic = ['version']
authors = [
{name = "B.W. Dalmijn", email = "brendan.dalmijn@deltares.nl"},
]
maintainers = [
{name = "B.W. Dalmijn", email = "brendan.dalmijn@deltares.nl"},
]
description = "Simple python logging"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
dependencies = []
keywords = ["Logging", "Python"]
classifiers = [
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 4 - Beta',
# Indicate who your project is intended for
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
# Topic of the package
'Topic :: System :: Logging',
# Language
'Natural Language :: English',
# OS
'Operating System :: OS Independent',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
]
[project.optional-dependencies] # Optional
all = [
"setuptools>=61.0.0",
]
dev = [
"pre-commit",
"ruff",
]
test = [
"pytest>=2.7.3",
"pytest-cov",
"pytest-mock",
"responses",
]
[project.urls]
"Bug Reports" = "https://github.com/dalmijn/loggink/issues"
"Source" = "https://github.com/dalmijn/loggink"
## Some stuff for pytest and coverage
[tool.pytest.ini_options]
testpaths = [
"test",
]
[tool.coverage.run]
branch = true
source = ["./src"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
ignore_errors = true
[tool.coverage.html]
directory = ".cov"
[tool.ruff]
line-length = 88
exclude = ["docs/**"]
[tool.ruff.lint]
select = ["E", "F", "I", "PT", "D"]
ignore = ["B904", "D105", "D211", "D213", "D301", "E712", "E741"]
[tool.ruff.lint.per-file-ignores]
"test/**" = ["D100", "D101", "D102", "D103", "D104"]
"test/conftest.py" = ["E402"]
"src/loggink/__init__.py" = ["E402", "F401", "F403"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
## Pixi related stuff
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["linux-64", "win-64"]
[tool.pixi.tasks]
# Installation
install = { depends-on = ["install-pre-commit"] }
install-pre-commit = "pre-commit install"
# Repo related tasks
lint = { cmd = ["pre-commit", "run", "--all"] }
# Testing
test = { cmd = ["pytest"] }
test-lf = { cmd = ["pytest", "--lf", "--tb=short"] }
test-cov = { cmd = ["pytest", "--verbose", "--cov=loggink", "--cov-report", "xml"] }
test-cov-html = { cmd = ["pytest", "--verbose", "--cov", "--cov-report", "html"] }
# Clean up (some of) the temporary files
clean = { depends-on = [
"clean-build",
"clean-dist",
] }
clean-build = { cmd = ["rm", "-rf", "build"] }
clean-dist = { cmd = ["rm", "-rf", "dist"] }
# Specify conda only deps
[tool.pixi.dependencies]
pip = "*"
[tool.pixi.pypi-dependencies]
loggink = { path = ".", editable = true }
# Extra python environments
[tool.pixi.feature.py313.dependencies]
python = "3.13.*"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
# Environments
[tool.pixi.environments]
default = { features = ["py313", "all", "dev", "test"] }
slim = { features = ["all"] }
test-py313 = { features = ["py313", "all", "test"] }
test-py312 = { features = ["py312", "all", "test"] }
test-py311 = { features = ["py311", "all", "test"] }