Skip to content

Commit

Permalink
feat: overload Dataset eq
Browse files Browse the repository at this point in the history
  • Loading branch information
aaraney committed Jan 30, 2024
1 parent abc684f commit 4826bfb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/lib/core/dmod/core/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,18 @@ def __init__(self, manager: DatasetManager = None, **kwargs):
raise ValueError(f"Expected UUID got {type(manager.uuid)}")
self.manager_uuid = manager.uuid

def __eq__(self, other):
return (
isinstance(other, Dataset)
and self.access_location == other.access_location
and self.category == other.category
and self.created_on == other.created_on
and self.data_domain == other.data_domain
and self.dataset_type == other.dataset_type
and self.is_read_only == other.is_read_only
and self.name == other.name
)

@property
def manager(self) -> Optional[DatasetManager]:
return self._manager
Expand Down

0 comments on commit 4826bfb

Please sign in to comment.