Skip to content

Commit 223d20f

Browse files
fix: use venv+pip install in pandas course setup
`uv sync` fails in a standalone course folder (no pyproject.toml) and, in a full clone, syncs the root project without the `dev` extra, so pandas is never installed. Both data-analysis courses (EN+ZH docs and the verify.py missing-dependency hint) now create a course-local virtual environment and install requirements.txt with pip or uv pip. Manifest regenerated for the changed course files. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 6bdd7e1 commit 223d20f

7 files changed

Lines changed: 31 additions & 20 deletions

File tree

‎content-manifest.json‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -610,15 +610,15 @@
610610
"lang": "en-US",
611611
"path": "courses/da-eda/COURSE.md",
612612
"title": "Exploratory Data Analysis with an Agent",
613-
"summary": "A challenge course — point your agent at a messy shop export and produce a verified EDA summary (results.json) whose numbers are checked against ground truth. First non-stdlib course in the catalog; pandas is managed with uv.",
614-
"sha256": "e50b0ca1ec8d3dcccfeb8a9597a31bf3a9b351a869be95c72495a9861ee0b224"
613+
"summary": "A challenge course — point your agent at a messy shop export and produce a verified EDA summary (results.json) whose numbers are checked against ground truth. First non-stdlib course in the catalog; pandas is pinned in requirements.txt.",
614+
"sha256": "412cd414e1ecafa7827772f1c4355c1d2be4e7f5da7cd52700bb88c5c782fa56"
615615
},
616616
{
617617
"lang": "zh-CN",
618618
"path": "courses/da-eda/COURSE_cn.md",
619619
"title": "用 Agent 做探索性数据分析",
620-
"summary": "挑战式课程——让你的 Agent 处理一份脏的商店导出数据,产出一份经过真值校验的 EDA 摘要(results.json)。目录中第一门非标准库课程;pandas 由 uv 管理。",
621-
"sha256": "83b2a03bbb124d95b81e3d537b8a6a89b0b7be4600e43e3585dbbc5b07af18c1"
620+
"summary": "挑战式课程——让你的 Agent 处理一份脏的商店导出数据,产出一份经过真值校验的 EDA 摘要(results.json)。目录中第一门非标准库课程;pandas 版本固定在 requirements.txt。",
621+
"sha256": "509913a62ecc46d0972b7572578f3f716c5cc98155734b19d4cb077c218780ac"
622622
}
623623
]
624624
},
@@ -887,14 +887,14 @@
887887
"path": "courses/da-visualization/COURSE.md",
888888
"title": "Data Visualization with an Agent",
889889
"summary": "Challenge course — turn a clean sales dataset into three spec'd charts plus a summary.json whose numbers are verified against the data. Charts must be generated from data, never hardcoded.",
890-
"sha256": "fe7a7d00197b676cff35f62b1f098b39501c529b8dff93f034f716e623cd467b"
890+
"sha256": "fd71dfd018467977e3430e61d290dfaf23ca888177af62bf4d81ac80a51da909"
891891
},
892892
{
893893
"lang": "zh-CN",
894894
"path": "courses/da-visualization/COURSE_cn.md",
895895
"title": "用 Agent 做数据可视化",
896896
"summary": "挑战课程——把干净的销售数据变成三张有规格的图和一份 summary.json,其中数字会与数据集校验。图必须由数据生成,不许硬编码。",
897-
"sha256": "d4e4447b9f31c9c31936b94cc0985e9f37e36090da3c562dd6450dbf1147c7f8"
897+
"sha256": "c67db40a964dbca98e46d61d6dbe5fb9bd4aa557bb49d9bb4af24e509e1281f5"
898898
}
899899
]
900900
},

‎courses/da-eda/COURSE.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: course-da-eda
33
type: course
44
title: Exploratory Data Analysis with an Agent
5-
summary: A challenge course — point your agent at a messy shop export and produce a verified EDA summary (results.json) whose numbers are checked against ground truth. First non-stdlib course in the catalog; pandas is managed with uv.
5+
summary: A challenge course — point your agent at a messy shop export and produce a verified EDA summary (results.json) whose numbers are checked against ground truth. First non-stdlib course in the catalog; pandas is pinned in requirements.txt.
66
lang: en-US
77
content_version: 1
88
status: reviewed
@@ -37,7 +37,9 @@ This is the first course in the catalog that leaves the standard library:
3737

