Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ RUN mamba env update -n base -f /tmp/environment.yml && \
echo "Installing CUDA-enabled PyTorch" && \
pip install --no-cache-dir --force-reinstall torch torchvision; \
fi && \
# Install ipytestsuite from TestPyPI (temporary, will use PyPI once published)
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ "ipytestsuite[ai]" && \
# Clean up all package caches to reduce image size
mamba clean --all -f -y && \
# Remove pip cache
Expand Down
6 changes: 1 addition & 5 deletions binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ channels:
- conda-forge
- pytorch
dependencies:
- python=3.10
- python=3.12
- pip
- pip:
- numpy
Expand All @@ -22,10 +22,6 @@ dependencies:
- scikit-learn
- attrs
- multiprocess
- openai
- tenacity
- markdown2
- python-dotenv
- pillow
- opencv-python
- torch
Expand Down
3 changes: 3 additions & 0 deletions binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ set -ex

mkdir -p ${HOME}/.ipython/profile_default
cp binder/ipython_config.py ${HOME}/.ipython/profile_default/

# Install ipytestsuite from TestPyPI (temporary, will use PyPI once published)
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ "ipytestsuite[ai]"
5 changes: 1 addition & 4 deletions docker/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: base
channels:
- conda-forge
dependencies:
- python=3.12
- pip
- pip:
- numpy
Expand All @@ -20,10 +21,6 @@ dependencies:
- scikit-learn
- attrs
- multiprocess
- openai
- tenacity
- markdown2
- python-dotenv
- pillow
- opencv-python
- albumentations
Expand Down
6 changes: 3 additions & 3 deletions magic_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"outputs": [],
"source": [
"%reload_ext tutorial.tests.testsuite"
"%reload_ext ipytestsuite"
]
},
{
Expand All @@ -19,7 +19,7 @@
},
"outputs": [],
"source": [
"%%ipytest\n",
"%%ipytest --path tutorial/tests\n",
"# or %%ipytest test_module_name\n",
"\n",
"def solution_power2(x: int) -> int:\n",
Expand Down Expand Up @@ -89,7 +89,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.12.11"
},
"vscode": {
"interpreter": {
Expand Down
17 changes: 11 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "python-tutorial"
version = "v2025.05"
description = "Jupyter-based Python programming tutorial"
requires-python = ">=3.10"
requires-python = ">=3.12"

[project.optional-dependencies]
dev = [
Expand All @@ -21,16 +21,13 @@ dev = [
"scikit-learn",
"attrs",
"multiprocess",
"openai",
"tenacity",
"markdown2",
"python-dotenv",
"pillow",
"opencv-python",
"albumentations",
"grad-cam",
"plotly",
"torch==2.7.0", # pinned to last stable version as of 2025-05-14
"torch>=2.0.0", # PyTorch 2.x series
"ipytestsuite[ai]>=0.1.0",
]

# pytest
Expand Down Expand Up @@ -93,3 +90,11 @@ indent-style = "space"
# Setuptools: suppress package discovery
[tool.setuptools]
packages = []

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
explicit = true

[tool.uv.sources]
ipytestsuite = { index = "testpypi" }
Loading