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

Dynamic datasets minimal feature #452

Merged
merged 5 commits into from
Oct 30, 2023
Merged

Conversation

alexey-cord-tech
Copy link
Contributor

@alexey-cord-tech alexey-cord-tech commented Oct 27, 2023

Introduction and Explanation

Implement the minimal "add existing items to a new dataset without re-uploading" thing. See also https://github.com/encord-team/cord-backend/pull/2665

Tests

Here: https://github.com/encord-team/cord-backend/pull/2670

Known issues

Will need the docs at some point, but probably only when we make this "really work"

Summary by CodeRabbit

New Features:

  • Added a link_items method to the Dataset and EncordClient classes, enabling linking of existing items to a dataset without re-uploading.
  • Introduced backing_folder_uuid property to the Dataset class, providing the UUID of the associated backing folder.
  • Included an optional create_backing_folder parameter in the create_dataset function, allowing control over backing folder creation.
  • Enhanced get_datasets function with enable_storage_api flag for improved dataset retrieval.

Tests:

  • Added new test case in dataset unit tests to ensure proper handling of backing_folder_uuid field as a UUID.

🎉 Here's to the code that we weave, 🧵
To the features that make users believe. 🙌
With each line, we create, 📝
A product that's truly great. 🚀
So raise your glasses high, 🥂
For this PR that reaches the sky! ☁️

@github-actions
Copy link

github-actions bot commented Oct 27, 2023

Image description CodeRabbit

Walkthrough: This update introduces the ability to link existing items to a dataset without re-uploading them, and adds an option to create a backing folder for a dataset. It also includes changes to handle UUIDs properly in the CreateDatasetResponse object and enables the storage API when retrieving datasets.

Changes:

Files Summary
encord/client.py, encord/dataset.py Introduced a new method link_items to link existing items to a dataset. Added a new property backing_folder_uuid to the Dataset class.
encord/user_client.py Added a new parameter create_backing_folder to the create_dataset function. Updated get_datasets function to include the enable_storage_api flag.
encord/orm/dataset.py Added a new parameter backing_item_uuid to various methods and properties. Introduced a new class DatasetLinkItems. Updated DatasetInfo and Dataset classes to include the backing_folder_uuid property.
tests/orm/test_dataset.py, tests/orm/test_create_dataset_response.py Added backing_folder_uuid and backing_item_uuid fields to the JSON data structure. Added a new test case to check if the backing_folder_uuid field in the CreateDatasetResponse object is handled as a UUID.

Notes

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Ignoring further reviews

  • Type @coderabbitai: ignore anywhere in the PR description to ignore further reviews from the bot.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between e141932 and 7db4361 commits.
Files selected (4)
  • encord/client.py (2)
  • encord/dataset.py (3)
  • encord/orm/dataset.py (15)
  • encord/user_client.py (2)
Files not reviewed due to errors (1)
  • encord/orm/dataset.py (no response)
Review comments generated (8)
  • Review: 2
  • LGTM: 6

encord/user_client.py Show resolved Hide resolved
encord/client.py Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Oct 27, 2023

Unit test report

124 tests   113 ✔️  6s ⏱️
    1 suites    11 💤
    1 files        0

Results for commit e6b54f7.

♻️ This comment has been updated with latest results.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 7db4361 and 5e62fd6 commits.
Files selected (3)
  • encord/orm/dataset.py (15)
  • tests/orm/test_create_dataset_response.py (1)
  • tests/orm/test_dataset.py (1)
Files skipped from review due to trivial changes (1)
  • tests/orm/test_create_dataset_response.py
Review comments generated (18)
  • Review: 7
  • LGTM: 11

encord/orm/dataset.py Outdated Show resolved Hide resolved
encord/orm/dataset.py Show resolved Hide resolved
encord/orm/dataset.py Show resolved Hide resolved
encord/orm/dataset.py Show resolved Hide resolved
encord/orm/dataset.py Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 5e62fd6 and d3ea8a1 commits.
Files selected (1)
  • encord/orm/dataset.py (15)
Review comments generated (14)
  • Review: 5
  • LGTM: 9

encord/orm/dataset.py Outdated Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between d3ea8a1 and 1d357dd commits.
Files selected (1)
  • encord/orm/dataset.py (15)
Review comments generated (15)
  • Review: 5
  • LGTM: 10

encord/orm/dataset.py Show resolved Hide resolved
encord/orm/dataset.py Show resolved Hide resolved
encord/orm/dataset.py Show resolved Hide resolved
encord/orm/dataset.py Show resolved Hide resolved
encord/orm/dataset.py Show resolved Hide resolved
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 1d357dd and e6b54f7 commits.
Files selected (1)
  • encord/user_client.py (3)
Review comments generated (3)
  • Review: 1
  • LGTM: 2

encord/user_client.py Show resolved Hide resolved
@alexey-cord-tech alexey-cord-tech merged commit 5601421 into master Oct 30, 2023
4 checks passed
@alexey-cord-tech alexey-cord-tech deleted the ak/dynamic-datasets branch October 30, 2023 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants