-
Notifications
You must be signed in to change notification settings - Fork 96
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
Unit tests for Examples #605
Unit tests for Examples #605
Conversation
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.
Looks good, I noticed you changed many of the example scripts to use parse_known_args
instead of parse_args
, is there any particular reason for this change?
@@ -90,7 +99,7 @@ def main_icecube_upgrade(backend: str) -> None: | |||
"detector", choices=["icecube-86", "icecube-upgrade"] | |||
) | |||
|
|||
args = parser.parse_args() | |||
args, unknown = parser.parse_known_args() |
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.
Any reason why you've changed to use parse_known_args
instead of parse_args
?
@@ -85,7 +95,7 @@ def load_data() -> None: | |||
""" | |||
) | |||
|
|||
args = parser.parse_args() | |||
args, unknown = parser.parse_known_args() |
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.
Same as before.
@@ -83,7 +93,7 @@ def main() -> None: | |||
""" | |||
) | |||
|
|||
args = parser.parse_args() | |||
args, unknown = parser.parse_known_args() |
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.
Same as before.
@@ -116,7 +126,7 @@ def main() -> None: | |||
""" | |||
) | |||
|
|||
args = parser.parse_args() | |||
args, unknown = parser.parse_known_args() |
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.
Same as before.
Thanks! Yes. Without it, the unit tests won't run. I found that when you run |
Unit tests for Examples
Adds unit tests for all examples except for
05_pisa
.This is now how unit tests are run.
IceTray-build:
Ubuntu-build:
MacOS:
I removed the example unit tests from the MacOS-build because it takes 30 minutes to complete.
Two examples turned out to be broken:
train_tito
andtrain_multiclassifier
. I fixed the multiclassification example and created an issue for the other. See #606.closes #594