-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
163 lines (149 loc) · 3.52 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
[project]
name = "dplib-py"
dynamic = ["version"]
description = "Python implementation of the Data Package standard"
license = "MIT"
readme = "README.md"
requires-python = ">=3.8"
urls.homepage = "https://github.com/frictionlessdata/dplib-py"
authors = [
{name = "Open Knowledge Foundation", email = "[email protected]"},
]
keywords=[
"data validation",
"open data",
"json schema",
"json table schema",
"data package",
"tabular data package",
]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"pyyaml>=5.0",
"pydantic>=2.0",
"jsonschema>=3.0",
"python-slugify>=6.0",
"fsspec[http]>=2023.1.0",
"typing-extensions>=4.0",
]
[project.optional-dependencies]
cli = ["typer>=0.12", "rich>=10.0"]
dcat = ["rdflib>=6.0"]
pandas = ["pandas>=1.0", "pandas-stubs>=1.0", "numpy>=1.0", "isodate>=0.6"]
polars = ["polars-lts-cpu>=0.10"]
sql = ["sqlalchemy>=1.4"]
dev = [
"ruff",
"hatch",
"neovim",
"pyright",
"ipython",
# mkdocs
"mkdocs",
"mkdocstrings[python]",
"mkdocs-material",
# pytest
"pytest",
"pytest-cov",
"pytest-vcr",
"pytest-mock",
"pytest-dotenv",
"pytest-timeout",
"pytest-lazy-fixtures",
]
[project.scripts]
dp = "dplib.plugins.cli.__main__:program"
[tool.hatch.version]
path = "dplib/settings.py"
[tool.hatch.build.targets.wheel]
packages = ["dplib"]
[tool.hatch.envs.default]
python = "3.10"
dependencies = [
"dplib-py[cli,dcat,sql,pandas,polars,dev]",
]
[tool.hatch.envs.default.scripts]
coverage = [
"sensible-browser coverage/index.html",
]
docs = [
"mkdocs serve",
]
docs-build = [
"mkdocs build",
]
format = [
"ruff check --fix",
"ruff format dplib",
]
lint = [
"ruff check dplib",
]
release = [
"""
VERSION=$(hatch run version)
git checkout main && git pull origin && git fetch -p
git log --pretty=format:"%C(yellow)%h%Creset %s%Cgreen%d" --reverse -20
echo "\nReleasing v$VERSION in 10 seconds. Press <CTRL+C> to abort\n" && sleep 10
hatch run test && git commit -a -m "v$VERSION" && git tag -a "v$VERSION" -m "v$VERSION"
git push --follow-tags
"""
]
spec = [
"pytest --cov dplib --cov-report term-missing --cov-report html:coverage --cov-fail-under 0 --timeout=300",
]
test = [
"lint",
"type",
"spec",
]
type = [
"pyright dplib",
]
version = [
"hatch --no-color version"
]
[[tool.hatch.envs.ci.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.ci.scripts]
spec = [
"pytest --cov dplib --cov-report term-missing --cov-report xml --cov-fail-under 0 --timeout=300 --ci",
]
test = [
"lint",
"type",
"spec",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.ruff]
line-length = 90
[tool.ruff.lint]
ignore = ["E501", "E731", "F405"]
extend-select = ["I"]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]
[tool.pytest.ini_options]
testpaths = ["dplib"]
env_files = [".env"]
markers = [
"ci: integrational tests (select with '--ci')",
]
[tool.pyright]
strict = ["dplib"]
include = ["dplib"]
ignore = ["**/__init__.py"]