From 7102e3ddd5c638a9b71e3952619a62ed0fb80333 Mon Sep 17 00:00:00 2001 From: Fin Griffin Date: Tue, 30 Sep 2025 16:41:59 +0100 Subject: [PATCH 1/4] feat(devcontainer): add devcontainer --- .devcontainer/README.md | 30 +++++++++++++++++++ .devcontainer/devcontainer.json | 53 +++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 .devcontainer/README.md create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 000000000..825539227 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,30 @@ +# Dev Container Configuration + +This directory contains the development container configuration for the Hands-on LLMs workshop. + +## What gets installed + +When a user opens this repository in GitHub Codespaces, the following will be automatically set up: + +### Base Environment +- Python 3.11 (Debian Bullseye) +- Git and GitHub CLI + +### VS Code Extensions +- Python development: Python, Pylance, Black formatter, Ruff linter +- Jupyter notebooks: Full Jupyter support with renderers and keybindings +- General development: JSON, YAML, and Markdown support + +### Port Forwarding +- **Port 8501**: Streamlit applications +- **Port 8888**: Jupyter notebook server + +## Usage + +Users simply need to: +1. Fork this repository +2. Open in GitHub Codespaces +3. Wait for the automatic setup to complete +4. Start working with the workshop materials + +The environment will be ready to use with all dependencies installed and VS Code properly configured for Python and Jupyter development. \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..8171c2374 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,53 @@ +{ + "name": "Packaging and Publishing Workshop", + "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", + + "features": { + "ghcr.io/devcontainers/features/git:1": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance", + "ms-toolsai.jupyter", + "ms-toolsai.jupyter-keymap", + "ms-toolsai.jupyter-renderers", + "ms-python.black-formatter", + "charliermarsh.ruff", + "ms-vscode.vscode-json", + "redhat.vscode-yaml", + "ms-vscode.vscode-markdown" + ], + "settings": { + "python.defaultInterpreterPath": "/usr/local/bin/python", + "python.linting.enabled": true, + "python.linting.pylintEnabled": false, + "python.linting.flake8Enabled": false, + "python.formatting.provider": "black", + "jupyter.askForKernelRestart": false, + "files.associations": { + "*.ipynb": "jupyter-notebook" + } + } + } + }, + + "remoteUser": "vscode", + + "forwardPorts": [8501, 8888], + + "portsAttributes": { + "8501": { + "label": "Streamlit", + "onAutoForward": "notify" + + }, + "8888": { + "label": "Jupyter", + "onAutoForward": "notify" + } + } +} \ No newline at end of file From c4cd4b35592eac5b7fe9407470a182de2984ecb0 Mon Sep 17 00:00:00 2001 From: Fin Griffin Date: Tue, 30 Sep 2025 16:48:38 +0100 Subject: [PATCH 2/4] chore: add .gitignore --- .gitignore | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..df6d39dc5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,153 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +.DS_Store + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# CMake +CMakeFiles/ +CMakeCache.txt +CMakeScripts/ +CTestTestfile.cmake +cmake_install.cmake +compile_commands.json +Makefile +Testing/ + +# UV +# According to https://python-poetry.org/docs/glossary/#lock-file +# it is recommended to include poetry.lock in version control. +#poetry.lock + +# Pylance +.ipynb_checkpoints/ + +# PyCharm project files +# These files are machine specific and not useful to developers on VS Code or other editors +.idea/ \ No newline at end of file From 65b75add0fa67f09812bd31fa05b9731d3a9a79d Mon Sep 17 00:00:00 2001 From: Fin Griffin Date: Wed, 1 Oct 2025 16:09:25 +0100 Subject: [PATCH 3/4] Revert "chore: add .gitignore" This reverts commit c4cd4b35592eac5b7fe9407470a182de2984ecb0. --- .gitignore | 153 ----------------------------------------------------- 1 file changed, 153 deletions(-) delete mode 100644 .gitignore diff --git a/.gitignore b/.gitignore deleted file mode 100644 index df6d39dc5..000000000 --- a/.gitignore +++ /dev/null @@ -1,153 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg -.DS_Store - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -.python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# CMake -CMakeFiles/ -CMakeCache.txt -CMakeScripts/ -CTestTestfile.cmake -cmake_install.cmake -compile_commands.json -Makefile -Testing/ - -# UV -# According to https://python-poetry.org/docs/glossary/#lock-file -# it is recommended to include poetry.lock in version control. -#poetry.lock - -# Pylance -.ipynb_checkpoints/ - -# PyCharm project files -# These files are machine specific and not useful to developers on VS Code or other editors -.idea/ \ No newline at end of file From 6f4d2fe20327876cfa356c663818815f11338f50 Mon Sep 17 00:00:00 2001 From: Fin Griffin Date: Wed, 1 Oct 2025 16:24:21 +0100 Subject: [PATCH 4/4] chore: add ipykernel to requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index b73d60a1e..097a5a3bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ pandas scikit-learn matplotlib numpy +ipykernel