Details
- Reviewers
kparal tflink mkrizek jskladan - Commits
- rLTRN6ba0f19740fb: Argument --local added
run taskotron and try this argument
Diff Detail
- Repository
- rLTRN libtaskotron
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
| libtaskotron/runner.py | ||
|---|---|---|
| 205–206 | Why are these lines removed? D419 (mentioned in the description) has these lines, and even touches them. | |
| 206–208 | Please fix the lint code - the current consesus is that all LINT warnings must be resolved - restructuring the method call, so it fits into 99 chars is quite easy. Even if it's not "your code" you touched the line in the diff ;) | |
| libtaskotron/runner.py | ||
|---|---|---|
| 205–206 | At the moment, task executor and task initiator are distinguished by ['environment']['machine']. D419 changes it, so just the 'machine' key gets removed, but the ['environment']['rpm'] stays and it can be checked/installed locally. These lines can be removed since the local/remote decision is based on --local from command line. | |
| 206–208 | Okie Dokie | |
| libtaskotron/runner.py | ||
|---|---|---|
| 205–206 | whatevs, I don't really have deep understanding of this part of the code - just wanted to make sure it's not a mistake, especially since one of the deleted lines is changed in a diff, which IIUIC should be applied after this one. Sounds like you know what'cha doin' ;) | |
In principle, yes, I think we should do it like this. (Once we have the full T408 change in place, we will get rid of the environment-machine hack).
Adding mkrizek and tflink, if anyone has any concerns or suggestions.
Now, please update this diff with some unit tests. Thanks.
| libtaskotron/runner.py | ||
|---|---|---|
| 221–222 | Let's play nicely with the argument parser here and put the option before the argument (even though it is not strictly required with argparse). | |
| 266–270 | The second sentence might be unclear for people not familiar with the code. Do you think this sounds better? Make the task run on this particular machine, regardless of the default execution mode defined in the configuration file. This also approves any required system-wide changes to be performed (automatic installation of package dependencies, destructive tasks allowed, etc). | |
| testing/test_runner.py | ||
|---|---|---|
| 471 | You can put those monkeypatches into a setup method so you don't have to do it in each test method separately, like so: @pytest.mark.usefixtures('setup')
class Test():
@pytest.fixture
def setup(self, monkeypatch):
monkeypatch.setattr(...) | |
| 489 | I guess you can just use some random uuid instead of Dingus (the methods are monkeypatched anyway) if you're not going to do anything with it. | |
Look good in general. Can you please add docstrings for class+methods? This module has suffered from under-documentation for quite long (and I never remember what the damn task_data, arg_data, env_data and similar stuff are).
| libtaskotron/runner.py | ||
|---|---|---|
| 304 | Would it be more straightforward if we renamed this to Runner and the original Runner we renamed to LocalRunner? | |
| 323–326 | Please move this to a def run() method, it's much more readable that way. | |
| 402–403 | # run the task, locally or remotely | |
| testing/test_runner.py | ||
| 480–482 | It would be more fool-proof to count the number of calls on stub_local and stub_remote and assert that there was exactly one call for local stub and exactly zero calls for remote stub. Ditto for other tests. | |
Why are these lines removed? D419 (mentioned in the description) has these lines, and even touches them.