Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add labels to metadata #15

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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