3838
```bash
3939
cd courses/da-eda
40-
uv sync # or: pip install -r requirements.txt
40+
python -m venv .venv # or: uv venv
41+
source .venv/bin/activate # Windows: .venv\Scripts\activate
42+
pip install -r requirements.txt # or: uv pip install -r requirements.txt
4143
```
4244

4345
`verify.py` checks for pandas and prints this hint if it is missing.

‎courses/da-eda/COURSE_cn.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: course-da-eda
33
type: course
44
title: 用 Agent 做探索性数据分析
5-
summary: 挑战式课程——让你的 Agent 处理一份脏的商店导出数据,产出一份经过真值校验的 EDA 摘要(results.json)。目录中第一门非标准库课程;pandas 由 uv 管理。
5+
summary: 挑战式课程——让你的 Agent 处理一份脏的商店导出数据,产出一份经过真值校验的 EDA 摘要(results.json)。目录中第一门非标准库课程;pandas 版本固定在 requirements.txt。
66
lang: zh-CN
77
content_version: 1
88
status: reviewed
@@ -35,7 +35,9 @@ course_id: course-da-eda
3535

3636
```bash
3737
cd courses/da-eda
38-
uv sync # 或:pip install -r requirements.txt
38+
python -m venv .venv # 或:uv venv
39+
source .venv/bin/activate # Windows:.venv\Scripts\activate
40+
pip install -r requirements.txt # 或:uv pip install -r requirements.txt
3941
```
4042

4143
`verify.py` 会检查 pandas,缺失时打印这条提示。

‎courses/da-eda/verify.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
that the failing tests are the intended ones. ``progress`` prints the
88
checkpoint claim codes for recording on flypython.com.
99
10-
Dependencies (pandas) are managed with uv — run ``uv sync`` (or
11-
``pip install -r requirements.txt``) inside this folder first.
10+
Dependencies (pandas) are pinned in requirements.txt — install them into a
11+
virtual environment inside this folder first (``python -m venv .venv``,
12+
activate it, then ``pip install -r requirements.txt``).
1213
"""
1314

1415
from __future__ import annotations
@@ -71,8 +72,9 @@ def _deps_available():
7172

7273
def _deps_hint():
7374
print(
74-
"pandas is not installed. Run `uv sync` (or "
75-
"`pip install -r requirements.txt`) inside this course folder first.",
75+
"pandas is not installed. In this course folder, create and activate "
76+
"a virtual environment, then run `pip install -r requirements.txt` "
77+
"(or `uv pip install -r requirements.txt`).",
7678
file=sys.stderr,
7779
)
7880

‎courses/da-visualization/COURSE.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ A matplotlib script that produces `out/revenue_by_region.png`,
3333

3434
```bash
3535
cd courses/da-visualization
36-
uv sync # pandas + matplotlib (or: pip install -r requirements.txt)
36+
python -m venv .venv # or: uv venv
37+
source .venv/bin/activate # Windows: .venv\Scripts\activate
38+
pip install -r requirements.txt # pandas + matplotlib (or: uv pip install -r requirements.txt)
3739
```
3840

3941
## Challenges (checkpoints)

‎courses/da-visualization/COURSE_cn.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ course_id: course-da-visualization
3232

3333
```bash
3434
cd courses/da-visualization
35-
uv sync # pandas + matplotlib(或 pip install -r requirements.txt)
35+
python -m venv .venv # 或:uv venv
36+
source .venv/bin/activate # Windows:.venv\Scripts\activate
37+
pip install -r requirements.txt # pandas + matplotlib(或 uv pip install -r requirements.txt)
3638
```
3739

3840
## 挑战(检查点)

‎courses/da-visualization/verify.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
44
Objective completion evidence for "Data visualization" (da-visualization).
55
``progress`` prints checkpoint claim codes for recording on flypython.com.
6-
Dependencies (pandas, matplotlib) managed with uv — run ``uv sync`` inside
7-
this folder first.
6+
Dependencies (pandas, matplotlib) are pinned in requirements.txt — install
7+
them into a virtual environment inside this folder first.
88
"""
99

1010
from __future__ import annotations
@@ -60,8 +60,9 @@ def _deps_available():
6060

6161
def _deps_hint():
6262
print(
63-
"pandas/matplotlib not installed. Run `uv sync` (or "
64-
"`pip install -r requirements.txt`) inside this course folder first.",
63+
"pandas/matplotlib not installed. In this course folder, create and "
64+
"activate a virtual environment, then run `pip install -r "
65+
"requirements.txt` (or `uv pip install -r requirements.txt`).",
6566
file=sys.stderr,
6667
)
6768

0 commit comments

Comments
 (0)