current-data-py 0.1.18__tar.gz → 0.1.23__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 (131) hide show
  1. {current_data_py-0.1.18 → current_data_py-0.1.23}/MANIFEST.in +10 -10
  2. {current_data_py-0.1.18 → current_data_py-0.1.23}/PKG-INFO +43 -89
  3. {current_data_py-0.1.18 → current_data_py-0.1.23}/README.md +167 -213
  4. {current_data_py-0.1.18 → current_data_py-0.1.23}/__init__.py +24 -24
  5. {current_data_py-0.1.18 → current_data_py-0.1.23}/_multipart.py +52 -52
  6. {current_data_py-0.1.18 → current_data_py-0.1.23}/_urdf_dae.py +37 -37
  7. {current_data_py-0.1.18 → current_data_py-0.1.23}/_urdf_directory.py +87 -87
  8. {current_data_py-0.1.18 → current_data_py-0.1.23}/_urdf_mesh.py +39 -39
  9. {current_data_py-0.1.18 → current_data_py-0.1.23}/_urdf_validation.py +230 -230
  10. {current_data_py-0.1.18 → current_data_py-0.1.23}/current_data_py.egg-info/PKG-INFO +43 -89
  11. {current_data_py-0.1.18 → current_data_py-0.1.23}/current_data_py.egg-info/SOURCES.txt +11 -0
  12. {current_data_py-0.1.18 → current_data_py-0.1.23}/current_data_py.egg-info/requires.txt +1 -1
  13. {current_data_py-0.1.18 → current_data_py-0.1.23}/decoding.py +179 -179
  14. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/api/management.md +689 -594
  15. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/api/processing.md +699 -699
  16. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/index.md +88 -79
  17. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/convert-robot-data/SKILL.md +211 -211
  18. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/data-platform/SKILL.md +32 -32
  19. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/data-platform/references/api.md +38 -37
  20. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/data-platform/references/data-transfer.md +62 -62
  21. current_data_py-0.1.23/docs/skills/data-platform/references/dev-pod.md +80 -0
  22. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/data-platform/references/jobs.md +93 -86
  23. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/data-platform/references/test-environment.md +26 -26
  24. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/data-platform/references/use-cases.md +82 -82
  25. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/sdk-client/SKILL.md +11 -11
  26. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/sdk-client/references/data-client.md +395 -380
  27. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/skills/sdk-client/references/metadata-v2.md +184 -156
  28. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs/urdf.md +84 -84
  29. {current_data_py-0.1.18 → current_data_py-0.1.23}/docs.py +46 -46
  30. {current_data_py-0.1.18 → current_data_py-0.1.23}/examples/__init__.py +1 -1
  31. {current_data_py-0.1.18 → current_data_py-0.1.23}/examples/list_schemas.py +7 -7
  32. {current_data_py-0.1.18 → current_data_py-0.1.23}/examples/read_remote_td.py +54 -54
  33. {current_data_py-0.1.18 → current_data_py-0.1.23}/examples/read_td.py +30 -30
  34. {current_data_py-0.1.18 → current_data_py-0.1.23}/examples/upload_urdf.py +38 -38
  35. {current_data_py-0.1.18 → current_data_py-0.1.23}/examples/write_td.py +30 -30
  36. {current_data_py-0.1.18 → current_data_py-0.1.23}/labeling.py +102 -102
  37. {current_data_py-0.1.18 → current_data_py-0.1.23}/management.py +383 -367
  38. {current_data_py-0.1.18 → current_data_py-0.1.23}/oss.py +245 -264
  39. current_data_py-0.1.23/proto_gen/python/labeling/service/service_pb2.py +79 -0
  40. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/labeling/service/service_pb2_grpc.py +439 -435
  41. current_data_py-0.1.23/proto_gen/python/labeling/task/task_pb2.py +54 -0
  42. current_data_py-0.1.23/proto_gen/python/labeling/template/template_pb2.py +42 -0
  43. current_data_py-0.1.23/proto_gen/python/management/metadata/metadata_pb2.py +75 -0
  44. current_data_py-0.1.23/proto_gen/python/management/quality_check/quality_check_pb2.py +32 -0
  45. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/management/selection/selection_pb2.py +27 -27
  46. current_data_py-0.1.23/proto_gen/python/management/service/service_pb2.py +176 -0
  47. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/management/service/service_pb2_grpc.py +1064 -931
  48. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/management/urdf/asset_pb2.py +31 -31
  49. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/builtin_interfaces/duration_pb2.py +25 -25
  50. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/builtin_interfaces/time_pb2.py +25 -25
  51. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/custom_msgs/encoder_status_pb2.py +25 -25
  52. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/custom_msgs/joint_current_pb2.py +26 -26
  53. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/custom_msgs/keypoints_quality_pb2.py +25 -25
  54. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/custom_msgs/pose_rpy_pb2.py +26 -26
  55. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/custom_msgs/slam_quality_pb2.py +25 -25
  56. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/custom_msgs/sonic_frame_pb2.py +25 -25
  57. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/custom_msgs/subtask_description_pb2.py +25 -25
  58. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/custom_msgs/target_quality_pb2.py +25 -25
  59. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/foxglove/compressed_audio_pb2.py +26 -26
  60. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/foxglove/compressed_video_pb2.py +26 -26
  61. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/point32_pb2.py +25 -25
  62. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/point_pb2.py +25 -25
  63. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/pose_array_pb2.py +27 -27
  64. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/pose_pb2.py +27 -27
  65. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/pose_stamped_pb2.py +27 -27
  66. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/pose_with_covariance_pb2.py +26 -26
  67. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/pose_with_covariance_stamped_pb2.py +27 -27
  68. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/quaternion_pb2.py +25 -25
  69. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/transform_pb2.py +27 -27
  70. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/transform_stamped_pb2.py +27 -27
  71. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/twist_pb2.py +26 -26
  72. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/twist_stamped_pb2.py +27 -27
  73. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/twist_with_covariance_pb2.py +26 -26
  74. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/twist_with_covariance_stamped_pb2.py +27 -27
  75. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/vector3_pb2.py +25 -25
  76. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/wrench_pb2.py +26 -26
  77. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/geometry_msgs/wrench_stamped_pb2.py +27 -27
  78. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/nav_msgs/map_meta_data_pb2.py +27 -27
  79. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/nav_msgs/occupancy_grid_pb2.py +27 -27
  80. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/nav_msgs/odometry_pb2.py +28 -28
  81. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/nav_msgs/path_pb2.py +27 -27
  82. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/battery_state_pb2.py +32 -32
  83. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/camera_info_pb2.py +27 -27
  84. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/compressed_image_pb2.py +26 -26
  85. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/image_pb2.py +26 -26
  86. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/imu_pb2.py +28 -28
  87. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/joint_state_pb2.py +26 -26
  88. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/laser_scan_pb2.py +26 -26
  89. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/nav_sat_fix_pb2.py +29 -29
  90. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/nav_sat_status_pb2.py +27 -27
  91. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/point_cloud2_pb2.py +27 -27
  92. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/point_field_pb2.py +27 -27
  93. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/range_pb2.py +28 -28
  94. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/sensor_msgs/region_of_interest_pb2.py +25 -25
  95. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/std_msgs/bool_pb2.py +25 -25
  96. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/std_msgs/color_rgba_pb2.py +25 -25
  97. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/std_msgs/float32_pb2.py +25 -25
  98. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/std_msgs/float64_pb2.py +25 -25
  99. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/std_msgs/header_pb2.py +26 -26
  100. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/std_msgs/int32_pb2.py +25 -25
  101. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/std_msgs/string_pb2.py +25 -25
  102. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/std_msgs/uint32_pb2.py +25 -25
  103. {current_data_py-0.1.18 → current_data_py-0.1.23}/proto_gen/python/msg/tf2_msgs/tf_message_pb2.py +26 -26
  104. {current_data_py-0.1.18 → current_data_py-0.1.23}/pyproject.toml +24 -24
  105. {current_data_py-0.1.18 → current_data_py-0.1.23}/remote/__init__.py +7 -7
  106. {current_data_py-0.1.18 → current_data_py-0.1.23}/remote/client.py +303 -305
  107. {current_data_py-0.1.18 → current_data_py-0.1.23}/remote/source.py +99 -99
  108. {current_data_py-0.1.18 → current_data_py-0.1.23}/remote/tos_source.py +84 -84
  109. {current_data_py-0.1.18 → current_data_py-0.1.23}/schema/__init__.py +113 -113
  110. {current_data_py-0.1.18 → current_data_py-0.1.23}/schema/message_metadata.py +30 -30
  111. {current_data_py-0.1.18 → current_data_py-0.1.23}/setup.py +91 -93
  112. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_docs.py +79 -79
  113. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_environment.py +83 -83
  114. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_labeling.py +111 -111
  115. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_management.py +634 -588
  116. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_oss.py +542 -500
  117. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_package.py +44 -44
  118. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_remote.py +352 -351
  119. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_urdf.py +440 -440
  120. {current_data_py-0.1.18 → current_data_py-0.1.23}/tests/check_urdf_validation.py +286 -286
  121. {current_data_py-0.1.18 → current_data_py-0.1.23}/tos.py +195 -195
  122. {current_data_py-0.1.18 → current_data_py-0.1.23}/urdf.py +66 -66
  123. current_data_py-0.1.18/docs/skills/data-platform/references/dev-pod.md +0 -62
  124. current_data_py-0.1.18/proto_gen/python/labeling/service/service_pb2.py +0 -79
  125. current_data_py-0.1.18/proto_gen/python/labeling/task/task_pb2.py +0 -52
  126. current_data_py-0.1.18/proto_gen/python/labeling/template/template_pb2.py +0 -40
  127. current_data_py-0.1.18/proto_gen/python/management/metadata/metadata_pb2.py +0 -74
  128. current_data_py-0.1.18/proto_gen/python/management/service/service_pb2.py +0 -131
  129. {current_data_py-0.1.18 → current_data_py-0.1.23}/current_data_py.egg-info/dependency_links.txt +0 -0
  130. {current_data_py-0.1.18 → current_data_py-0.1.23}/current_data_py.egg-info/top_level.txt +0 -0
  131. {current_data_py-0.1.18 → current_data_py-0.1.23}/setup.cfg +0 -0
