litearm-python 1.2.3__tar.gz → 1.2.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. {litearm_python-1.2.3/src/litearm_python.egg-info → litearm_python-1.2.5}/PKG-INFO +27 -5
  2. {litearm_python-1.2.3 → litearm_python-1.2.5}/README.md +8 -3
  3. litearm_python-1.2.5/pyproject.toml +49 -0
  4. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/__init__.py +1 -1
  5. {litearm_python-1.2.3 → litearm_python-1.2.5/src/litearm_python.egg-info}/PKG-INFO +27 -5
  6. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm_python.egg-info/SOURCES.txt +1 -0
  7. litearm_python-1.2.5/tests/test_env_sh.py +55 -0
  8. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_package_metadata.py +1 -3
  9. litearm_python-1.2.3/pyproject.toml +0 -27
  10. {litearm_python-1.2.3 → litearm_python-1.2.5}/LICENSE +0 -0
  11. {litearm_python-1.2.3 → litearm_python-1.2.5}/setup.cfg +0 -0
  12. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/__main__.py +0 -0
  13. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/_protocol.py +0 -0
  14. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/_rot.py +0 -0
  15. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/arm.py +0 -0
  16. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/cart.py +0 -0
  17. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/diagnostics.py +0 -0
  18. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/errors.py +0 -0
  19. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/log.py +0 -0
  20. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/model.py +0 -0
  21. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/params.py +0 -0
  22. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/payload.py +0 -0
  23. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/py.typed +0 -0
  24. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/state.py +0 -0
  25. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/testing.py +0 -0
  26. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/tool.py +0 -0
  27. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm/transport.py +0 -0
  28. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm_python.egg-info/dependency_links.txt +0 -0
  29. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm_python.egg-info/entry_points.txt +0 -0
  30. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm_python.egg-info/requires.txt +0 -0
  31. {litearm_python-1.2.3 → litearm_python-1.2.5}/src/litearm_python.egg-info/top_level.txt +0 -0
  32. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_ack_echo.py +0 -0
  33. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_arm_offline.py +0 -0
  34. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_banner.py +0 -0
  35. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_capability.py +0 -0
  36. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_cart_errors.py +0 -0
  37. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_cart_protocol.py +0 -0
  38. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_cart_queue.py +0 -0
  39. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_cart_wait.py +0 -0
  40. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_cli.py +0 -0
  41. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_dfu.py +0 -0
  42. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_diagnostics.py +0 -0
  43. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_doc_examples.py +0 -0
  44. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_error_codes.py +0 -0
  45. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_error_hierarchy.py +0 -0
  46. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_ff_io.py +0 -0
  47. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_fork_guard.py +0 -0
  48. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_frame_ownership.py +0 -0
  49. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_full_coverage.py +0 -0
  50. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_home.py +0 -0
  51. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_ik_bench.py +0 -0
  52. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_license.py +0 -0
  53. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_lifecycle.py +0 -0
  54. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_live.py +0 -0
  55. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_log.py +0 -0
  56. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_model.py +0 -0
  57. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_msg.py +0 -0
  58. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_offline.py +0 -0
  59. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_params.py +0 -0
  60. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_payload.py +0 -0
  61. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_protocol_crc.py +0 -0
  62. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_protocol_sync.py +0 -0
  63. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_public_api.py +0 -0
  64. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_request_and_get.py +0 -0
  65. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_silent_noops.py +0 -0
  66. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_status_layout.py +0 -0
  67. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_teardown.py +0 -0
  68. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_tool_offset.py +0 -0
  69. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_transport.py +0 -0
  70. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_transport_injection.py +0 -0
  71. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_transport_threadsafe.py +0 -0
  72. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_zero_g.py +0 -0
  73. {litearm_python-1.2.3 → litearm_python-1.2.5}/tests/test_zero_g_cart_guard.py +0 -0
@@ -1,8 +1,25 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: litearm-python
3
- Version: 1.2.3
3
+ Version: 1.2.5
4
4
  Summary: Python SDK for the LiteArm robotic arm
5
- License: Apache-2.0
5
+ Author: NEXFORM ROBOTICS
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Repository, https://github.com/nexform-tech/litearm-python
8
+ Project-URL: Issues, https://github.com/nexform-tech/litearm-python/issues
9
+ Project-URL: Documentation, https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md
10
+ Keywords: litearm,robotic-arm,robot-arm,robotics,serial,stm32,sdk
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Classifier: Typing :: Typed
6
23
  Requires-Python: >=3.9
7
24
  Description-Content-Type: text/markdown
8
25
  License-File: LICENSE
@@ -41,13 +58,19 @@ and dynamics are all carried by the firmware.
41
58
  | Firmware | `Litearm1.5.0` or later |
42
59
  | Connection | USB CDC serial, VID:PID `1d50:606f` |
43
60
 
44
- From the repository root:
61
+ From PyPI:
45
62
 
46
63
  ```bash
47
- pip install -e .
64
+ pip install litearm-python
48
65
  python3 -c "import litearm; print(litearm.__version__)" # verify
49
66
  ```
50
67
 
68
+ Or install from a checkout:
69
+
70
+ ```bash
71
+ pip install -e .
72
+ ```
73
+
51
74
  Linux needs serial permissions — check what the device node itself says first:
52
75
 
53
76
  ```bash
@@ -451,7 +474,6 @@ See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/mai
451
474
  - `02_movej.py` — joint motion
452
475
  - `03_move_p.py` — Cartesian point to point
453
476
  - `04_ik_tcp.py` — inverse kinematics and the current pose
454
- - `05_ff_tune.py` — dynamics / control-law tuning
455
477
  - `06_cartesian.py` — Cartesian lines / arcs / waypoints
456
478
  - `07_vel_jitter_trace.py` — 300 Hz per-tick capture
457
479
 
@@ -28,13 +28,19 @@ and dynamics are all carried by the firmware.
28
28
  | Firmware | `Litearm1.5.0` or later |
29
29
  | Connection | USB CDC serial, VID:PID `1d50:606f` |
30
30
 
31
- From the repository root:
31
+ From PyPI:
32
32
 
33
33
  ```bash
34
- pip install -e .
34
+ pip install litearm-python
35
35
  python3 -c "import litearm; print(litearm.__version__)" # verify
36
36
  ```
37
37
 
38
+ Or install from a checkout:
39
+
40
+ ```bash
41
+ pip install -e .
42
+ ```
43
+
38
44
  Linux needs serial permissions — check what the device node itself says first:
39
45
 
40
46
  ```bash
@@ -438,7 +444,6 @@ See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/mai
438
444
  - `02_movej.py` — joint motion
439
445
  - `03_move_p.py` — Cartesian point to point
440
446
  - `04_ik_tcp.py` — inverse kinematics and the current pose
441
- - `05_ff_tune.py` — dynamics / control-law tuning
442
447
  - `06_cartesian.py` — Cartesian lines / arcs / waypoints
443
448
  - `07_vel_jitter_trace.py` — 300 Hz per-tick capture
444
449
 
@@ -0,0 +1,49 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "litearm-python"
7
+ version = "1.2.5"
8
+ description = "Python SDK for the LiteArm robotic arm"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "Apache-2.0"
12
+ license-files = ["LICENSE"]
13
+ authors = [{ name = "NEXFORM ROBOTICS" }]
14
+ keywords = ["litearm", "robotic-arm", "robot-arm", "robotics", "serial", "stm32", "sdk"]
15
+ classifiers = [
16
+ "Development Status :: 4 - Beta",
17
+ "Intended Audience :: Developers",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Topic :: Scientific/Engineering",
27
+ "Typing :: Typed",
28
+ ]
29
+ dependencies = ["pyserial>=3.4"]
30
+
31
+ [project.optional-dependencies]
32
+ dev = ["pytest>=7"]
33
+
34
+ [project.urls]
35
+ Repository = "https://github.com/nexform-tech/litearm-python"
36
+ Issues = "https://github.com/nexform-tech/litearm-python/issues"
37
+ Documentation = "https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md"
38
+
39
+ [project.scripts]
40
+ litearm-python = "litearm.arm:main"
41
+
42
+ [tool.pytest.ini_options]
43
+ testpaths = ["tests"]
44
+
45
+ [tool.setuptools.packages.find]
46
+ where = ["src"]
47
+
48
+ [tool.setuptools.package-data]
49
+ litearm = ["py.typed"]
@@ -92,7 +92,7 @@ from litearm.state import JointState, RobotState
92
92
  from litearm.tool import TcpOffset
93
93
  from litearm.transport import find_cdc_port
94
94
 
95
- __version__ = "1.2.3"
95
+ __version__ = "1.2.5"
96
96
 
