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 <jonathan.taylor@stanford.edu>
This commit is contained in:
Thomas Schmelzer
2025-04-10 03:21:56 +04:00
committed by GitHub
parent ae63016edb
commit 9e5451796f
10 changed files with 137 additions and 62 deletions

View File

@@ -1,42 +0,0 @@
name: Publish Docker image
on:
workflow_dispatch:
push:
branches:
- stable
tags:
- v*
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: jetaylor74/islp_labs
tags: |
type=ref,event=branch
type=semver,pattern={{raw}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: .docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

21
.github/workflows/release.yml vendored Normal file
View File

@@ -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/tag@v0.1.57
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

60
.github/workflows/test.yml vendored Normal file
View File

@@ -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 }}