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

Support project_root/invoke/ in addition to project_root/tasks/ #291

Closed
nkantar opened this issue Dec 18, 2015 · 2 comments
Closed

Support project_root/invoke/ in addition to project_root/tasks/ #291

nkantar opened this issue Dec 18, 2015 · 2 comments
Labels

Comments

@nkantar
Copy link
Contributor

@nkantar nkantar commented Dec 18, 2015

Having project_root/tasks/ can be a bit ambiguous, especially for projects which already have other types of tasks. Supporting project_root/invoke/ β€” a la project_root/fabfile/ πŸ˜‰ β€” could be helpful for codebase sanity.

I'll take a stab at it when I have a bit of time if this enhancement is desired and the issue is still open at that point.

@bitprophet
Copy link
Member

@bitprophet bitprophet commented Dec 20, 2015

Check out http://docs.pyinvoke.org/en/0.11.1/concepts/loading.html#loading-collections - you can technically achieve this as-is by doing e.g. inv -c invoke ....

Assuming you meant the request to be adding it as a second/optional/fallback default (i.e. not requiring -c every single time) obvious options seem to be:

  • Ask one's users to add alias inv 'inv -c invoke' to their shell dotfiles... 😁
  • Distribute a local invoke-a-like using http://docs.pyinvoke.org/en/latest/concepts/library.html#reusing-invoke-as-a-distinct-binary (note: this isn't in a public release yet, but will soonish, it's in master) and tweak its arg-parsing bits so --collection has a parser-level default of invoke
    • right now that "default" is actually stored in Loader.DEFAULT_COLLECTION_NAME, IIRC so it's easier to override in other apps, but we can and probably should change that to be more at the Program level as most of those other apps will be needing to go that route regardless.
  • Insist that it deserves to be a true default fallback option, and submit a PR upgrading that Loader functionality so it walks down a list of potential names instead of assuming a single name.
    • TBH if we do do this, we should also move it into Program as mentioned above, unless there's reasons not to that I am forgetting.
@bitprophet bitprophet added the Feature label Dec 20, 2015
@bitprophet
Copy link
Member

@bitprophet bitprophet commented Jul 7, 2017

Never realized but this is a dupe of #310, rolling into that one!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.