[build-system]
requires = ["setuptools>=68.0", "wheel>=0.42"]
build-backend = "setuptools.build_meta"

[project]
name = "lerobot_robot_ufactory"
version = "0.1.0"
description = "UFACTORY 机械臂与 LeRobot 框架集成"
readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
authors = [
    { name = "lerobot_robot_ufactory Contributors" },
]
keywords = ["robotics", "lerobot", "ufactory", "xarm", "imitation-learning"]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
    "numpy>=1.24",
    "pyarrow>=14.0",
    "pyyaml",
    "lerobot[intelrealsense]==0.4.3",
    "xarm-python-sdk",
    "opencv-python",
]

[project.scripts]
uf-robot-teleop = "lerobot_robot_ufactory.scripts.uf_robot_teleop:main"
uf-lerobot-record = "lerobot_robot_ufactory.scripts.uf_lerobot_record:main"
uf-lerobot-eval = "lerobot_robot_ufactory.scripts.uf_lerobot_eval:main"
uf-lerobot-replay = "lerobot_robot_ufactory.scripts.uf_lerobot_replay:main"
uf-vive-calibrate = "lerobot_robot_ufactory.scripts.vive_calibrate:main"
uf-camera-view = "lerobot_robot_ufactory.scripts.uf_camera_view:main"
uf-realsense-view = "lerobot_robot_ufactory.scripts.uf_realsense_view:main"
uf-camera-test = "lerobot_robot_ufactory.scripts.uf_camera_test:main"

[project.optional-dependencies]
# GELLO 遥操作
gello = [
    "gello @ git+https://github.com/xArm-Developer/gello_software.git",
    "dynamixel-sdk @ git+https://github.com/ROBOTIS-GIT/DynamixelSDK.git#subdirectory=python",
]
# SpaceMouse 遥操作
spacemouse = [
    "spnav @ git+https://github.com/kazoo-osaro/spnav",
]
# 开发工具
dev = [
    "pytest>=8.0",
    "pytest-cov>=5.0",
    "ruff>=0.8",
    "mypy>=1.10",
    "pre-commit>=3.7",
]

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
"lerobot_robot_ufactory.devices.umi.xvlib" = ["*.so", "*.so.*"]

[tool.ruff]
line-length = 100
target-version = "py310"

[tool.ruff.lint]
select = [
    "E",   # pycodestyle errors
    "W",   # pycodestyle warnings
    "F",   # pyflakes
    "I",   # isort
    "B",   # flake8-bugbear
    "UP",  # pyupgrade
]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"

[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
addopts = "-v --tb=short"

[tool.mypy]
python_version = "3.10"
strict = true
ignore_missing_imports = true
