From 867c9c02acafe7a0118b6ed7095055efe42fb359 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Thu, 19 Mar 2026 20:58:46 -0400 Subject: Setup taskipy2 fork from taskipy v1.14.1 --- docs/ADVANCED_FEATURES.md | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/ADVANCED_FEATURES.md b/docs/ADVANCED_FEATURES.md index fcae6fb..eb2640e 100644 --- a/docs/ADVANCED_FEATURES.md +++ b/docs/ADVANCED_FEATURES.md @@ -1,18 +1,29 @@ # Advanced Use Cases -This is a list of quality of life features that might be useful to you if you have a specific use case that you want to easily solve. -You can go over the use cases list and try to find the specific use case which you're trying to solve. If you cannot find your specific use case, feel free to open an issue or a PR! +This is a list of quality of life features that might be useful to you if you +have a specific use case that you want to easily solve. + +You can go over the use cases list and try to find the specific use case which +you're trying to solve. If you cannot find your specific use case, feel free to +open an issue or a PR! ## Use Cases -For each of the use cases below, click on the arrow in order to get to the relevant feature. + +For each of the use cases below, click on the arrow in order to get to the +relevant feature. 1. I want to load environment variables before every task ([⏩](#custom-runners)) 2. I want to run all tasks in a specific virtualenv ([⏩](#custom-runners)) 3. I want to run all tasks in a specific shell \ ssh ([⏩](#custom-runners)) ## Features + ### Custom Runners + #### Requirement -Under some circumstances, we would like to run all of our tasks in a consistent context; e.g., in a specific shell, a remote shell with `ssh`, some custom `virtualenv` wrapper, or even `dotenv`. + +Under some circumstances, we would like to run all of our tasks in a consistent +context; e.g., in a specific shell, a remote shell with `ssh`, some custom +`virtualenv` wrapper, or even `dotenv`. Currently, we can configure this on a task to task basis, e.g.: ```toml @@ -20,7 +31,8 @@ Currently, we can configure this on a task to task basis, e.g.: test = "dotenv run unittest ." ``` -But if we want all of our tasks to use the same runner (such as `dotenv` in the above example) we would have to manually write all of them as such: +But if we want all of our tasks to use the same runner (such as `dotenv` in the +above example) we would have to manually write all of them as such: ```toml [tool.taskipy.tasks] test = "dotenv run unittest ." @@ -32,12 +44,17 @@ start = "dotenv run python ." And so on. -Such cases are where we need a global wrapper, so we wouldn't have to repeat the prefix with every command. +Such cases are where we need a global wrapper, so we wouldn't have to repeat the +prefix with every command. #### Solution -The `tool.taskipy.settings.runner` option: when configured, adds the given runner command as a prefix to every task we run. -Let's take a look at the following example, where we want to load environment variables before every task: +The `tool.taskipy.settings.runner` option: when configured, adds the given +runner command as a prefix to every task we run. + +Let's take a look at the following example, where we want to load environment +variables before every task: + ```toml [tool.taskipy.settings] runner = "dotenv run" -- cgit v1.2.3