generated from alvarobartt/python-package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
pyproject.toml
132 lines (117 loc) · 2.75 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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[project]
authors = [{name = "Alvaro Bartolome", email = "[email protected]"}]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"jaxlib~=0.3.25",
"jax~=0.3.25",
"objax~=1.6.0",
"flax~=0.6.2",
"dm-haiku~=0.0.9",
"safetensors~=0.2.5",
"fsspec~=2022.11.0",
]
description = "Serialize JAX, Flax, Haiku, or Objax model params with `safetensors`"
dynamic = ["version"]
keywords = []
license = "MIT"
name = "safejax"
readme = "README.md"
requires-python = ">=3.7"
[project.urls]
Documentation = "https://alvarobartt.github.io/safejax"
Issues = "https://github.com/alvarobartt/safejax/issues"
Source = "https://github.com/alvarobartt/safejax"
[tool.hatch.version]
path = "src/safejax/__init__.py"
[project.optional-dependencies]
docs = [
"mkdocs~=1.4.0",
"mkdocs-material~=8.5.4",
"mkdocs-git-revision-date-localized-plugin~=1.1.0",
"mkdocstrings[python]~=0.19.0",
]
quality = [
"black~=22.10.0",
"ruff~=0.0.194",
"pip-tools~=6.12.0",
"pre-commit~=2.20.0",
]
tests = [
"pytest~=7.1.2",
"pytest-lazy-fixture~=0.6.3",
"flaxmodels~=0.1.2",
]
[tool.hatch.envs.quality]
features = [
"quality",
]
[tool.hatch.envs.quality.scripts]
check = [
"ruff src tests benchmarks examples",
"black --check --diff --preview src tests benchmarks examples",
]
format = [
"ruff --fix src tests benchmarks examples",
"black --preview src tests benchmarks examples",
"check",
]
[tool.isort]
profile = "black"
[tool.ruff]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
[tool.ruff.isort]
known-first-party = ["safejax"]
[tool.hatch.envs.test]
features = [
"tests",
]
[tool.hatch.envs.test.scripts]
run = "pytest -s --durations 0 --disable-warnings"
[[tool.hatch.envs.test.matrix]]
python = ["37", "38", "39", "310"]
[tool.hatch.envs.docs]
features = [
"docs",
]
[tool.hatch.envs.docs.scripts]
build = [
"mkdocs build",
]
serve = [
"mkdocs serve",
]
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/docs",
"/.pre-commit-config.yaml",
"/.gitignore",
"/tests",
]