Skip to content

Commit

Permalink
add p2 python (#22)
Browse files Browse the repository at this point in the history
* add python code

* remove cache

* Remove bash code from materials

* add python code

* remove cache

* Add cache, try to fix actions

* Add draft pixi code

* Start tidy-up of p2

* Add timetable

* Update pr workflow

* Remove yaml pkg from workflows

---------

Co-authored-by: robinlovelace <[email protected]>
  • Loading branch information
wangzhao0217 and Robinlovelace authored Oct 30, 2024
1 parent ecebfa8 commit e0dc891
Show file tree
Hide file tree
Showing 9 changed files with 382 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# GitHub syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
sudo apt-get update
sudo apt-get install python3
sudo apt-get install python3-pip
python3 -m pip install jupyter
python3 -m pip install jupyter jupyter-cache
- name: Build Quarto Project
run: quarto render
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
sudo apt-get update
sudo apt-get install python3
sudo apt-get install python3-pip
python3 -m pip install jupyter
python3 -m pip install jupyter jupyter-cache
- name: Render and Publish
uses: quarto-dev/quarto-actions/publish@v2
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ docs
_freeze/
*.csv
*.ics

# pixi environments
.pixi
*.egg-info
2 changes: 1 addition & 1 deletion p1/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ ve = get_stats19(year = 2019, type = "veh")
## Python

``` python
# Todo: start with installing stats19 Python package
# pip install stats19
import stats19
ac = stats19.get_stats19(year = 2019, type = "collision")
ca = stats19.get_stats19(year = 2019, type = "cas")
Expand Down
Loading

0 comments on commit e0dc891

Please sign in to comment.