Conversation
|
After an extremely quick glance this looks good, but I'll dive a little deeper tomorrow. |
edwardcwang
left a comment
There was a problem hiding this comment.
Generally looks good overall, thanks for the PR!
One thing I might note is that there's a lot going on here - if possible, perhaps it could be possible to refactor this into multiple smaller PRs that are easier to look at in isolation?
| for vt in vts: | ||
| for provided in lib.provides: | ||
| has_vt = has_vt or (provided.vt == vt) | ||
| if not(has_vt): |
There was a problem hiding this comment.
| if not(has_vt): | |
| if not has_vt: |
| # how many output lines to buffer in memory. "" for unlimited | ||
| max_output_lines: null | ||
| # how many error lines to buffer in memory. "" for unlimited | ||
| max_error_lines: null |
There was a problem hiding this comment.
This is meant to be a suggestion for all 4 lines but I think GitHub doesn't know how to do it for all 4 lines...
| # how many output lines to buffer in memory. "" for unlimited | |
| max_output_lines: null | |
| # how many error lines to buffer in memory. "" for unlimited | |
| max_error_lines: null | |
| # How many output lines to buffer in memory. | |
| # If unset, buffer unlimited lines. | |
| # type: Optional[int] | |
| max_output_lines: null | |
| # How many error lines to buffer in memory. | |
| # If unset, buffer unlimited lines. | |
| # type: Optional[int] | |
| max_error_lines: null |
| """, is_yaml=True) | ||
| db.update_core([base, meta]) | ||
| self.assertEqual(db.get_setting("lazy.numbers"), ["1", "2", "3"]) | ||
| self.assertEqual(db.get_setting("lazy.numbers2"), [1,2,3]) |
There was a problem hiding this comment.
| self.assertEqual(db.get_setting("lazy.numbers2"), [1,2,3]) | |
| self.assertEqual(db.get_setting("lazy.numbers2"), [1, 2, 3]) |
| """Substitute ${...}""" | ||
|
|
||
| # this check allows a reference like "${foo}" to just be replaced | ||
| # instead of using regexes. therefore substituting int/bool/null works |
There was a problem hiding this comment.
How does this differ from crossref?
If "abc ${foo}" is trysubsted, how does it work if foo is an int or bool?
There was a problem hiding this comment.
it breaks. i found no good alternative there.
but the common case is when a key refers to "${foo}", I want this to work regardless of what the type of the setting it.
the only difference between trysubst and subst, is in the subst_target() function:
the trysubst will simply return no targets if it detects a non str/List[str] setting value, which is what I want. I left the default behaviour of subst alone.
I would prefer to just have subst, and change the behavior to allow non-string setting values instead of raising an exception.
| @@ -0,0 +1 @@ | |||
| submit_command.sh | |||
There was a problem hiding this comment.
Not sure as to why this is here...?
There was a problem hiding this comment.
the HammerSubmitCommand will always drop a self-contained command script and a log file in the run-directory. In haste, i just hard-coded the command script to submit_command.sh. when i run tests, that file got dropped in the hammer work-tree.
if we ever want to run multiple hammerSubmitCOmmands in the same working-directory, this will have to be fixed (i'm assuming it will)
Co-Authored-By: edwardcwang <edwardcwang@users.noreply.github.com>
Co-Authored-By: edwardcwang <edwardcwang@users.noreply.github.com>
Co-Authored-By: edwardcwang <edwardcwang@users.noreply.github.com>
Co-Authored-By: edwardcwang <edwardcwang@users.noreply.github.com>
Co-Authored-By: edwardcwang <edwardcwang@users.noreply.github.com>
other noteworthy changes include:
other minor changes include: