Skip to content

Commit 6a8ee3c

Browse files
authored
Merge pull request #172 from afeld/pip
switch from conda/mamba to pip
2 parents 14b137b + d309a88 commit 6a8ee3c

40 files changed

+124
-169
lines changed

.github/actions/setup/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ name: Set up build environment
44
runs:
55
using: composite
66
steps:
7-
- name: Install Conda packages
8-
uses: mamba-org/setup-micromamba@v2
7+
- name: Set up Python
8+
uses: actions/setup-python@v5
99
with:
10-
environment-file: extras/environment.yml
11-
init-shell: bash
12-
cache-downloads: true
13-
cache-environment: true
10+
cache: pip
11+
- run: pip install -r requirements.txt
12+
# https://stackoverflow.com/a/71042698/358804
13+
shell: bash

.github/workflows/notebooks.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ jobs:
3131
- brackets.ipynb
3232
- curve.ipynb
3333
- extras/pandas_crash_course.ipynb
34-
# https://github.com/mamba-org/setup-micromamba?tab=readme-ov-file#about-login-shells
35-
defaults:
36-
run:
37-
shell: bash -leo pipefail {0}
3834
steps:
3935
- uses: actions/checkout@v5
4036
- uses: ./.github/actions/setup

.github/workflows/publish.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ jobs:
1313
school:
1414
- columbia
1515
- nyu
16-
# https://github.com/mamba-org/setup-micromamba?tab=readme-ov-file#about-login-shells
17-
defaults:
18-
run:
19-
shell: bash -leo pipefail {0}
2016
steps:
2117
- uses: actions/checkout@v5
2218
with:

.github/workflows/tests.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,11 @@ jobs:
1111
- name: Run ShellCheck
1212
uses: ludeeus/action-shellcheck@master
1313

14-
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
15-
1614
pytest:
1715
runs-on: ubuntu-latest
18-
# https://github.com/mamba-org/setup-micromamba?tab=readme-ov-file#about-login-shells
19-
defaults:
20-
run:
21-
shell: bash -leo pipefail {0}
2216
steps:
2317
- uses: actions/checkout@v5
18+
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
2419
- uses: ./.github/actions/setup
2520
- name: Run tests
2621
run: make test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ __pycache__/
22
_build/
33
.ipynb_checkpoints/
44
.nbgrader.log
5+
.venv/
56
*.csv
67
*.slides.html
78
* threads.json

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12.12

.readthedocs.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html#id2
22
version: 2
33

4+
python:
5+
install:
6+
- requirements: requirements.txt
7+
48
build:
59
os: ubuntu-lts-latest
6-
tools:
7-
python: mambaforge-latest
810
jobs:
911
# https://jupyterbook.org/en/stable/publish/readthedocs.html
1012
pre_build:
@@ -15,6 +17,3 @@ build:
1517
sphinx:
1618
# https://about.readthedocs.com/blog/2024/12/deprecate-config-files-without-sphinx-or-mkdocs-config/
1719
configuration: conf.py
18-
19-
conda:
20-
environment: extras/docs/environment.yml

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"editor.defaultFormatter": "charliermarsh.ruff"
1515
},
1616
"workbench.externalBrowser": "chrome",
17-
"python-envs.defaultEnvManager": "ms-python.python:conda",
18-
"python-envs.defaultPackageManager": "ms-python.python:conda",
17+
"python-envs.defaultEnvManager": "ms-python.python:venv",
18+
"python-envs.defaultPackageManager": "ms-python.python:pip",
1919
"python-envs.pythonProjects": []
2020
}

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,15 @@ format:
2525
site:
2626
jupyter-book build --all -W -n --keep-going .
2727

28+
setup:
29+
python -m venv .venv
30+
. .venv/bin/activate && \
31+
pip install -r requirements.txt
32+
2833
update_packages:
29-
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#updating-an-environment
30-
mamba env update --file extras/environment.yml --prune
34+
. .venv/bin/activate && \
35+
pip install --upgrade pip && \
36+
pip install --upgrade -r requirements.txt
3137

3238
./extras/scripts/update_lectures.sh
3339

brackets.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,9 +931,9 @@
931931
],
932932
"metadata": {
933933
"kernelspec": {
934-
"display_name": "Python [conda env:python-public-policy] *",
934+
"display_name": "Python 3 (ipykernel)",
935935
"language": "python",
936-
"name": "conda-env-python-public-policy-py"
936+
"name": "python3"
937937
},
938938
"language_info": {
939939
"codemirror_mode": {

0 commit comments

Comments
 (0)