Skip to content

Conversation

@mcembalest
Copy link
Contributor

@mcembalest mcembalest commented Mar 10, 2025

Important

Remove requirement for unique_id_field in AtlasDataset creation, allowing it to be optional.

  • Behavior:
    • Removed requirement for unique_id_field in AtlasDataset.__init__() and AtlasDataset._create_project().
    • Deleted exceptions raised when unique_id_field is None in both methods.
  • Parameters:
    • Changed unique_id_field parameter to Optional[str] in AtlasDataset._create_project().
  • Misc:
    • Removed unused code related to unique_id_field checks in dataset.py.

This description was created by Ellipsis for 1f7da15. It will automatically update as commits are pushed.

@mcembalest mcembalest changed the title [draft] remove requirement for unique-id-field [draft] remove requirement for AtlasDataset unique-id-field Mar 10, 2025
logger.info(f"Loading existing dataset `{identifier}`.")
dataset_id = dataset["id"]

if dataset_id is None: # if there is no existing project, make a new one.
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing the check for unique_id_field here allows creating a dataset without a unique ID field. However, later parts of the code (e.g. in _validate_and_correct_arrow_upload) assume that project.id_field exists and is used to validate that data contains that column. This could lead to errors when unique_id_field is None.

@mcembalest
Copy link
Contributor Author

gonna reopen anew

@mcembalest mcembalest closed this May 10, 2025
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