litearm-python 1.2.4__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 (72) hide show
  1. {litearm_python-1.2.4/src/litearm_python.egg-info → litearm_python-1.2.5}/PKG-INFO +1 -2
  2. {litearm_python-1.2.4 → litearm_python-1.2.5}/README.md +0 -1
  3. {litearm_python-1.2.4 → litearm_python-1.2.5}/pyproject.toml +1 -1
  4. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/__init__.py +1 -1
  5. {litearm_python-1.2.4 → litearm_python-1.2.5/src/litearm_python.egg-info}/PKG-INFO +1 -2
  6. {litearm_python-1.2.4 → 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.4 → litearm_python-1.2.5}/LICENSE +0 -0
  9. {litearm_python-1.2.4 → litearm_python-1.2.5}/setup.cfg +0 -0
  10. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/__main__.py +0 -0
  11. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/_protocol.py +0 -0
  12. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/_rot.py +0 -0
  13. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/arm.py +0 -0
  14. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/cart.py +0 -0
  15. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/diagnostics.py +0 -0
  16. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/errors.py +0 -0
  17. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/log.py +0 -0
  18. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/model.py +0 -0
  19. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/params.py +0 -0
  20. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/payload.py +0 -0
  21. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/py.typed +0 -0
  22. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/state.py +0 -0
  23. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/testing.py +0 -0
  24. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/tool.py +0 -0
  25. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm/transport.py +0 -0
  26. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm_python.egg-info/dependency_links.txt +0 -0
  27. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm_python.egg-info/entry_points.txt +0 -0
  28. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm_python.egg-info/requires.txt +0 -0
  29. {litearm_python-1.2.4 → litearm_python-1.2.5}/src/litearm_python.egg-info/top_level.txt +0 -0
  30. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_ack_echo.py +0 -0
  31. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_arm_offline.py +0 -0
  32. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_banner.py +0 -0
  33. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_capability.py +0 -0
  34. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_cart_errors.py +0 -0
  35. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_cart_protocol.py +0 -0
  36. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_cart_queue.py +0 -0
  37. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_cart_wait.py +0 -0
  38. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_cli.py +0 -0
  39. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_dfu.py +0 -0
  40. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_diagnostics.py +0 -0
  41. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_doc_examples.py +0 -0
  42. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_error_codes.py +0 -0
  43. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_error_hierarchy.py +0 -0
  44. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_ff_io.py +0 -0
  45. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_fork_guard.py +0 -0
  46. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_frame_ownership.py +0 -0
  47. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_full_coverage.py +0 -0
  48. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_home.py +0 -0
  49. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_ik_bench.py +0 -0
  50. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_license.py +0 -0
  51. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_lifecycle.py +0 -0
  52. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_live.py +0 -0
  53. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_log.py +0 -0
  54. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_model.py +0 -0
  55. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_msg.py +0 -0
  56. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_offline.py +0 -0
  57. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_package_metadata.py +0 -0
  58. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_params.py +0 -0
  59. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_payload.py +0 -0
  60. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_protocol_crc.py +0 -0
  61. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_protocol_sync.py +0 -0
  62. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_public_api.py +0 -0
  63. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_request_and_get.py +0 -0
  64. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_silent_noops.py +0 -0
  65. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_status_layout.py +0 -0
  66. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_teardown.py +0 -0
  67. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_tool_offset.py +0 -0
  68. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_transport.py +0 -0
  69. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_transport_injection.py +0 -0
  70. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_transport_threadsafe.py +0 -0
  71. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_zero_g.py +0 -0
  72. {litearm_python-1.2.4 → litearm_python-1.2.5}/tests/test_zero_g_cart_guard.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: litearm-python
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: Python SDK for the LiteArm robotic arm
5
5
  Author: NEXFORM ROBOTICS
6
6
  License-Expression: Apache-2.0
@@ -474,7 +474,6 @@ See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/mai
474
474
  - `02_movej.py` — joint motion
475
475
  - `03_move_p.py` — Cartesian point to point
476
476
  - `04_ik_tcp.py` — inverse kinematics and the current pose
477
- - `05_ff_tune.py` — dynamics / control-law tuning
478
477
  - `06_cartesian.py` — Cartesian lines / arcs / waypoints
479
478
  - `07_vel_jitter_trace.py` — 300 Hz per-tick capture
480
479
 
@@ -444,7 +444,6 @@ See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/mai
444
444
  - `02_movej.py` — joint motion
445
445
  - `03_move_p.py` — Cartesian point to point
446
446
  - `04_ik_tcp.py` — inverse kinematics and the current pose
447
- - `05_ff_tune.py` — dynamics / control-law tuning
448
447
  - `06_cartesian.py` — Cartesian lines / arcs / waypoints
449
448
  - `07_vel_jitter_trace.py` — 300 Hz per-tick capture
450
449
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "litearm-python"
7
- version = "1.2.4"
7
+ version = "1.2.5"
8
8
  description = "Python SDK for the LiteArm robotic arm"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -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.4"
95
+ __version__ = "1.2.5"
96
96
 
97
97
  __all__ = [
98
98
  "Arm", "Msg", "LicenseInfo", "RobotState", "JointState", "find_cdc_port", "main",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: litearm-python
3
- Version: 1.2.4
3
+ Version: 1.2.5
4
4
  Summary: Python SDK for the LiteArm robotic arm
5
5
  Author: NEXFORM ROBOTICS
6
6
  License-Expression: Apache-2.0
@@ -474,7 +474,6 @@ See [examples/README.md](https://github.com/nexform-tech/litearm-python/blob/mai
474
474
  - `02_movej.py` — joint motion
475
475
  - `03_move_p.py` — Cartesian point to point
476
476
  - `04_ik_tcp.py` — inverse kinematics and the current pose
477
- - `05_ff_tune.py` — dynamics / control-law tuning
478
477
  - `06_cartesian.py` — Cartesian lines / arcs / waypoints
479
478
  - `07_vel_jitter_trace.py` — 300 Hz per-tick capture
480
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
File without changes
File without changes