@@ -1,10 +1,10 @@
1
- include tests/check_package.py
2
- include tests/check_environment.py
3
- include tests/check_remote.py
4
- include tests/check_management.py
5
- include tests/check_oss.py
6
- include tests/check_labeling.py
7
- include tests/check_docs.py
8
- include tests/check_urdf.py
9
- include tests/check_urdf_validation.py
10
- recursive-include docs *.md
1
+ include tests/check_package.py
2
+ include tests/check_environment.py
3
+ include tests/check_remote.py
4
+ include tests/check_management.py
5
+ include tests/check_oss.py
6
+ include tests/check_labeling.py
7
+ include tests/check_docs.py
8
+ include tests/check_urdf.py
9
+ include tests/check_urdf_validation.py
10
+ recursive-include docs *.md
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: current-data-py
3
- Version: 0.1.18
3
+ Version: 0.1.23
4
4
  Summary: Current Data protobuf messages and schema metadata
5
5
  Requires-Python: >=3.9
6
6
  Description-Content-Type: text/markdown
7
7
  Requires-Dist: protobuf>=3.20
8
- Requires-Dist: turbodata==0.1.0
8
+ Requires-Dist: turbodata==0.3.0
9
9
  Requires-Dist: grpcio>=1.51.1
10
10
  Requires-Dist: alibabacloud-oss-v2<2,>=1.4.0
