Skip to content

Commit

Permalink
Add labels to metadata (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
atimin authored Jul 11, 2023
1 parent f652c9f commit 3514714
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- Supports for labels in metadata, [PR-15](https://github.com/panda-official/DriftCLI/pull/15)

## 0.7.1 - 2023-06-29

### Fixed
Expand Down
1 change: 1 addition & 0 deletions drift_cli/export_impl/raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def _export_metadata_to_json(path: Path, pkg: DriftDataPackage):
"status": pkg.status_code,
"published_time": pkg.publish_timestamp,
"source_timestamp": pkg.source_timestamp,
"labels": pkg.labels,
}
meta.update(MessageToDict(pkg.meta, preserving_proto_field_name=True))

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = ["setuptools>=40.8.0", "wheel"]
[project]

name = "drift-cli"
version = "0.7.1"
version = "0.8.0"
description = "CLI client for PANDA | Drift Platform"
requires-python = ">=3.8"
readme = "README.md"
Expand All @@ -29,7 +29,7 @@ classifiers = [
]

dependencies = [
"drift-python-client~=0.6.0",
"drift-python-client~=0.7.0",
"click~=8.1",
"tomlkit~=0.11",
"rich~=12.6",
Expand Down
2 changes: 2 additions & 0 deletions tests/export_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def test__export_raw_data_with_metadata(
metadata = json.load(file)
assert metadata == {
"id": 1,
"labels": {},
"published_time": 0.0,
"source_timestamp": 0.0,
"status": 0,
Expand Down Expand Up @@ -306,6 +307,7 @@ def test__export_raw_data_topics_jpeg_with_metadata(
metadata = json.load(file)
assert metadata == {
"id": 1,
"labels": {},
"image_info": {"channel_layout": "RGB", "height": "100", "width": "100"},
"published_time": 0.0,
"source_timestamp": 0.0,
Expand Down

0 comments on commit 3514714

Please sign in to comment.