Configuration reference#
Task fields#
Field |
Type |
Description |
|---|---|---|
|
|
Command to execute. |
|
|
Named arguments with optional defaults. |
|
|
Tasks to run before this one. |
|
|
Working directory for the task. |
|
|
Environment variables to set. |
|
|
Human-readable description. |
|
|
Glob patterns for cache inputs. |
|
|
Glob patterns for cache outputs. |
|
|
Run with minimal environment variables. |
|
|
Conda environment to activate by default. |
|
|
Per-platform overrides (keys are platform strings). |
File formats#
conda-tasks reads from four file formats, checked in this order.
Reads the [tasks] and [target.*.tasks] tables from an existing pixi manifest.
[tasks]
build = "python -m build"
test = { cmd = "pytest", depends-on = ["build"] }
[target.win-64.tasks]
build = "python -m build --wheel"
The canonical conda-native TOML format. Same table structure as pixi.toml.
[tasks]
build = "python -m build"
test = { cmd = "pytest", depends-on = ["build"] }
[tasks.deploy]
cmd = "python -m build --wheel"
description = "Build and deploy"
inputs = ["src/**/*.py"]
outputs = ["dist/"]
env = { PYTHONPATH = "src" }
[target.win-64.tasks]
build = "python -m build --wheel"
Reads from [tool.conda.tasks] (preferred), falling back to
[tool.conda-tasks.tasks] (legacy) or [tool.pixi.tasks].
[tool.conda.tasks]
build = "python -m build"
[tool.conda.tasks.test]
cmd = "pytest"
depends-on = ["build"]
[tool.conda.target.win-64.tasks]
build = "python -m build --wheel"
Task definitions loaded through conda’s plugin settings API. Available globally across all projects. Settings from all condarc sources (user, system, environment) are merged automatically.
plugins:
conda_tasks:
tasks:
build:
cmd: "python -m build"
The setting is registered as conda_tasks (with conda-tasks accepted as an alias).
Argument definitions#
[tasks.test]
cmd = "pytest {{ path }} {{ flags }}"
args = [
{ arg = "path", default = "tests/" },
{ arg = "flags", default = "-v" },
]
Dependency definitions#
Simple list:
[tasks.check]
depends-on = ["compile", "lint"]
With arguments:
[tasks.check]
depends-on = [
{ task = "test", args = ["tests/unit/"] },
]
With environment:
[tasks.check]
depends-on = [
{ task = "test", environment = "py311" },
]