-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
89 lines (77 loc) · 2.53 KB
/
Copy pathpyproject.toml
File metadata and controls
89 lines (77 loc) · 2.53 KB
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
[project]
name = "modelscope-hub"
dynamic = ["version"]
description = "The official Python client to connect with ModelScope Hub."
requires-python = ">=3.10"
license = {text = "Apache-2.0"}
readme = "README.md"
keywords = ["modelscope", "hub", "sdk", "openapi", "machine-learning"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"requests>=2.28",
"tqdm>=4.64.0",
"filelock>=3.9",
"urllib3>=1.26",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-mock",
"responses>=0.20",
"ruff",
"mypy",
]
[project.scripts]
modelscope-hub = "modelscope_hub.cli.main:run_cmd"
ms-hub = "modelscope_hub.cli.main:run_cmd"
[build-system]
requires = ["setuptools>=68.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
modelscope_hub = ["py.typed"]
[tool.setuptools.dynamic]
version = {attr = "modelscope_hub.version.__version__"}
[tool.ruff]
# Must match requires-python (>=3.10): with py313 the UP rules would
# auto-rewrite code into 3.12+ syntax and silently break 3.10 support.
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
[tool.ruff.lint.per-file-ignores]
# Public exception names mirror the legacy SDK; renaming breaks downstream compat.
"src/modelscope_hub/errors.py" = ["N818"]
# Function-scope constants deliberately use CONST_CASE.
"src/modelscope_hub/api.py" = ["N806"]
"src/modelscope_hub/types.py" = ["N806"]
"src/modelscope_hub/compat/hub_api.py" = ["N806"]
# unittest.mock patch decorators inject mock classes; CamelCase args mirror the patched target.
"tests/**" = ["N803"]
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"remote: tests requiring remote API access (need .env credentials)",
]
addopts = "-v --tb=short"
[tool.mypy]
python_version = "3.10"
strict = false
# The HTTP boundary (requests -> JSON) is dynamically typed; until response
# models are introduced, warning on Any-returns only produces noise.
warn_return_any = false
[[tool.mypy.overrides]]
module = ["tqdm.*", "modelscope.*"]
ignore_missing_imports = true