Allow passing arguments to treewidth solver and use exit codes depending on test results#3
Open
jmeintrup wants to merge 2 commits intoholgerdell:masterfrom
Open
Allow passing arguments to treewidth solver and use exit codes depending on test results#3jmeintrup wants to merge 2 commits intoholgerdell:masterfrom
jmeintrup wants to merge 2 commits intoholgerdell:masterfrom
Conversation
Allow adding CLI arguments to the solver executable - Changes the API of the autotest-tw-solver to use '++full' instead of '--full' - Adds the option to add arguments to the solver executable with the '++' prefix - Adds exit codes according to level of failure: 1 for non-optimal but valid, 2 for invalid, 0 for all valid and all optimal. Other codes are used for internal failures.
holgerdell
requested changes
Mar 12, 2021
Owner
holgerdell
left a comment
There was a problem hiding this comment.
Thanks for the pull request! I have some questions about it before I accept it
| print("All tree decompositions were optimal") | ||
| else: | ||
| print("{:d} tree decompositions were not optimal".format(total_nonoptimal)) | ||
| if exit_code == 0: |
Owner
There was a problem hiding this comment.
why not exit directly without setting an exit_code variable?
| ) | ||
| parser.add_argument( | ||
| "--full", | ||
| "++full", |
Owner
There was a problem hiding this comment.
Is this somehow standard for testing frameworks?
| --full run test on all graphs with min-degree 3 and at most 8 vertices | ||
|
|
||
| ++full run test on all graphs with min-degree 3 and at most 8 vertices | ||
| ++ any number of arguments that get passed on to the treewidth solver |
Owner
There was a problem hiding this comment.
Is the interface now like this? ./autotest-tw-solver.py mysolver ++--twsolveroption1
Maybe a nicer interface would be: ./autotest-tw-solver.py [--full] <solver> [arguments for solver] so that solver arguments can be given as-is, without having to prepend ++.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow adding CLI arguments to the solver executable
0 for all valid and all optimal. Other codes are used for internal failures.