-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
111 lines (96 loc) · 2.81 KB
/
pyproject.toml
File metadata and controls
111 lines (96 loc) · 2.81 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
[project]
name = "handmotion"
description = "handmotion"
version = "0.0.2"
readme = "README.md"
keywords = []
authors = [{name = "Julia Jia"}]
requires-python = ">=3.12,<3.13"
dependencies = [
"joblib",
"mediapipe",
"numpy",
"pillow",
"scikit-learn",
]
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64", "linux-aarch64"]
[tool.pixi.dependencies]
[tool.pixi.pypi-dependencies]
handmotion = { path = ".", editable = true }
joblib = "*"
mediapipe = "*"
numpy = "*"
pillow = "*"
scikit-learn = "*"
[tool.pixi.environments]
default = { solve-group = "default" }
dev = { features = ["dev"], solve-group = "default"}
[tool.pixi.feature.dev.activation]
# Clean PYTHONPATH to remove system ROS Python packages
# Keep only conda environment paths, once we have install/setup.bash, we may need following fix
env = { PYTHONPATH = "${CONDA_PREFIX}/lib/python/site-packages:${CONDA_PREFIX}/lib/python3.12/site-packages" }
[tool.pixi.feature.dev.tasks]
fmt = { cmd = "ruff format ." }
lint = { cmd = "ruff check . --fix" }
types = { cmd = "ty check" }
test = { cmd = "pytest" }
pre-commit = { cmd="pre-commit run --all-files" }
pre-commit-install = { cmd="pre-commit install" }
build = { cmd = "python -m build" }
publish-test = { cmd = "twine upload --repository testpypi --verbose dist/*" }
publish = { cmd = "twine upload dist/*" }
all = { depends-on = ["fmt", "lint", "types", "test"] }
[tool.pixi.feature.dev.dependencies]
pytest = ">=8.3"
pytest-timeout = ">=2.2"
ruff = ">=0.11"
pre-commit = ">=4.2"
[tool.pixi.feature.dev.pypi-dependencies]
ty = "*"
build = "*"
twine = "*"
[tool.ruff]
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"W", # pycodestyle warnings
"B", # bugbear
"N", # pep8-naming
"PT", # pytest-style
"RUF", # Ruff-specific rules
]
ignore = [
"N806", # Non-lowercase variable in function
"PLR0911", # Too many returns
"PLR0912", # Too many branches
"PLR0913", # Too many arguments to function call
"PLR0914", # Too many locals
"PLR0915", # Too many statements
"PLR1702", # Too many nested-blocks
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F403"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pytest.ini_options]
testpaths = ["tests", "handmotion"]
addopts = "--doctest-modules --timeout=300 -W ignore::pytest.PytestUnraisableExceptionWarning"
doctest_optionflags = "NORMALIZE_WHITESPACE"
timeout = 300
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"manual: marks tests as manual (excluded from CI)",
]
filterwarnings = [
"ignore::pytest.PytestUnraisableExceptionWarning",
]
[tool.hatchling.build.targets.wheel]
packages = ["handmotion"]
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]