97
97
  __all__ = [
98
98
  "Arm", "Msg", "LicenseInfo", "RobotState", "JointState", "find_cdc_port", "main",
@@ -1,8 +1,25 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: litearm-python
3
- Version: 1.2.3
3
+ Version: 1.2.5
4
4
  Summary: Python SDK for the LiteArm robotic arm
5
- License: Apache-2.0
5
+ Author: NEXFORM ROBOTICS
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Repository, https://github.com/nexform-tech/litearm-python
8
+ Project-URL: Issues, https://github.com/nexform-tech/litearm-python/issues
9
+ Project-URL: Documentation, https://github.com/nexform-tech/litearm-python/blob/main/docs/DEVELOPER_GUIDE.md
10
+ Keywords: litearm,robotic-arm,robot-arm,robotics,serial,stm32,sdk
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Classifier: Typing :: Typed
6
23
  Requires-Python: >=3.9
7
24
  Description-Content-Type: text/markdown
8
25
  License-File: LICENSE
@@ -41,13 +58,19 @@ and dynamics are all carried by the firmware.
41
58
  | Firmware | `Litearm1.5.0` or later |
42
59
  | Connection | USB CDC serial, VID:PID `1d50:606f` |
43
60
 
44
- From the repository root:
61
+ From PyPI:
45
62
 
46
63
  ```bash
47
- pip install -e .
64
+ pip install litearm-python
48
65
  python3 -c "import litearm; print(litearm.__version__)" # verify
49
66
  ```
50
67
 
68
+ Or install from a checkout:
69
+
70
+ ```bash
71
+ pip install -e .
72
+ ```
73
+
51
74
  Linux needs serial permissions — check what the device node itself says first:
52
75
 
53
76
  ```bash
@@ -451,7 +474,6 @@ See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/mai
451
474
  - `02_movej.py` — joint motion
452
475
  - `03_move_p.py` — Cartesian point to point
453
476
  - `04_ik_tcp.py` — inverse kinematics and the current pose
454
- - `05_ff_tune.py` — dynamics / control-law tuning
455
477
  - `06_cartesian.py` — Cartesian lines / arcs / waypoints
456
478
  - `07_vel_jitter_trace.py` — 300 Hz per-tick capture
457
479
 
@@ -36,6 +36,7 @@ tests/test_cli.py
36
36
  tests/test_dfu.py
37
37
  tests/test_diagnostics.py
38
38
  tests/test_doc_examples.py
39
+ tests/test_env_sh.py
39
40
  tests/test_error_codes.py
40
41
  tests/test_error_hierarchy.py
41
42
  tests/test_ff_io.py
@@ -0,0 +1,55 @@
1
+ """env.sh 的严格模式只能作用于自己 —— `source env.sh` 不能改变调用者的 shell。
2
+
3
+ `source` 在调用者的 shell 里执行,所以文件里一句 `set -e` 会留在调用者的交互
4
+ shell 里:之后任何一条命令返回非零,终端就直接退出。这几条用例在子 shell 里
5
+ source 一次,确认调用者的选项没被改动、失败命令不再中断 shell。
6
+ """
7
+ from __future__ import annotations
8
+
9
+ import os
10
+ import subprocess
11
+ from pathlib import Path
12
+
13
+ REPO = Path(__file__).resolve().parents[1]
14
+ ENV_SH = REPO / "env.sh"
15
+
16
+
17
+ def _bash(script: str, **kwargs) -> subprocess.CompletedProcess:
18
+ return subprocess.run(
19
+ ["bash", "--norc", "--noprofile", "-c", script],
20
+ capture_output=True,
21
+ text=True,
22
+ timeout=30,
23
+ **kwargs,
24
+ )
25
+
26
+
27
+ def test_sourcing_env_sh_leaves_errexit_off():
28
+ """source 之后 `false` 不能把 shell 干掉。"""
29
+ proc = _bash(f'source "{ENV_SH}" >/dev/null 2>&1; false; echo survived')
30
+ assert proc.returncode == 0, proc.stderr
31
+ assert "survived" in proc.stdout
32
+
33
+
34
+ def test_sourcing_env_sh_keeps_caller_shell_options():
35
+ """source 前后 `set +o` 的输出必须逐字相同。"""
36
+ proc = _bash(
37
+ f'before=$(set +o); source "{ENV_SH}" >/dev/null 2>&1; after=$(set +o); '
38
+ '[ "$before" = "$after" ] && echo unchanged'
39
+ )
40
+ assert proc.returncode == 0, proc.stderr
41
+ assert "unchanged" in proc.stdout
42
+
43
+
44
+ def test_executing_env_sh_enables_strict_mode_cleanly():
45
+ """直接执行时仍然开严格模式,并且在最小环境里也不因未定义变量而失败。"""
46
+ env = {"PATH": os.environ["PATH"], "HOME": os.environ.get("HOME", "")}
47
+ proc = subprocess.run(
48
+ ["bash", str(ENV_SH)],
49
+ capture_output=True,
50
+ text=True,
51
+ timeout=30,
52
+ env=env,
53
+ )
54
+ assert proc.returncode == 0, proc.stderr
55
+ assert f"repo={REPO}" in proc.stdout
@@ -22,9 +22,7 @@ def _project_description() -> str:
22
22
 
23
23
  def _project_license() -> str:
24
24
  text = PYPROJECT.read_text(encoding="utf-8")
25
- match = re.search(
26
- r'^license\s*=\s*\{\s*text\s*=\s*"([^"]+)"\s*\}\s*$', text, re.MULTILINE
27
- )
25
+ match = re.search(r'^license\s*=\s*"([^"]+)"\s*$', text, re.MULTILINE)
28
26
  assert match is not None, "pyproject.toml has no [project].license"
29
27
  return match.group(1)
30
28
 
@@ -1,27 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=61"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "litearm-python"
7
- version = "1.2.3"
8
- description = "Python SDK for the LiteArm robotic arm"
9
- readme = "README.md"
10
- requires-python = ">=3.9"
11
- license = { text = "Apache-2.0" }
12
- dependencies = ["pyserial>=3.4"]
13
-
14
- [project.optional-dependencies]
15
- dev = ["pytest>=7"]
16
-
17
- [project.scripts]
18
- litearm-python = "litearm.arm:main"
19
-
20
- [tool.pytest.ini_options]
21
- testpaths = ["tests"]
22
-
23
- [tool.setuptools.packages.find]
24
- where = ["src"]
25
-
26
- [tool.setuptools.package-data]
27
- litearm = ["py.typed"]
File without changes
File without changes