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

DM-41885: Make TMAEvents hash so they work with sets #72

Merged
merged 2 commits into from Nov 29, 2023

Conversation

mfisherlevine
Copy link
Contributor

No description provided.

Copy link

@czwa czwa left a comment

Choose a reason for hiding this comment

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

Looks fine as long as the answer to my question is "yes".

def __hash__(self):
# deliberately don't hash the blockInfos here, as they are not
# a core part of the event itself, and are listy and cause problems
return hash((self.dayObs,
Copy link

Choose a reason for hiding this comment

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

There can only be one source of these events, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I'm not entirely sure what this means. This is a derived product, made from EFD data, and so for a fixed piece of EFD data and a given version of the generating code, events will be identical, but if EFD data were to change, or the generating code were to be updated, then the derived events could differ. I'm not sure I'm really answering the question, but I'm also not quite sure I understand it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any given person can recalculate these events though, so in that sense there are unlimited sources, but then I can't see how they'd need to set those together, so I doubt that's what you're asking?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry not to follow better - if you'd prefer to chat about this, just let me know on Slack and we can talk.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed OOB, this was deemed to be fine because all this is derived from a single source of truth.

@mfisherlevine mfisherlevine merged commit b5e4c2b into main Nov 29, 2023
1 check passed
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.

None yet

2 participants