forked from crusaderky/ndcsv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
139 lines (126 loc) · 4.07 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
[project]
name = "ndcsv"
authors = [{name = "Guido Imperiale", email = "[email protected]"}]
license = {text = "Apache"}
description = """
Store N-dimensional labelled arrays from xarray or pandas into human-readable CSV
files and read them back without needing any configuration, load hints, or sidecar
configuration files."""
keywords = ["CSV", "pandas", "xarray"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"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",
]
requires-python = ">=3.8"
dependencies = [
"packaging >=22",
"numpy >=1.14",
"pandas >=0.24",
"pshell >=1.0",
"xarray >=0.14",
]
dynamic = ["version"]
[project.readme]
text = """
Store N-dimensional labelled arrays from xarray or pandas into human-readable
CSV files and read them back without needing any configuration, load hints, or sidecar
configuration files.
"""
content-type = "text/x-rst"
[project.urls]
Homepage = "https://github.com/crusaderky/ndcsv"
[tool.setuptools]
packages = ["ndcsv"]
zip-safe = false # https://mypy.readthedocs.io/en/latest/installed_packages.html
include-package-data = true
[tool.setuptools_scm]
# Use hardcoded version when .git has been removed and this is not a package created
# by sdist. This is the case e.g. of a remote deployment with PyCharm.
fallback_version = "9999"
[tool.setuptools.package-data]
ndcsv = [
"py.typed",
"tests/data/*",
]
[build-system]
requires = [
"setuptools>=66",
"setuptools_scm[toml]",
]
build-backend = "setuptools.build_meta"
[tool.pytest.ini_options]
addopts = "--strict-markers --strict-config -v -r sxfE --color=yes"
xfail_strict = true
python_files = ["test_*.py"]
testpaths = ["ndcsv/tests"]
filterwarnings = [
"error",
# minimum versions only
'ignore:Updating MultiIndexed coordinate .* would corrupt indices for other variables:FutureWarning',
'ignore:The signature of `Series.to_csv` was aligned to that of `DataFrame.to_csv`:FutureWarning',
'ignore:invalid value encountered in cast:RuntimeWarning',
# FIXME these need to be looked at
'ignore:.*will no longer be implicitly promoted:FutureWarning',
'ignore:.*updating coordinate .* with a PandasMultiIndex would leave the multi-index level coordinates .* in an inconsistent state:FutureWarning',
'ignore:Could not infer format, so each element will be parsed individually:UserWarning',
'ignore:Parsing dates in .* format when dayfirst=True was specified:UserWarning',
'ignore:rename .* does not create an index anymore:UserWarning',
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: nocover",
"pragma: no cover",
"TYPE_CHECKING",
"except ImportError",
"@overload",
'@(abc\.)?abstractmethod',
]
[tool.ruff]
builtins = ["ellipsis"]
exclude = [".eggs"]
target-version = "py38"
[tool.ruff.lint]
ignore = [
"E402", # module level import not at top of file
"SIM108", # use ternary operator instead of if-else block
]
select = [
"F", # Pyflakes
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"ISC", # flake8-implicit-str-concat
"SIM", # flake8-simplify
"E", # Pycodestyle
"W", # Pycodestyle
"I", # isort
"N", # pep8-naming
"UP", # Pyupgrade
"RUF", # unused-noqa
"EXE001", # Shebang is present but file is not executable
]
[tool.ruff.lint.isort]
known-first-party = ["ndcsv"]
[tool.mypy]
allow_incomplete_defs = false
allow_untyped_decorators = false
allow_untyped_defs = false
ignore_missing_imports = true
no_implicit_optional = true
show_error_codes = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = ["*.tests.*"]
allow_untyped_defs = true