Skip to content

Commit

Permalink
Merge branch 'main' into 142-remove-return_gufe
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmkenney authored Dec 4, 2023
2 parents a32f1ba + bf2323d commit fdb5449
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions alchemiscale/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,15 @@ def __repr__(self): # pragma: no cover
def __str__(self):
return "-".join([self.gufe_key, self.org, self.campaign, self.project])

def __lt__(self, other):
return str(self) < str(other)

def __eq__(self, other):
if not isinstance(other, self.__class__):
return False

return str(self) == str(other)

@classmethod
def from_str(cls, string):
prefix, token, org, campaign, project = string.split("-")
Expand Down

0 comments on commit fdb5449

Please sign in to comment.