Skip to content

Commit fe779b3

Browse files
Dev container (#36)
* Create .python-version * Create .gitignore * Create Makefile * remove Dockerfile * remove docker workflow * startup.sh * devcontainer * README with link * Update Makefile * obsolete python-version * Update README.md * Update README.md * Update README.md * Update devcontainer.json no browser option for devContainer * introducing a first test * introducing a first test * introducing a manual release job * introducing a manual release job * Update README.md --------- Co-authored-by: Jonathan Taylor <[email protected]>
1 parent a42e928 commit fe779b3

File tree

9 files changed

+58
-67
lines changed

9 files changed

+58
-67
lines changed

.devcontainer/devcontainer.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "Jupyter Environment",
3+
"image": "mcr.microsoft.com/devcontainers/python:3",
4+
"features": {
5+
"ghcr.io/devcontainers/features/python:1": {}
6+
},
7+
"customizations": {
8+
"vscode": {
9+
"extensions": [
10+
"ms-python.python",
11+
"ms-toolsai.jupyter",
12+
"ms-toolsai.jupyter-keymap",
13+
"ms-toolsai.jupyter-renderers",
14+
"ms-toolsai.vscode-jupyter-cell-tags",
15+
"ms-toolsai.vscode-jupyter-slideshow"
16+
]
17+
}
18+
},
19+
"onCreateCommand": ".devcontainer/startup.sh",
20+
"forwardPorts": [8888],
21+
"postStartCommand": "uv run jupyter lab --no-browser --ip=0.0.0.0 --port=8888 --NotebookApp.token='' --NotebookApp.password=''"
22+
}

.devcontainer/startup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
curl -LsSf https://astral.sh/uv/install.sh | sh
3+
uv venv --python 3.12
4+
uv pip install --no-cache-dir jupyterlab
5+
uv pip install --no-cache-dir -r requirements.txt

.docker/Dockerfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

.dockerignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/docker.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Bump version and publish
2+
3+
on:
4+
#push:
5+
workflow_dispatch
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
tagging:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
new_tag: ${{ steps.tag_step.outputs.new_tag }}
15+
16+
steps:
17+
- name: Generate Tag
18+
id: tag_step
19+
uses: tschm/cradle/actions/[email protected]
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ jobs:
3737
with:
3838
version: "0.5.15"
3939

40-
41-
#- name: Set up Python
42-
# shell: bash
43-
# run: |
44-
# uv python install ${{ matrix.python-version }}
40+
- name: Set up Python
41+
shell: bash
42+
run: |
43+
uv python install ${{ matrix.python-version }}
4544
4645
- name: Create venv
4746
shell: bash

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ share/python-wheels/
4949
# IDEs
5050
.vscode/
5151
.idea/
52+

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# ISLP_labs
2+
3+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/intro-stat-learning/ISLP_Labs)
4+
25
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
36
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)
47
<!-- ALL-CONTRIBUTORS-BADGE:END -->
@@ -10,8 +13,6 @@
1013
- Robert Tibshirani
1114

1215
- Daniela Witten
13-
14-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/intro-stat-learning/ISLP_labs/v2.2)
1516

1617
### ISLP
1718

@@ -23,7 +24,7 @@ if necessary, which is not included as a requirement of the labs.
2324
### Up-to-date version of labs for ISLP.
2425

2526
This repo will track labs for ISLP as their source code changes. The
26-
intent is that building a conda environment with
27+
intent is that building a virtual environment with
2728
`requirements.txt` will reproduce the results in this repo.
2829

2930
To install the current version of the requirements run
@@ -32,7 +33,7 @@ To install the current version of the requirements run
3233
pip install -r https://raw.githubusercontent.com/intro-stat-learning/ISLP_labs/v2.2/requirements.txt;
3334
```
3435

35-
The labs can now be run from this directory:
36+
The labs can now be run via:
3637

3738
```
3839
jupyter lab Ch02-statlearn-lab.ipynb

0 commit comments

Comments
 (0)