11
11
  Requires-Dist: tos<3,>=2.9
@@ -49,14 +49,15 @@ Set `ENV=test` before the first SDK import to select the test service; an unset
49
49
  empty value defaults to production. An explicit client `address=` overrides the
50
50
  default. Remote examples require service connectivity and accessible data.
51
51
 
52
- Downloads and remote reads with a selected bucket default to the storage provider's
52
+ Downloads and remote reads default to the storage provider's
53
53
  internal endpoint (`OSSClient` / `TOSClient` read permission, `download_data`,
54
- `open_data`, and bucket-selected `open_td`). Outside that cloud network, pass
54
+ `open_data`, and `open_td`). Outside that cloud network, pass
55
55
  `use_internal_endpoint=False`; there is no automatic public fallback. A supplied
56
56
  TOS `endpoint` selects that public address unless internal networking is explicitly
57
57
  requested, which remains an error. Uploads still default to public networking.
58
- Legacy OSS `open_td` without `bucket` retains the server's default read scope and
59
- does not support network selection. V2/V3 read-credential methods default to internal.
58
+ OSS `open_td` without `bucket` infers the selected provider's unique bucket from
59
+ metadata; multiple buckets require an explicit selection. The SDK manages temporary
60
+ credentials for uploads, downloads and remote TD reads.
60
61
 
61
62
  Calibration workers can import `GLOVE_CALIBRATION_REPORT_URL` from
62
63
  `current_data_py` for the environment's HTTPS Collection callback endpoint on
@@ -67,7 +68,8 @@ The worker needs network access to that platform domain.
67
68
  ## Upload files
68
69
 
69
70
  Use `OSSClient` or `TOSClient` with upload permission. The management service
70
- selects the bucket and allowed object prefix; keep it open during transfers:
71
+ selects the bucket and allowed object prefix. Both clients
72
+ require `data_type` and `data_kind`; keep the management client open during transfers:
71
73
 
