Skip to content
Open
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
24 changes: 24 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ jobs:
- name: Install Playwright browser
run: uv run playwright install chromium --with-deps

# ── Build Pyodide wheel ───────────────────────────────────────────────
# Produces docs/_static/wheels/anyplotlib-0.0.0-py3-none-any.whl so the
# in-browser Pyodide bridge can install the exact source tree that built
# these docs — no PyPI release required.
- name: Build Pyodide wheel
run: |
mkdir -p docs/_static/wheels
uv build --wheel --out-dir docs/_static/wheels/
# Rename to the stable sentinel name micropip expects for URL installs.
cd docs/_static/wheels
for f in anyplotlib-*.whl; do
[ "$f" != "anyplotlib-0.0.0-py3-none-any.whl" ] && mv "$f" anyplotlib-0.0.0-py3-none-any.whl
done

# ── Sphinx build ─────────────────────────────────────────────────────
# -W turns warnings into errors; --keep-going collects all of them.
- name: Build HTML documentation
Expand Down Expand Up @@ -110,6 +124,16 @@ jobs:
echo "dest_dir=dev" >> "$GITHUB_OUTPUT"
fi

# ── Build Pyodide wheel ───────────────────────────────────────────────
- name: Build Pyodide wheel
run: |
mkdir -p docs/_static/wheels
uv build --wheel --out-dir docs/_static/wheels/
cd docs/_static/wheels
for f in anyplotlib-*.whl; do
[ "$f" != "anyplotlib-0.0.0-py3-none-any.whl" ] && mv "$f" anyplotlib-0.0.0-py3-none-any.whl
done

# ── Sphinx build ─────────────────────────────────────────────────────
- name: Build HTML documentation
env:
Expand Down
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Python bytecode / caches
__pycache__/
*.py[cod]
*$py.class
*.pyo

# Distribution / packaging
dist/
build/
*.egg-info/
*.egg
.eggs/

# Virtual environments
.venv/
venv/
env/

# Test / coverage artefacts
.pytest_cache/
.coverage
coverage.xml
htmlcov/

# Jupyter notebooks checkpoints
.ipynb_checkpoints/

# Sphinx build output
docs/_build/
build/html/
build/doctrees/

# Generated Pyodide wheel (built by workflow / make html — never commit)
docs/_static/wheels/

# Editor / IDE
.idea/
.vscode/
*.swp
*.swo

# macOS
.DS_Store


5 changes: 1 addition & 4 deletions Examples/Interactive/plot_interactive_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,4 @@ def _roi_released(event):
v_fft.set_data(log_mag, x_axis=freq_x, y_axis=freq_y, units="1/\u00c5")


fig



fig # Interactive
5 changes: 4 additions & 1 deletion Examples/Interactive/plot_interactive_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
and the sum curve will jump to the optimal fit.
Click a component line again to hide its widgets.
"""
# Packages required when running interactively in Pyodide (docs live mode).
_PYODIDE_PACKAGES = ["scipy"]

import numpy as np
from scipy.optimize import curve_fit
import anyplotlib as apl
Expand Down Expand Up @@ -289,4 +292,4 @@ def _on_fit(event):
def _clicked(event, c=comp):
c.toggle()

fig
fig # Interactive
3 changes: 1 addition & 2 deletions Examples/Interactive/plot_key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,4 @@ def log_key(event):
print(f"[on_key] key={event.key!r} img={pos}"
f" last_widget={event.last_widget_id!r}")

fig

fig # Interactive
2 changes: 1 addition & 1 deletion Examples/Interactive/plot_point_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,5 @@ def _settled(event):
_draw_tangent(event.x)


fig
fig # Interactive

2 changes: 1 addition & 1 deletion Examples/Interactive/plot_segment_by_contrast.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,6 @@ def _delete_nearest(event):
_refresh()


fig
fig # Interactive


74 changes: 0 additions & 74 deletions Examples/plot_3d.py

This file was deleted.

Loading
Loading