Skip to content
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

Taskloader API Update #294

Closed
wants to merge 25 commits into from

Conversation

Projects
None yet
3 participants
@moltob
Copy link
Contributor

commented May 3, 2019

One way to implement #288 is the ability to access the dependency manager and all values stored by it from task related user-code, including during task generation. This PR is part 1 of that implementation and splits up the existing task, config = TaskLoader.load_tasks(...) API into two steps: configuration loading and actual task loading. This enables the dependency manager to be created before task generators are called. The follow up PR will then add the dependency manager access methods.

Some remarks, how this implementation differs from the last pseudo code in #288:

  • ModuleTaskLoader does not distinguish between dictionary and module in setup, but already in __init__. This prevents storing the additional attribute mod_dict in the instance, which also would be semantically redundant (and possibly a source of inconsistency).
@coveralls

This comment has been minimized.

Copy link

commented May 3, 2019

Coverage Status

Coverage increased (+0.008%) to 99.035% when pulling 2abf365 on moltob:feature/task-loader-2 into ce50ff2 on pydoit:master.

@moltob moltob force-pushed the moltob:feature/task-loader-2 branch from f875b3a to 63f92ec May 11, 2019

@moltob moltob closed this May 11, 2019

@moltob moltob reopened this May 11, 2019

@moltob moltob force-pushed the moltob:feature/task-loader-2 branch from 5d1660a to d6681dc May 11, 2019

@moltob moltob changed the title (WIP) Taskloader API Update Taskloader API Update May 11, 2019

@moltob

This comment has been minimized.

Copy link
Contributor Author

commented May 11, 2019

@schettino72 Tests have been written and docs are adapted as far as I was aware of. PR ready for review.

@schettino72
Copy link
Member

left a comment

Thanks, looks good. Just some minor notes.

Show resolved Hide resolved doc/samples/custom_loader.py
Show resolved Hide resolved doit/cmd_base.py Outdated
Show resolved Hide resolved doit/cmd_base.py Outdated
Show resolved Hide resolved doit/cmd_base.py Outdated
Show resolved Hide resolved doit/cmd_base.py Outdated
Show resolved Hide resolved doit/cmd_completion.py
Show resolved Hide resolved tests/test_cmd_base.py
Show resolved Hide resolved tests/test_cmd_base.py
Show resolved Hide resolved tests/test_cmd_strace.py
Show resolved Hide resolved doc/extending.rst

@moltob moltob changed the title Taskloader API Update (WIP) Taskloader API Update May 12, 2019

@moltob moltob changed the title (WIP) Taskloader API Update Taskloader API Update May 12, 2019

@moltob

This comment has been minimized.

Copy link
Contributor Author

commented May 12, 2019

@schettino72 Review comments incorporated, please pick up the review when you get a chance.

@schettino72

This comment has been minimized.

Copy link
Member

commented May 12, 2019

Thanks. squashed and merged.

I removed BaseTaskLoader, and duplicated the code.... I chose to do this way because I expect the duplicated code to be removed in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.