-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
163 lines (142 loc) · 3.37 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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "poprox-recommender"
description = "POPROX recommender implementation and infrastructure."
authors = [{ name = "Karl Higley", email = "khigley@umn.edu" }]
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
]
requires-python = ">= 3.11"
readme = "README.md"
license = { file = "LICENSE.md" }
dynamic = ["version"]
dependencies = [
"lenskit==2025.0.0a4",
"nltk>=3.8,<4",
"numpy>=1.26,<2",
"torch~=2.2",
"smart_open==7.*",
"safetensors>=0.4,<1",
"transformers>=4.41,<5",
"rich ~=13.9",
"ipyparallel ~=8.0",
# we reference the zip file, so install doesn't need git
"poprox-concepts @ /~https://github.com/CCRI-POPROX/poprox-concepts/archive/refs/tags/v0.1.0.zip",
]
[project.optional-dependencies]
eval = [
"docopt >=0.6",
"pandas ~=2.0",
]
deploy = [
"awslambdaric ~=2.2",
]
# declare extras for Torch install
cpu = [
"torch~=2.2",
]
cuda = [
"torch~=2.2",
]
[project.urls]
Homepage = "https://docs.poprox.ai"
GitHub = "/~https://github.com/CCRI-POPROX/poprox-recommender"
## dependencies for various task sets
[dependency-groups]
lint = [
"pre-commit ~=3.7",
"ruff >=0.4",
"pyright ~=1.1",
]
test = [
"requests >=2.31,<3",
"coverage >=6.5",
"pytest >=8",
]
dev = [
"hatch ~=1.13",
"ipython >=8",
"notebook >=7.2",
"jupytext ~=1.16",
"pyarrow-stubs ~=17.11",
{ include-group = "lint" },
{ include-group = "test" },
{ include-group = "data" },
]
data = [
"dvc ~=3.51",
"dvc-s3 >=3",
"docopt >=0.6",
"pandas ~=2.0",
"matplotlib ~=3.6",
"seaborn ~=0.13.2",
"plotnine ~=0.14.1",
"jupytext >=1.16",
"scipy ~=1.14.1",
"pylatex ~=1.4.2",
"jq ~=1.8",
]
## UV index setup for PyTorch
[tool.uv]
conflicts = [
[
{ extra = "cpu" },
{ extra = "cuda" },
],
]
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu", extra = "cpu" },
{ index = "pytorch-cu124", extra = "cuda" },
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "pytorch-cu124"
url = "https://download.pytorch.org/whl/cu124"
explicit = true
###### build and environment configurations ######
# basic hatch config
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.sdist]
only-include = ["src", "tests", "LICENSE.md", "README.md"]
[tool.hatch.version]
path = "src/poprox_recommender/__about__.py"
###### tooling configurations ######
# ruff — formatting and lints
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
select = ["F", "I", "E"]
unfixable = [
# Don't touch unused imports
"F401",
]
[tool.ruff.lint.per-file-ignores]
# tests can have unused imports (for pytest fixtures)
"tests/**/*" = ["F401"]
[tool.ruff.isort]
known-first-party = ["poprox_*"]
[tool.ruff.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.pyright]
exclude = [".venv/", ".pixi/", "node_modules"]
# Component's interface creates a lot of noise with this check
reportIncompatibleMethodOverride = false
[tool.coverage.run]
source_pkgs = ["poprox_recommender", "tests"]
branch = true
parallel = true
omit = ["src/poprox_recommender/__about__.py"]
[tool.coverage.paths]
poprox_recommender = ["src/poprox_recommender"]
tests = ["tests"]
[tool.coverage.report]
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]