Collecting tasks¶
If you want to inspect your project and see a summary of all the tasks, you can use the
pytask collect command.
Let us take the following task.
--8 < --"docs_src/tutorials/collecting_tasks.py"
Now, running pytask collect will
produce the following output.
$ pytask
────────────────────────── Start pytask session ─────────────────────────
Platform: win32 -- Python 3.13.0, pytask 0.7.0, pluggy 1.3.0
Root: C:\Users\pytask-dev\git\my_project
Collected 1 task.
Collected tasks:
└── 🐍 <Module task_module.py>
└── 📝 <Function <span class="termynal-dim">task_module.py::</span>task_write_file>
─────────────────────────────────────────────────────────────────────────
If you want to have more information regarding the dependencies and products of the
task, append the
pytask collect --nodes flag.
$ pytask
────────────────────────── Start pytask session ─────────────────────────
Platform: win32 -- Python 3.13.0, pytask 0.7.0, pluggy 1.3.0
Root: C:\Users\pytask-dev\git\my_project
Collected 1 task.
Collected tasks:
└── 🐍 <Module task_module.py>
└── 📝 <Function <span class="termynal-dim">task_module.py::</span>task_write_file>
├── 📄 <Dependency my_project/in.txt>
└── 📄 <Product my_project/out.txt>
─────────────────────────────────────────────────────────────────────────
To restrict the set of tasks you are looking at, use markers, expressions and ignore patterns as usual.
Further reading¶
- Read the
command reference for
pytask collect. - Read the tutorial on selecting tasks.
- Paths can be ignored with
ignore.