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

Phase detection strategies #12

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rollf
Copy link

@rollf rollf commented Jan 2, 2025

This is an initial attempt to implement phasing detection strategies. See #7 .

  • I adapted the test.sh to make it runnable on systems without /bin/bash
  • I swapped the if-condition for phasedAutodetect to decrease the cognitive load
  • I added two strategies to detect phasing.

I'm not happy with my enum+fp-style approach but did not want to change in the middle of coding. Feel free to suggest another approach. Maybe simply OOP inheritance.

Moving previous around (see code) is only necessary if you care for performance (while looping over the variants) which is fine as is. Still, it's cumbersome and could be removed if performance is not a concern.

ONE_FOR_ALL and DEFAULT are no good names.

I am not sure what exactly phasedAutodetect is expected to mean. I guess the final PR should also touch on this attribute for a consistent approach.

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.

1 participant