Skip to content

Commit 98c52cf

Browse files
Update 3_project_structure.md
1 parent 0a5a6ca commit 98c52cf

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

episodes/3_project_structure.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,20 @@ greet_me/
182182

183183

184184
## Running a Task
185-
Add the following task to your `pyproject.toml` file:
185+
186+
A "task" is a command alias that you can execute easily via the CLI (e.g., pixi run <task-name>).
187+
188+
Run the following command to add a task and observe the changes in `pyproject.toml` file:
189+
```bash
190+
pixi task add start "python -c 'from greet_me import happy; print(happy.greet_happy())'"
191+
```
192+
193+
`pyproject.toml` file:
186194

187195
```toml
188196

189-
[tasks]
190-
start = "python -c 'from my_package import happy; print(happy.greet_happy())'"
197+
[tool.pixi.tasks]
198+
start = "python -c 'from greet_me import happy; print(happy.greet_happy())'"
191199
```
192200
Then execute:
193201
```bash
@@ -196,6 +204,9 @@ pixi run start
196204
```output
197205
Yay! happy day! 😀
198206
```
207+
208+
You can read more about tasks [here](https://pixi.sh/dev/workspace/advanced_tasks/), which contains all the advanced use cases needed in a professional setting.
209+
199210
::::::::::::::::::::::::::::::::::::: keypoints
200211
- Follow the appropriate folder structure.
201212
- Always include the `__init__.py` file in packages.

0 commit comments

Comments
 (0)