dexverse-cli 0.1.0__tar.gz → 0.1.0.post1__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 (21) hide show
  1. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/PKG-INFO +3 -2
  2. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/pyproject.toml +1 -1
  3. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/README.md +2 -1
  4. dexverse_cli-0.1.0.post1/src/dexverse_cli/__init__.py +1 -0
  5. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/manifest.py +13 -5
  6. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/uv.lock +1 -1
  7. dexverse_cli-0.1.0/src/dexverse_cli/__init__.py +0 -1
  8. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/.gitignore +0 -0
  9. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/.python-version +0 -0
  10. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/alignment.py +0 -0
  11. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/cli.py +0 -0
  12. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/download.py +0 -0
  13. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/hdf5_schema.py +0 -0
  14. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/http.py +0 -0
  15. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/jetson_encoder.py +0 -0
  16. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/pack.py +0 -0
  17. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/raw_schema.py +0 -0
  18. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/state.py +0 -0
  19. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/transaction.py +0 -0
  20. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/unpack.py +0 -0
  21. {dexverse_cli-0.1.0 → dexverse_cli-0.1.0.post1}/src/dexverse_cli/unversioned_hdf5.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: dexverse-cli
3
- Version: 0.1.0
3
+ Version: 0.1.0.post1
4
4
  Summary: Download, pack, and unpack DexVerse datasets
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: av<17,>=14
@@ -41,7 +41,8 @@ type manifest.json | dexverse-dl download --manifest - --out ./dataset
41
41
 
42
42
  A manifest is either a JSON file list or an object containing `files`. Each
43
43
  file requires `download_url` and `file_name`. Optional fields are
44
- `storage_path`, `file_size`, `sha256`, and `meta_data`. Downloaded metadata is
44
+ `storage_path`, `file_size`, `sha256`, `meta_data`, and `data_protocol`.
45
+ `data_protocol` is retained in the downloaded metadata sidecar. Downloaded metadata is
45
46
  stored in a versioned sidecar and becomes `task_instruction.json` when the
46
47
  corresponding HDF5 file is unpacked; only top-level `data_protocol` is removed
47
48
  from that algorithm-facing projection.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "dexverse-cli"
7
- version = "0.1.0"
7
+ version = "0.1.0.post1"
8
8
  description = "Download, pack, and unpack DexVerse datasets"
9
9
  readme = "src/dexverse_cli/README.md"
10
10
  requires-python = ">=3.10"
@@ -26,7 +26,8 @@ type manifest.json | dexverse-dl download --manifest - --out ./dataset
26
26
 
27
27
  A manifest is either a JSON file list or an object containing `files`. Each
28
28
  file requires `download_url` and `file_name`. Optional fields are
29
- `storage_path`, `file_size`, `sha256`, and `meta_data`. Downloaded metadata is
29
+ `storage_path`, `file_size`, `sha256`, `meta_data`, and `data_protocol`.
30
+ `data_protocol` is retained in the downloaded metadata sidecar. Downloaded metadata is
30
31
  stored in a versioned sidecar and becomes `task_instruction.json` when the
31
32
  corresponding HDF5 file is unpacked; only top-level `data_protocol` is removed
32
33
  from that algorithm-facing projection.
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0.post1"
@@ -17,6 +17,7 @@ _ALLOWED_FIELDS = frozenset(
17
17
  "file_size",
18
18
  "sha256",
19
19
  "meta_data",
20
+ "data_protocol",
20
21
  }
21
22
  )
22
23
  _DRIVE_PREFIX = re.compile(r"^[A-Za-z]:")
@@ -116,12 +117,19 @@ def optional_sha256(value: object, *, index: int) -> str | None:
116
117
 
117
118
 
118
119
  def metadata(item: dict[str, Any], *, index: int) -> dict[str, Any] | None:
119
- if "meta_data" not in item:
120
- return None
121
- value = item["meta_data"]
122
- if not isinstance(value, dict):
120
+ value = item.get("meta_data") if "meta_data" in item else None
121
+ if "meta_data" in item and not isinstance(value, dict):
123
122
  raise ManifestError(f"files[{index}].meta_data must be a JSON object")
124
- return value
123
+ merged = dict(value) if value is not None else {}
124
+ if "data_protocol" not in item:
125
+ return merged or None
126
+ data_protocol = item["data_protocol"]
127
+ if not isinstance(data_protocol, str) or not data_protocol or data_protocol != data_protocol.strip():
128
+ raise ManifestError(f"files[{index}].data_protocol must be a non-empty string")
129
+ if "data_protocol" in merged and merged["data_protocol"] != data_protocol:
130
+ raise ManifestError(f"files[{index}] has conflicting data_protocol values")
131
+ merged["data_protocol"] = data_protocol
132
+ return merged
125
133
 
126
134
 
127
135
  def claim_parts(file_name: str) -> tuple[str, ...]:
@@ -108,7 +108,7 @@ wheels = [
108
108
 
109
109
  [[package]]
110
110
  name = "dexverse-cli"
111
- version = "0.1.0"
111
+ version = "0.1.0.post1"
112
112
  source = { editable = "." }
113
113
  dependencies = [
114
114
  { name = "av" },
@@ -1 +0,0 @@
1
- __version__ = "0.1.0"