-
Notifications
You must be signed in to change notification settings - Fork 637
Dev container #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Dev container #36
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
accf998
Create .python-version
tschm f926a46
Create .gitignore
tschm cf677a8
Create Makefile
tschm b7cdf05
remove Dockerfile
tschm 9b22f65
remove docker workflow
tschm df186d9
startup.sh
tschm 9682903
devcontainer
tschm e7c2208
README with link
tschm 3cfa762
Update Makefile
tschm 61ac370
obsolete python-version
tschm bebc2b0
Merge branch 'RemoveDocker' into DevContainer
tschm 2f3f470
Merge branch 'towardsTesting' into DevContainer
tschm 0e18548
Update README.md
tschm a35c529
Update README.md
tschm 331f7f7
Update README.md
tschm a314e76
Update devcontainer.json
tschm 8d64a00
introducing a first test
tschm 18e9a52
introducing a first test
tschm ca146a9
introducing a manual release job
tschm 24ba589
introducing a manual release job
tschm 2f656ac
Merge branch 'main' into DevContainer
tschm e24632f
Merge branch 'main' into DevContainer
jonathan-taylor e529aaa
Update README.md
jonathan-taylor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "Jupyter Environment", | ||
"image": "mcr.microsoft.com/devcontainers/python:3", | ||
"features": { | ||
"ghcr.io/devcontainers/features/python:1": {} | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-toolsai.jupyter", | ||
"ms-toolsai.jupyter-keymap", | ||
"ms-toolsai.jupyter-renderers", | ||
"ms-toolsai.vscode-jupyter-cell-tags", | ||
"ms-toolsai.vscode-jupyter-slideshow" | ||
] | ||
} | ||
}, | ||
"onCreateCommand": ".devcontainer/startup.sh", | ||
"forwardPorts": [8888], | ||
"postStartCommand": "uv run jupyter lab --no-browser --ip=0.0.0.0 --port=8888 --NotebookApp.token='' --NotebookApp.password=''" | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
uv venv --python 3.12 | ||
uv pip install --no-cache-dir jupyterlab | ||
uv pip install --no-cache-dir -r requirements.txt |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Bump version and publish | ||
|
||
on: | ||
#push: | ||
workflow_dispatch | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
tagging: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
new_tag: ${{ steps.tag_step.outputs.new_tag }} | ||
|
||
steps: | ||
- name: Generate Tag | ||
id: tag_step | ||
uses: tschm/cradle/actions/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# testing all notebooks | ||
name: TEST | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.11', '3.12'] | ||
#notebook: [ Ch02-statlearn-lab.ipynb ]. # Ch02 is tricky but we have a solution for it | ||
notebook: [ Ch03-linreg-lab.ipynb ] | ||
# Ch04-classification-lab.ipynb, | ||
# Ch05-resample-lab.ipynb, | ||
# Ch06-varselect-lab.ipynb, | ||
# Ch07-nonlin-lab.ipynb, | ||
# Ch08-baggboost-lab.ipynb, | ||
# Ch09-svm-lab.ipynb, | ||
# Ch10-deeplearning-lab.ipynb, | ||
# Ch11-surv-lab.ipynb, | ||
# Ch12-unsup-lab.ipynb, | ||
# Ch13-multiple-lab.ipynb] | ||
#exclude: | ||
# - python-version: '3.11' | ||
# notebook: Ch10-deeplearning-lab.ipynb | ||
|
||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v5 | ||
#with: | ||
# version: "0.5.15" | ||
|
||
|
||
#- name: Set up Python | ||
# shell: bash | ||
# run: | | ||
# uv python install ${{ matrix.python-version }} | ||
|
||
- name: Create venv | ||
shell: bash | ||
run: uv venv --python ${{ matrix.python-version }} | ||
|
||
- name: Install requirements | ||
shell: bash | ||
run: | | ||
uv pip install --upgrade pip | ||
uv pip install -r requirements.txt | ||
uv pip install pytest nbmake | ||
|
||
- name: Test | ||
shell: bash | ||
run: | | ||
uv run pytest --nbmake --nbmake-timeout=3600 -vv ${{ matrix.notebook }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,4 @@ share/python-wheels/ | |
# IDEs | ||
.vscode/ | ||
.idea/ | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.DEFAULT_GOAL := help | ||
|
||
venv: | ||
@curl -LsSf https://astral.sh/uv/install.sh | sh | ||
@uv venv --python 3.12 | ||
|
||
|
||
.PHONY: install | ||
install: venv ## Install all dependencies (in the virtual environment) defined in requirements.txt | ||
@uv pip install --upgrade pip | ||
@uv pip install -r requirements.txt | ||
|
||
|
||
.PHONY: help | ||
help: ## Display this help screen | ||
@echo -e "\033[1mAvailable commands:\033[0m" | ||
@grep -E '^[a-z.A-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-18s\033[0m %s\n", $$1, $$2}' | sort | ||
|
||
|
||
.PHONY: jupyter | ||
jupyter: install ## Install and start jupyter Lab | ||
@uv run pip install jupyterlab | ||
@uv run jupyter lab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One worry about
make install
here is for Windows users who may not use CLI. The pip install can be run within a notebook as a magic where I don't know about the calls tomake
. Won't users have to have downloaded Apple's CLI tools for this?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't mean we can't have the
Makefile
of course, just perhaps the instructions for students shouldn't presumemake
. That's all.