From 8f47569c696b69a25470067ecd7794706148e622 Mon Sep 17 00:00:00 2001 From: Pranav Chokda Date: Tue, 9 Jun 2026 22:55:39 -0400 Subject: [PATCH 1/2] fix readme file --- README.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ec85abc7..76ee12af 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,15 @@ This repository contains the lecture materials for Stanford's Language Modeling These are named `lecture_XX.py`. ### Setup - - uv sync - git clone https://github.com/percyliang/edtrace - +``` shell +uv sync +source .venv/bin/activate +``` You can compile a lecture by running: - python execute.py -m lecture_01 +``` shell +python -m edtrace.execute -m lecture_01.py +``` which generates a `var/traces/lecture_01.json` and caches any images as appropriate. @@ -22,14 +24,17 @@ To view it locally: Load a local server to view at `http://localhost:5173?trace=var/traces/sample.json`: - npm run --prefix=edtrace/frontend dev +``` shell +npm run --prefix=edtrace/frontend dev +``` Deploy to the main website: - - npm run --prefix=edtrace/frontend build - git add assets - git ci -am "" - git push +``` shell +npm run --prefix=edtrace/frontend build +git add assets +git ci -am "" +git push +``` ## Non-executable lectures From a78f43af3670ba771bbd3dbb60ab0fd4613c087b Mon Sep 17 00:00:00 2001 From: Pranav Chokda Date: Tue, 9 Jun 2026 23:23:38 -0400 Subject: [PATCH 2/2] fix vite version and readme --- README.md | 19 ++++++++++++++++++- package.json | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 76ee12af..05e10348 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,23 @@ python -m edtrace.execute -m lecture_01.py which generates a `var/traces/lecture_01.json` and caches any images as appropriate. -To view it locally: +## To view it locally: + +> [!NOTE] +> The next step assumes you already have Node installed on your the system + +``` shell +# first clone the edtrace repo +git clone https://github.com/percyliang/edtrace + +# install the dependencies for edtrace +npm install --prefix=edtrace/frontend +``` +if you see warnings for vulnerabilities, please run + +``` shell +npm audit fix +``` Load a local server to view at `http://localhost:5173?trace=var/traces/sample.json`: @@ -30,6 +46,7 @@ npm run --prefix=edtrace/frontend dev Deploy to the main website: ``` shell +git clone https://github.com/percyliang/edtrace npm run --prefix=edtrace/frontend build git add assets git ci -am "" diff --git a/package.json b/package.json index 0509904b..905968fd 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "devDependencies": { - "vite": "^8.0.3" + "vite": "^8.0.16" } }