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

Fix __eq__ check for Segment #57

Merged
merged 3 commits into from
Jul 13, 2023
Merged

Conversation

cr-xu
Copy link
Member

@cr-xu cr-xu commented Jul 13, 2023

Problem: the default __eq__ only checks for equality in attributes. For Segment this behavior is not ideal.

Changes:

  • Overwrite the__eq__ for Segment so that it checks that every element in the segment is identical.
  • Updated the Ocelot lattice file for unique element id
  • Updated the corresponding Cheetah file
  • Updated test files accordingly.

@cr-xu cr-xu added the enhancement New feature or request label Jul 13, 2023
@cr-xu cr-xu changed the title Fix __eq__ check for Segment Draft: Fix __eq__ check for Segment Jul 13, 2023
@cr-xu cr-xu marked this pull request as draft July 13, 2023 12:20
@cr-xu
Copy link
Member Author

cr-xu commented Jul 13, 2023

Sorry I forgot to mark #56 as still a work in progress 🙃

@jank324
Copy link
Member

jank324 commented Jul 13, 2023

Ups ... 🙃

@cr-xu cr-xu marked this pull request as ready for review July 13, 2023 12:33
@cr-xu cr-xu changed the title Draft: Fix __eq__ check for Segment Fix __eq__ check for Segment Jul 13, 2023
@cr-xu cr-xu requested a review from jank324 July 13, 2023 13:15
@jank324 jank324 merged commit e42651c into master Jul 13, 2023
8 checks passed
@jank324 jank324 deleted the 9-loading-and-saving-from-lattices branch July 13, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants