Open fny opened 1 year ago
Nice add. I don't feel that the current collection implementation is a lot of work, but it is error-prone, especially when managing a bunch of tasks. It would be nice to have something like this, where fqdn = "fully qualified domain name" (maybe too cryptic):
@task(fqdn='docs.build') # nice-to-have equivalent to @task(collection='docs', name='build')
def do_build(c):
"Do build"
pass
and then a listing like:
inv --list
docs:
docs.build Do build
The current mechanism to create namespaces is a lot of work. I've hacked together an example tasks decorator dynamically creates namespaces as needed.
I'm also of the opinion that anything marked with
@task
in tasks.py should be added to the root collection by default.Here's a working example. I'd be more that happy to contribute this as a feature.