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

Run sessions in the same order specified on the command line. #152

Merged
merged 1 commit into from
Oct 17, 2018

Conversation

theacodes
Copy link
Collaborator

Closes #150

if (x.name in specified_sessions or set(x.signatures) & specified_sessions)
]
queue = []
for session_name in specified_sessions:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't you still want a set() for specified_sessions?

You could instead do an "ordered set":

>>> import collections
>>> specified_sessions = ["a", "c", "a", "c", "a", "b"]
>>> o_set = collections.OrderedDict((val, i) for i, val in enumerate(specified_sessions))
>>> list(o_set.keys())
['a', 'c', 'b']
>>> "d" in o_set
False
>>> "a" in o_set
True

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Eh, I'm not overly concerned. If someone really wants to specify a session twice we'll run it twice.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ha OK.

@theacodes theacodes merged commit 391ad00 into master Oct 17, 2018
@theacodes theacodes deleted the preserve-specification-order branch October 17, 2018 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants