-
Notifications
You must be signed in to change notification settings - Fork 4
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 -h --hardware option #201
add -h --hardware option #201
Conversation
import click | ||
|
||
_RUNTIME_FORMAT = "hh:mm:ss" | ||
|
||
# https://docs.cluster.ihme.washington.edu/#hpc-execution-host-hardware-specifications |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure of the best way to deal with the fact that the hardware changes. Alternatively we can not provide any constraints on what is passed in and leave it up to the user to "do their research"
hardware = value.split(",") if value else [] | ||
bad_requests = set(hardware) - set(_AVAILABLE_HARDWARE) | ||
if bad_requests: | ||
raise click.BadParameter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to your above GitHub comment, do you think it would be useful to provide the URL in the code comment in the error message? (I see that's in the help already)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good idea
Add -h/--hardware option to psimulate
Description
Changes and notes
There are many ways to implement this -C flag including a simple
comma-separated list as well as boolean strings. I opted to have the
user provide a comma-separated list (e.g.
psimulate --hardware r630,r650xs
)which then gets converted for the job template to
-C "r630|r650xs"
. I figuredmaybe one day we will want to get crazy with logic.
Testing
used
psimulate test
to confirm this is working.