Skip to content

Conversation

@MarcCote
Copy link
Member

@MarcCote MarcCote commented Feb 8, 2016

It's all in the title. :D

Maybe @ASalvail could you have a quick look at this one whenever you have time.
Edit: closes #89

@mgermain
Copy link
Member

This makes #89 Invalid.

@mgermain mgermain closed this Feb 15, 2016
@mgermain mgermain reopened this Feb 15, 2016
parser.add_argument('-g', '--gpusPerCommand', type=int, required=False, help='How many gpus a command needs.', default=1)
# parser.add_argument('-m', '--memPerCommand', type=float, required=False, help='How much memory a command needs (in Gb).')
parser.add_argument('-f', '--commandsFile', type=file, required=False, help='File containing commands to launch. Each command must be on a seperate line. (Replaces commandAndOptions)')
parser.add_argument('-f', '--commandsFile', type=str, required=False, help='File containing commands to launch. Each command must be on a seperate line. (Replaces commandAndOptions)')
Copy link
Member

Choose a reason for hiding this comment

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

Why change file to str ?

@ASalvail
Copy link
Member

Not familiar with the code base, but with the comments addressed, the changes look fine to me.

@@ -1,7 +1,7 @@
language: python
Copy link
Member

Choose a reason for hiding this comment

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

Wh should add unit test in python 3

Copy link
Member Author

Choose a reason for hiding this comment

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

Already done :-), check below.

@MarcCote MarcCote force-pushed the add_python3_support branch from 59c4d0c to cc98728 Compare April 9, 2016 20:21
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 96.047% when pulling cc98728 on MarcCote:add_python3_support into 845a840 on SMART-Lab:master.

@MarcCote
Copy link
Member Author

MarcCote commented Apr 9, 2016

Thank you @ASalvail for your comments.

@MarcCote
Copy link
Member Author

MarcCote commented Apr 9, 2016

@mgermain I added a unit test for the --commandsFile option. Make sure you check https://github.com/SMART-Lab/smartdispatch/pull/106/files#diff-f3e1285c65572b36c9b0f21b0734c260

end = int(groups[1])
step = 1 if groups[2] is None else int(groups[2])
return map(str, range(start, end, step))
return [str(i) for i in range(start, end, step)]
Copy link
Member

Choose a reason for hiding this comment

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

Were we really using map everywhere for no reasons ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes and no. In Python 3, map returns a generator instead of a list. What we want here is a list, so we are better off using list comprehension instead.

@MarcCote MarcCote force-pushed the add_python3_support branch from cc98728 to c85fb5f Compare April 10, 2016 19:14
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 95.331% when pulling c85fb5f on MarcCote:add_python3_support into 99859d2 on SMART-Lab:master.

@MarcCote MarcCote force-pushed the add_python3_support branch from c85fb5f to 6eb7f8e Compare April 12, 2016 22:15
@coveralls
Copy link

coveralls commented Apr 12, 2016

Coverage Status

Coverage decreased (-0.3%) to 95.756% when pulling 12cf403 on MarcCote:add_python3_support into abc32d2 on SMART-Lab:master.

@MarcCote
Copy link
Member Author

See PR #161

@MarcCote MarcCote closed this Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update shebang to python2

4 participants