-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
159 lines (138 loc) · 4.16 KB
/
pyproject.toml
File metadata and controls
159 lines (138 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
#########################
# Project Configuration #
#########################
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "hdx-python-utilities"
description = "HDX Python Utilities for streaming tabular data, date and time handling and other helpful functions"
authors = [{name = "Michael Rans", email = "rans@email.com"}]
license = {text = "MIT"}
keywords = ["HDX", "utilities", "library", "streaming", "tabular data", "datetime", "date", "time", "timezone", "dict",
"list", "json", "yaml"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Topic :: Software Development :: Libraries :: Python Modules",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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",
"Programming Language :: Python :: 3.14",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.10"
# Extras for frictionless[excel,json] added explicitly
# for conda-forge compatibility
dependencies = [
"frictionless>=5.18.0",
# frictionless[excel]
"openpyxl>=3.1.2",
"tableschema-to-template>=0.0.13",
"xlrd>=2.0.1",
"xlwt>=1.3.0",
# frictionless[json]
"ijson>=3.2.3",
"jsonlines>=4.0.0",
# /end frictionless extras
"typing_extensions",
"loguru",
"pyphonetics",
"python-dateutil>=2.9.0, <2.9.1",
"ratelimit",
"requests-file",
"ruamel.yaml",
"xlsx2csv",
]
[project.optional-dependencies]
html = ["beautifulsoup4", "html5lib"]
diff = ["cydifflib"]
email = ["email_validator"]
docs = ["mkapi"]
[dependency-groups]
dev = [
"pytest",
"pytest-cov",
"pytest-loguru",
"pre-commit",
"ruff==0.14.13",
]
[project.urls]
Homepage = "https://github.com/OCHA-DAP/hdx-python-utilities"
# ----------------------------------------------------------------------------
# Hatchling (Build & Versioning)
# ----------------------------------------------------------------------------
[tool.hatch.version]
source = "vcs"
[tool.hatch.version.raw-options]
local_scheme = "no-local-version"
version_scheme = "python-simplified-semver"
[tool.hatch.build.hooks.vcs]
version-file = "src/hdx/utilities/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/hdx"]
[tool.hatch.metadata]
allow-direct-references = true
# ----------------------------------------------------------------------------
# Ruff (Linting & Formatting)
# ----------------------------------------------------------------------------
[tool.ruff]
target-version = "py310"
src = ["src"]
exclude = ["_version.py"]
[tool.ruff.lint]
# Defaults are E (pycodestyle) and F (pyflakes). We extend them:
extend-select = [
"I", # isort
"UP", # pyupgrade
]
ignore = [
"E501", # Line too long
]
[tool.ruff.lint.isort]
known-local-folder = ["hdx.utilities"]
# ----------------------------------------------------------------------------
# Pytest (Testing)
# ----------------------------------------------------------------------------
[tool.pytest.ini_options]
pythonpath = "src"
log_cli = true
addopts = """
--color=yes
--rootdir=.
--junitxml=test-results.xml
--cov
--no-cov-on-fail
--cov-report=lcov
--cov-report=term-missing
"""
# ----------------------------------------------------------------------------
# Coverage (Reporting)
# ----------------------------------------------------------------------------
[tool.coverage.run]
source = ["src"]
omit = ["*/_version.py"]
[tool.coverage.report]
exclude_also = [
"from ._version",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@(abc\\.)?abstractmethod",
]