72
74
  ```python
73
75
  from current_data_py.management import ManagementClient
@@ -143,85 +145,37 @@ or prove connectivity to a deployed service.
143
145
 
144
146
  ## Publish to PyPI
145
147
 
146
- CI checks this SDK but does not publish it. Releases are manual and must use the
147
- latest successfully fetched `origin/main`, including the version bump. Development
148
- branches, uncommitted changes, and older main commits are not release sources. Follow the
149
- [repository Git workflow](../.agents/rules/git-workflow.md).
150
- Prepare the version update in `pyproject.toml` on a development branch and merge it
151
- through review together with the intended SDK changes before building a release.
152
- Use a version that has not already been published.
153
-
154
- ### Build and validate
155
-
156
- Run from the repository root. Fetch the latest `origin/main`, record its commit,
157
- and build from a clean exported copy so local edits and old artifacts cannot enter
158
- the release:
159
-
160
- ```bash
161
- sdk_release_dir=$(mktemp -d /tmp/current-data-release.XXXXXX)
162
- (
163
- set -euo pipefail
164
- git fetch origin
165
- sdk_release_sha=$(git rev-parse origin/main)
166
- printf '%s\n' "$sdk_release_sha" > "$sdk_release_dir/source-commit.txt"
167
- mkdir "$sdk_release_dir/source"
168
- git archive "$sdk_release_sha" | tar -x -C "$sdk_release_dir/source"
169
- (cd "$sdk_release_dir/source/current_data_py" && python -m build --no-isolation --outdir "$sdk_release_dir/dist")
170
- python "$sdk_release_dir/source/current_data_py/tests/check_distribution.py" --dist-dir "$sdk_release_dir/dist"
171
- python -m twine check "$sdk_release_dir/dist/"*
172
- python -m pip install --no-deps --force-reinstall "$sdk_release_dir/dist/"*.whl
173
- (
174
- cd "$sdk_release_dir"
175
- unset PYTHONPATH PYTHONHOME
176
- for check in package environment management labeling remote remote_v2 oss tos decoding urdf urdf_validation docs; do
177
- python -I "$sdk_release_dir/source/current_data_py/tests/check_${check}.py"
178
- done
179
- )
180
- (cd "$sdk_release_dir/dist" && sha256sum *) > "$sdk_release_dir/SHA256SUMS"
181
- )
182
- ```
183
-
184
- Release checks run outside both source trees so child Python processes also use
185
- the installed wheel. They come from the recorded `origin/main` commit; unmerged
186
- local test fixes are not included in the export.
187
-
188
- Continue only after every check succeeds. Confirm `source-commit.txt` contains the
189
- intended main commit and inspect the wheel for the intended release features.
190
- Review the built package's README metadata for public display; exclude private
191
- deployment addresses, bucket names, and credentials. Keep the release directory
192
- and use these exact validated artifacts for uploading.
193
-
194
- ### Upload
195
-
196
- Use your configured PyPI credentials or Twine's interactive token prompt; do not
197
- put tokens in the README or shell commands. Run from the repository root in the
198
- same shell that defines `sdk_release_dir`.
199
-
200
- Fetch main again immediately before uploading. If its commit has changed, rebuild
201
- and rerun all checks from the new latest main. The command also checks that the
202
- artifacts still match the hashes recorded after validation:
203
-
204
- ```sh
205
- (
206
- set -e
207
- sdk_repository=pypi
208
- git fetch origin
209
- if [ "$(git rev-parse origin/main)" != "$(cat "$sdk_release_dir/source-commit.txt")" ]; then
210
- echo "origin/main changed; rebuild and validate the latest main before uploading." >&2
211
- exit 1
212
- fi
213
- (cd "$sdk_release_dir/dist" && sha256sum -c ../SHA256SUMS)
214
- python -m twine upload --repository "$sdk_repository" "$sdk_release_dir/dist/"*
215
- )
216
- ```
217
-
218
- For an optional TestPyPI trial, change `sdk_repository=pypi` to
219
- `sdk_repository=testpypi` in the same block and use TestPyPI credentials. Both
220
- registries require the latest-main and artifact checks.
221
-
222
- ### Verify the release
223
-
224
- After upload, verify that PyPI shows the expected version and rendered description.
225
- Compare the SHA-256 digests of both published files with `SHA256SUMS`, and retain
226
- that file with `source-commit.txt` as the release record. An optional TestPyPI trial
227
- does not replace verification of the production PyPI release.
148
+ Ordinary CI builds a temporary package and tests the installed wheel. It does not
149
+ retain SDK release artifacts or upload to a package index.
150
+
151
+ 1. Run **Release** from `main`, select `environment=test`, and check
152
+ `current_data_py`. Leave service selections, `commit`, and `sdk_version` empty.
153
+ It creates a PR that increases `project.version` to the next unused patch
154
+ version (for example, `0.1.20` → `0.1.21`). Review and merge it to start
155
+ **SDK Publish**. Major/minor version changes can still use a manual version PR.
156
+ 2. The workflow checks generated Protobuf files, builds and tests the wheel/sdist,
157
+ retains them for 90 days, and uploads them to TestPyPI. `verify_test` checks
158
+ remote SHA-256 digests and installs the package in a clean environment.
159
+ 3. Complete functional testing against the test services. TestPyPI publication
160
+ does not update existing SDK consumers; install the exact version and set
161
+ `ENV=test` before importing the SDK. Registry selection and service environment
162
+ selection are independent.
163
+ 4. Run **Release** from `main`, select `environment=prod`, check `current_data_py`,
164
+ and enter the verified `sdk_version`.
165
+ Leave service selections and `commit` empty. It creates a PR containing the
166
+ tested version, source SHA, run/attempt, artifact ID and file digests.
167
+ 5. Obtain owner approval on the release PR's latest commit and merge it. The
168
+ workflow downloads those exact distributions and publishes them to PyPI;
169
+ it does not rebuild them or use newer SDK source. `verify_prod` checks remote
170
+ digests and installation. Production consumers must explicitly upgrade.
171
+
172
+ A test version with code changes needs a new version number. Re-run failed jobs
173
+ for upload or verification failures: matching existing files are accepted and
174
+ only missing files are uploaded. Conflicting files, expired artifacts, and
175
+ unverified test releases block promotion. Do not delete and recreate artifacts
176
+ or rebuild an expired candidate under the same version; publish a new test version.
177
+ Versions that fail testing may be absent from production PyPI.
178
+
179
+ See [CI/CD configuration](../.github/CI-CD.md#sdk-publishing) for publisher setup,
180
+ permissions and workflow tests. Review package metadata and bundled documentation
181
+ for public distribution before merging a version update.
@@ -1,213 +1,167 @@
1
- # current-data-py
2
-
3
- Python SDK for robotics Protobuf messages, TD files, and platform service clients.
4
- Run shell commands from the repository root in the shared development environment.
5
-
6
- ## Use locally
7
-
8
- Run the bundled examples to write and read a local TD file using the installed SDK:
9
-
10
- ```sh
11
- python -I -m current_data_py.examples.write_td /tmp/current-data-example.td
12
- python -I -m current_data_py.examples.read_td /tmp/current-data-example.td
13
- ```
14
-
15
- `-I` avoids importing the unbuilt source directory in place of the installed package.
16
- See [examples](examples) for other entry points.
17
-
18
- For a minimal read-only service call, run this snippet with `python -I` so it uses
19
- the installed SDK:
20
-
21
- ```python
22
- from contextlib import closing
23
- import os
24
- os.environ["ENV"] = "test"
25
-
26
- from current_data_py.management import ManagementClient, MetadataFilter
27
-
28
- with ManagementClient() as client:
29
- with closing(client.stream_data_references(MetadataFilter(), timeout=30)) as records:
30
- record = next(records, None)
31
- print(record.id if record is not None else "No matching data")
32
- ```
33
-
34
- Set `ENV=test` before the first SDK import to select the test service; an unset or
35
- empty value defaults to production. An explicit client `address=` overrides the
36
- default. Remote examples require service connectivity and accessible data.
37
-
38
- Downloads and remote reads with a selected bucket default to the storage provider's
39
- internal endpoint (`OSSClient` / `TOSClient` read permission, `download_data`,
40
- `open_data`, and bucket-selected `open_td`). Outside that cloud network, pass
41
- `use_internal_endpoint=False`; there is no automatic public fallback. A supplied
42
- TOS `endpoint` selects that public address unless internal networking is explicitly
43
- requested, which remains an error. Uploads still default to public networking.
44
- Legacy OSS `open_td` without `bucket` retains the server's default read scope and
45
- does not support network selection. V2/V3 read-credential methods default to internal.
46
-
47
- Calibration workers can import `GLOVE_CALIBRATION_REPORT_URL` from
48
- `current_data_py` for the environment's HTTPS Collection callback endpoint on
49
- `DEFAULT_ADDRESS` (port 443).
50
- Processing supplies `ENV` to the Job; set it before the first SDK import.
51
- The worker needs network access to that platform domain.
52
-
53
- ## Upload files
54
-
55
- Use `OSSClient` or `TOSClient` with upload permission. The management service
56
- selects the bucket and allowed object prefix; keep it open during transfers:
57
-
58
- ```python
59
- from current_data_py.management import ManagementClient
60
- from current_data_py.tos import TOSClient
61
-
62
- with ManagementClient() as management:
63
- with TOSClient(management, permission="upload", data_type="YAM",
64
- data_kind="CONVERTED") as storage:
65
- storage.upload_file(storage.object_prefix + "recording.td", "/data/recording.td",
66
- multipart_threshold=100 * 1024**2,
67
- part_size=16 * 1024**2, max_workers=4)
68
- ```
69
-
70
- Both clients accept the same transfer options. Files at or above
71
- `multipart_threshold` use multipart upload; `0` forces multipart for nonempty
72
- files. Empty files always use PutObject. Sizes are in bytes. `part_size` must be
73
- 5 MiB–5 GiB, and the file must fit within 10,000 parts; increase it for larger
74
- files. `max_workers` controls parallel requests (1–64); part buffers use roughly
75
- `part_size * max_workers` memory, plus SDK overhead. Do not modify the source
76
- file during upload.
77
-
78
- Uploads reject existing objects by default, including when completing multipart
79
- uploads. Set `forbid_overwrite=False` to replace one. Content type and metadata
80
- are preserved. The return value is the provider's PutObject result for small
81
- files or CompleteMultipartUpload result for multipart files.
82
-
83
- Failed multipart transfers attempt to abort and delete incomplete parts. A failed
84
- cleanup emits a warning; check the bucket's incomplete uploads. The upload role
85
- and its scoped STS policy must allow `oss:AbortMultipartUpload` or
86
- `tos:AbortMultipartUpload` in addition to PutObject. Deploy the management-service
87
- policy update and ensure the underlying cloud role permits cleanup before use.
88
- There is no persistent checkpoint: a later call starts a new upload. Uploading
89
- does not register the data; call `ManagementClient.register_data` separately.
90
-
91
- ## URDF packages
92
-
93
- Use `ManagementClient.upload_urdf(directory, entrypoint, info=...)` to check local
94
- dependencies, upload source files without overwriting objects, and register one
95
- asset under a new UUID on each call. Keep the directory unchanged throughout the
96
- call; validation, hashing and upload read the source directly without private
97
- copies. Failed calls leave uploaded objects in place and do not resume or recover
98
- registration on a later call.
99
- STL, static COLLADA, OBJ/MTL and PNG/JPEG references are supported; rendering is
100
- checked in preview. The result is the locally generated asset UUID; model lists
101
- provide URDF URLs. See the
102
- [URDF guide](docs/urdf.md) and run `python -I -m current_data_py.examples.upload_urdf --help`.
103
-
104
- ## Test changes
105
-
106
- The package bundles generated Protobuf modules during its build. After protocol
107
- changes, [regenerate the bindings](../README.md#protobuf) first.
108
- Build into a fresh temporary directory, validate the artifacts, and install this
109
- checkout's wheel before running its checks. Only the local package is installed;
110
- shared dependencies are left unchanged:
111
-
112
- ```sh
113
- (
114
- set -e
115
- sdk_dist=$(mktemp -d)
116
- trap 'rm -rf "$sdk_dist"' EXIT
117
- (cd current_data_py && python -m build --no-isolation --outdir "$sdk_dist")
118
- python current_data_py/tests/check_distribution.py --dist-dir "$sdk_dist"
119
- python -m pip install --no-deps --force-reinstall "$sdk_dist"/*.whl
120
- for check in package environment management labeling remote remote_v2 oss tos decoding multipart urdf urdf_validation docs; do
121
- python -I "current_data_py/tests/check_${check}.py"
122
- done
123
- )
124
- ```
125
-
126
- These checks cover packaging, environment selection, clients, and media decoding
127
- using local fixtures and mocked services. They do not require production credentials
128
- or prove connectivity to a deployed service.
129
-
130
- ## Publish to PyPI
131
-
132
- CI checks this SDK but does not publish it. Releases are manual and must use the
133
- latest successfully fetched `origin/main`, including the version bump. Development
134
- branches, uncommitted changes, and older main commits are not release sources. Follow the
135
- [repository Git workflow](../.agents/rules/git-workflow.md).
136
- Prepare the version update in `pyproject.toml` on a development branch and merge it
137
- through review together with the intended SDK changes before building a release.
138
- Use a version that has not already been published.
139
-
140
- ### Build and validate
141
-
142
- Run from the repository root. Fetch the latest `origin/main`, record its commit,
143
- and build from a clean exported copy so local edits and old artifacts cannot enter
144
- the release:
145
-
146
- ```bash
147
- sdk_release_dir=$(mktemp -d /tmp/current-data-release.XXXXXX)
148
- (
149
- set -euo pipefail
150
- git fetch origin
151
- sdk_release_sha=$(git rev-parse origin/main)
152
- printf '%s\n' "$sdk_release_sha" > "$sdk_release_dir/source-commit.txt"
153
- mkdir "$sdk_release_dir/source"
154
- git archive "$sdk_release_sha" | tar -x -C "$sdk_release_dir/source"
155
- (cd "$sdk_release_dir/source/current_data_py" && python -m build --no-isolation --outdir "$sdk_release_dir/dist")
156
- python "$sdk_release_dir/source/current_data_py/tests/check_distribution.py" --dist-dir "$sdk_release_dir/dist"
157
- python -m twine check "$sdk_release_dir/dist/"*
158
- python -m pip install --no-deps --force-reinstall "$sdk_release_dir/dist/"*.whl
159
- (
160
- cd "$sdk_release_dir"
161
- unset PYTHONPATH PYTHONHOME
162
- for check in package environment management labeling remote remote_v2 oss tos decoding urdf urdf_validation docs; do
163
- python -I "$sdk_release_dir/source/current_data_py/tests/check_${check}.py"
164
- done
165
- )
166
- (cd "$sdk_release_dir/dist" && sha256sum *) > "$sdk_release_dir/SHA256SUMS"
167
- )
168
- ```
169
-
170
- Release checks run outside both source trees so child Python processes also use
171
- the installed wheel. They come from the recorded `origin/main` commit; unmerged
172
- local test fixes are not included in the export.
173
-
174
- Continue only after every check succeeds. Confirm `source-commit.txt` contains the
175
- intended main commit and inspect the wheel for the intended release features.
176
- Review the built package's README metadata for public display; exclude private
177
- deployment addresses, bucket names, and credentials. Keep the release directory
178
- and use these exact validated artifacts for uploading.
179
-
180
- ### Upload
181
-
182
- Use your configured PyPI credentials or Twine's interactive token prompt; do not
183
- put tokens in the README or shell commands. Run from the repository root in the
184
- same shell that defines `sdk_release_dir`.
185
-
186
- Fetch main again immediately before uploading. If its commit has changed, rebuild
187
- and rerun all checks from the new latest main. The command also checks that the
188
- artifacts still match the hashes recorded after validation:
189
-
190
- ```sh
191
- (
192
- set -e
193
- sdk_repository=pypi
194
- git fetch origin
195
- if [ "$(git rev-parse origin/main)" != "$(cat "$sdk_release_dir/source-commit.txt")" ]; then
196
- echo "origin/main changed; rebuild and validate the latest main before uploading." >&2
197
- exit 1
198
- fi
199
- (cd "$sdk_release_dir/dist" && sha256sum -c ../SHA256SUMS)
200
- python -m twine upload --repository "$sdk_repository" "$sdk_release_dir/dist/"*
201
- )
202
- ```
203
-
204
- For an optional TestPyPI trial, change `sdk_repository=pypi` to
205
- `sdk_repository=testpypi` in the same block and use TestPyPI credentials. Both
206
- registries require the latest-main and artifact checks.
207
-
208
- ### Verify the release
209
-
210
- After upload, verify that PyPI shows the expected version and rendered description.
211
- Compare the SHA-256 digests of both published files with `SHA256SUMS`, and retain
212
- that file with `source-commit.txt` as the release record. An optional TestPyPI trial
213
- does not replace verification of the production PyPI release.
1
+ # current-data-py
2
+
3
+ Python SDK for robotics Protobuf messages, TD files, and platform service clients.
4
+ Run shell commands from the repository root in the shared development environment.
5
+
6
+ ## Use locally
7
+
8
+ Run the bundled examples to write and read a local TD file using the installed SDK:
9
+
10
+ ```sh
11
+ python -I -m current_data_py.examples.write_td /tmp/current-data-example.td
12
+ python -I -m current_data_py.examples.read_td /tmp/current-data-example.td
13
+ ```
14
+
15
+ `-I` avoids importing the unbuilt source directory in place of the installed package.
16
+ See [examples](examples) for other entry points.
17
+
18
+ For a minimal read-only service call, run this snippet with `python -I` so it uses
19
+ the installed SDK:
20
+
21
+ ```python
22
+ from contextlib import closing
23
+ import os
24
+ os.environ["ENV"] = "test"
25
+
26
+ from current_data_py.management import ManagementClient, MetadataFilter
27
+
28
+ with ManagementClient() as client:
29
+ with closing(client.stream_data_references(MetadataFilter(), timeout=30)) as records:
30
+ record = next(records, None)
31
+ print(record.id if record is not None else "No matching data")
32
+ ```
33
+
34
+ Set `ENV=test` before the first SDK import to select the test service; an unset or
35
+ empty value defaults to production. An explicit client `address=` overrides the
36
+ default. Remote examples require service connectivity and accessible data.
37
+
38
+ Downloads and remote reads default to the storage provider's
39
+ internal endpoint (`OSSClient` / `TOSClient` read permission, `download_data`,
40
+ `open_data`, and `open_td`). Outside that cloud network, pass
41
+ `use_internal_endpoint=False`; there is no automatic public fallback. A supplied
42
+ TOS `endpoint` selects that public address unless internal networking is explicitly
43
+ requested, which remains an error. Uploads still default to public networking.
44
+ OSS `open_td` without `bucket` infers the selected provider's unique bucket from
45
+ metadata; multiple buckets require an explicit selection. The SDK manages temporary
46
+ credentials for uploads, downloads and remote TD reads.
47
+
48
+ Calibration workers can import `GLOVE_CALIBRATION_REPORT_URL` from
49
+ `current_data_py` for the environment's HTTPS Collection callback endpoint on
50
+ `DEFAULT_ADDRESS` (port 443).
51
+ Processing supplies `ENV` to the Job; set it before the first SDK import.
52
+ The worker needs network access to that platform domain.
53
+
54
+ ## Upload files
55
+
56
+ Use `OSSClient` or `TOSClient` with upload permission. The management service
57
+ selects the bucket and allowed object prefix. Both clients
58
+ require `data_type` and `data_kind`; keep the management client open during transfers:
59
+
60
+ ```python
61
+ from current_data_py.management import ManagementClient
62
+ from current_data_py.tos import TOSClient
63
+
64
+ with ManagementClient() as management:
65
+ with TOSClient(management, permission="upload", data_type="YAM",
66
+ data_kind="CONVERTED") as storage:
67
+ storage.upload_file(storage.object_prefix + "recording.td", "/data/recording.td",
68
+ multipart_threshold=100 * 1024**2,
69
+ part_size=16 * 1024**2, max_workers=4)
70
+ ```
71
+
72
+ Both clients accept the same transfer options. Files at or above
73
+ `multipart_threshold` use multipart upload; `0` forces multipart for nonempty
74
+ files. Empty files always use PutObject. Sizes are in bytes. `part_size` must be
75
+ 5 MiB–5 GiB, and the file must fit within 10,000 parts; increase it for larger
76
+ files. `max_workers` controls parallel requests (1–64); part buffers use roughly
77
+ `part_size * max_workers` memory, plus SDK overhead. Do not modify the source
78
+ file during upload.
79
+
80
+ Uploads reject existing objects by default, including when completing multipart
81
+ uploads. Set `forbid_overwrite=False` to replace one. Content type and metadata
82
+ are preserved. The return value is the provider's PutObject result for small
83
+ files or CompleteMultipartUpload result for multipart files.
84
+
85
+ Failed multipart transfers attempt to abort and delete incomplete parts. A failed
86
+ cleanup emits a warning; check the bucket's incomplete uploads. The upload role
87
+ and its scoped STS policy must allow `oss:AbortMultipartUpload` or
88
+ `tos:AbortMultipartUpload` in addition to PutObject. Deploy the management-service
89
+ policy update and ensure the underlying cloud role permits cleanup before use.
90
+ There is no persistent checkpoint: a later call starts a new upload. Uploading
91
+ does not register the data; call `ManagementClient.register_data` separately.
92
+
93
+ ## URDF packages
94
+
95
+ Use `ManagementClient.upload_urdf(directory, entrypoint, info=...)` to check local
96
+ dependencies, upload source files without overwriting objects, and register one
97
+ asset under a new UUID on each call. Keep the directory unchanged throughout the
98
+ call; validation, hashing and upload read the source directly without private
99
+ copies. Failed calls leave uploaded objects in place and do not resume or recover
100
+ registration on a later call.
101
+ STL, static COLLADA, OBJ/MTL and PNG/JPEG references are supported; rendering is
102
+ checked in preview. The result is the locally generated asset UUID; model lists
103
+ provide URDF URLs. See the
104
+ [URDF guide](docs/urdf.md) and run `python -I -m current_data_py.examples.upload_urdf --help`.
105
+
106
+ ## Test changes
107
+
108
+ The package bundles generated Protobuf modules during its build. After protocol
109
+ changes, [regenerate the bindings](../README.md#protobuf) first.
110
+ Build into a fresh temporary directory, validate the artifacts, and install this
111
+ checkout's wheel before running its checks. Only the local package is installed;
112
+ shared dependencies are left unchanged:
113
+
114
+ ```sh
115
+ (
116
+ set -e
117
+ sdk_dist=$(mktemp -d)
118
+ trap 'rm -rf "$sdk_dist"' EXIT
119
+ (cd current_data_py && python -m build --no-isolation --outdir "$sdk_dist")
120
+ python current_data_py/tests/check_distribution.py --dist-dir "$sdk_dist"
121
+ python -m pip install --no-deps --force-reinstall "$sdk_dist"/*.whl
122
+ for check in package environment management labeling remote remote_v2 oss tos decoding multipart urdf urdf_validation docs; do
123
+ python -I "current_data_py/tests/check_${check}.py"
124
+ done
125
+ )
126
+ ```
127
+
128
+ These checks cover packaging, environment selection, clients, and media decoding
129
+ using local fixtures and mocked services. They do not require production credentials
130
+ or prove connectivity to a deployed service.
131
+
132
+ ## Publish to PyPI
133
+
134
+ Ordinary CI builds a temporary package and tests the installed wheel. It does not
135
+ retain SDK release artifacts or upload to a package index.
136
+
137
+ 1. Run **Release** from `main`, select `environment=test`, and check
138
+ `current_data_py`. Leave service selections, `commit`, and `sdk_version` empty.
139
+ It creates a PR that increases `project.version` to the next unused patch
140
+ version (for example, `0.1.20` → `0.1.21`). Review and merge it to start
141
+ **SDK Publish**. Major/minor version changes can still use a manual version PR.
142
+ 2. The workflow checks generated Protobuf files, builds and tests the wheel/sdist,
143
+ retains them for 90 days, and uploads them to TestPyPI. `verify_test` checks
144
+ remote SHA-256 digests and installs the package in a clean environment.
145
+ 3. Complete functional testing against the test services. TestPyPI publication
146
+ does not update existing SDK consumers; install the exact version and set
147
+ `ENV=test` before importing the SDK. Registry selection and service environment
148
+ selection are independent.
149
+ 4. Run **Release** from `main`, select `environment=prod`, check `current_data_py`,
150
+ and enter the verified `sdk_version`.
151
+ Leave service selections and `commit` empty. It creates a PR containing the
152
+ tested version, source SHA, run/attempt, artifact ID and file digests.
153
+ 5. Obtain owner approval on the release PR's latest commit and merge it. The
154
+ workflow downloads those exact distributions and publishes them to PyPI;
155
+ it does not rebuild them or use newer SDK source. `verify_prod` checks remote
156
+ digests and installation. Production consumers must explicitly upgrade.
157
+
158
+ A test version with code changes needs a new version number. Re-run failed jobs
159
+ for upload or verification failures: matching existing files are accepted and
160
+ only missing files are uploaded. Conflicting files, expired artifacts, and
161
+ unverified test releases block promotion. Do not delete and recreate artifacts
162
+ or rebuild an expired candidate under the same version; publish a new test version.
163
+ Versions that fail testing may be absent from production PyPI.
164
+
165
+ See [CI/CD configuration](../.github/CI-CD.md#sdk-publishing) for publisher setup,
166
+ permissions and workflow tests. Review package metadata and bundled documentation
167
+ for public distribution before merging a version update.
@@ -1,24 +1,24 @@
1
- """Protobuf message schemas and metadata for Current Data."""
2
-
3
- import os as _os
4
-
5
- from .schema.message_metadata import descriptor_set, topic_metadata
6
- from .schema import SCHEMA_TO_CLASS
7
-
8
- _environment = _os.environ.get("ENV") or "prod"
9
- if _environment not in ("prod", "test"):
10
- raise ValueError("ENV must be prod or test")
11
-
12
- DEFAULT_ADDRESS = (
13
- "data-test.current-robotics.work:443"
14
- if _environment == "test" else "data.current-robotics.work:443"
15
- )
16
- GLOVE_CALIBRATION_REPORT_URL = (
17
- f"https://{DEFAULT_ADDRESS}"
18
- "/api/collection.service.v1.CollectionService/ReportGloveCalibration"
19
- )
20
-
21
- __all__ = [
22
- "DEFAULT_ADDRESS", "GLOVE_CALIBRATION_REPORT_URL", "SCHEMA_TO_CLASS",
23
- "descriptor_set", "topic_metadata",
24
- ]
1
+ """Protobuf message schemas and metadata for Current Data."""
2
+
3
+ import os as _os
4
+
5
+ from .schema.message_metadata import descriptor_set, topic_metadata
6
+ from .schema import SCHEMA_TO_CLASS
7
+
8
+ _environment = _os.environ.get("ENV") or "prod"
9
+ if _environment not in ("prod", "test"):
10
+ raise ValueError("ENV must be prod or test")
11
+
12
+ DEFAULT_ADDRESS = (
13
+ "data-test.current-robotics.work:443"
14
+ if _environment == "test" else "data.current-robotics.work:443"
15
+ )
16
+ GLOVE_CALIBRATION_REPORT_URL = (
17
+ f"https://{DEFAULT_ADDRESS}"
18
+ "/api/collection.service.v1.CollectionService/ReportGloveCalibration"
19
+ )
20
+
21
+ __all__ = [
22
+ "DEFAULT_ADDRESS", "GLOVE_CALIBRATION_REPORT_URL", "SCHEMA_TO_CLASS",
23
+ "descriptor_set", "topic_metadata",
24
+ ]