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

Add ability to force candidates to be evaluated first #25

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

9thbit
Copy link

@9thbit 9thbit commented Jun 26, 2019

If the control has side effects that cannot easily be isolated from candidates, then it can be useful to run the candidates before the control. It is easier to write new controls that do not have such side-effects.

This still respects the behaviour of randomize, the candidates will still be randomized and the control executed last if candidates_first is true.

Note there is a bonus commit to remove a rogue comma in one of the test's expected repr strings that was failing tests locally. I'm not sure I understand why this would not fail on the CI…? Update: it looks like python 3.7 does not have the trailing repr comma, so I have forced pushed without this fix so that it can be fixed separately and more appropriately to work across python versions.

Please let me know if you would like me to make any changes.

9thbit added 2 commits June 26, 2019 14:46
If the control has side effects that cannot easily be isolated from candidates, then it can be useful to run the candidates before the control. It is more easy to write new controls that do not have such side-effects.
Regardless of whether randomize is enabled or not.
@9thbit 9thbit force-pushed the feature/candidates-first branch from 64fd7dc to 7fe81c3 Compare June 26, 2019 13:55
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