Doc: Running `invoke` as a library without `Program`

Open
#926 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
documentation

Research direction

No files or tests are named; start by locating Invoke's configuration-loading and Context entry points. Document library or notebook usage, context selection or composition, and how to avoid unnecessary Fabric or Docker dependencies, covering the configuration cases listed in the issue.

Written by the indexing model from the issue text.

Description

Should document how one can run invoke not as a CLI program, for example to be run in a Jupyter notebook.

What I've found missing is:

  • How to load configurations (as default invoke.yaml or overwritten prefixed my_module.yaml) using invoke search logic
  • How to create a Context object, more specifically, so that it is compatible with other libraries that derive from it. E.g. Let's say we have two libraries: fabric defining ssh compatible context and another docker one.
    • We can have a logic select one context or the other based on values in invoke.yaml or a the config of the project, but then we would have to build one for each context
    • How could we combine contexts to have a docker-ssh, dynamically from the configuration or statically defining it manually
    • How to make the library by context independent so that the user can specify either fabric's ssh or the docker context without those becoming dependencies
Dominant language
Python
Stars
4.8k
Forks
412
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pyinvoke/invoke

All issues in pyinvoke/invoke

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.