-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
93 lines (77 loc) · 2.5 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "repro-zipfile"
dynamic = ["version"]
description = "A tiny, zero-dependency replacement for Python's zipfile.ZipFile for creating reproducible/deterministic ZIP archives."
readme = "README.md"
requires-python = ">=3.8"
license = { file = "LICENSE" }
keywords = ["zipfile", "zip", "reproducible", "deterministic"]
authors = [{ name = "DrivenData", email = "info@drivendata.org" }]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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 :: System :: Archiving",
"Topic :: System :: Archiving :: Compression",
"Topic :: System :: Archiving :: Packaging",
]
dependencies = []
[project.optional-dependencies]
cli = ["rpzip"]
tests = ["pytest>=6,<8", "pytest-cases"]
[project.urls]
Documentation = "https://github.com/drivendataorg/repro-zipfile#readme"
Issues = "https://github.com/drivendataorg/repro-zipfile/issues"
Source = "https://github.com/drivendataorg/repro-zipfile"
[tool.hatch.version]
path = "repro_zipfile.py"
## DEFAULT ENVIRONMENT ##
[tool.hatch.envs.default]
pre-install-commands = [
"pip install -e . -e cli",
]
features = ["cli", "tests"]
dependencies = ["ipython", "mypy>=1.0.0", "ruff>=0.1.14"]
python = "3.10"
path = ".venv"
[tool.hatch.envs.default.scripts]
lint = ["ruff format --check {args:.}", "ruff check {args:.}"]
typecheck = ["mypy {args:repro_zipfile.py cli/rpzip.py} --install-types --non-interactive"]
## TESTS ENVIRONMENT ##
[tool.hatch.envs.tests]
pre-install-commands = [
"pip install -e . -e cli",
]
features = ["tests", "cli"]
dependencies = ["coverage>=6.5", "pytest-cov"]
template = "tests"
[[tool.hatch.envs.tests.matrix]]
python = ["3.8", "3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.tests.scripts]
test = "pytest {args:tests} -v --cov=. --cov=./cli --cov-report=term --cov-report=html --cov-report=xml"
## TOOLS ##
[tool.ruff]
line-length = 99
[tool.lint]
select = [
"E", # Pyflakes
"F", # Pycodestyle
"I", # isort
]
src = ["*.py", "cli/*.py", "tests/*.py"]
unfixable = ["F"]
[tool.lint.isort]
known-first-party = ["repro_zipfile", "rpzip"]
force-sort-within-sections = true
[tool.coverage.run]
omit = ["tests/*"]