pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.42k stars 370 forks source link

Static task/collection definition in `invoke.yaml` #927

Open LecrisUT opened 1 year ago

LecrisUT commented 1 year ago

Instead of searching through tasks.py which might be picked up from PATH, I think it would be better to move this/prioritize static definitions in invoke.yaml (also should search for .invoke.yaml) and equivalents at an object /tasks or /invoke. The configuration could be to point to file/module to load and search ns and @task from as currently done. Or better yet, point to the specific Collection object that defines these in a format equivalent to entry_points.console_scripts.

This will make it easy to define executables in non-installed python projects, e.g. jupyter notebooks.