Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
32cd9fa
Windows flit note
zmoon Nov 29, 2024
4484672
Add anywidget to dev extra
zmoon Nov 29, 2024
450069a
Initial AnyWidget setup
zmoon Nov 29, 2024
935d00b
Initial rendered ABC display
zmoon Nov 29, 2024
e5d09d8
Update on change
zmoon Nov 29, 2024
55626ed
Some abcjs renderAbc option sliders
zmoon Nov 29, 2024
ff10528
Params can be set in init
zmoon Dec 1, 2024
e353932
todo
zmoon Dec 10, 2024
b009f3c
Only load once and show logo then
zmoon Mar 20, 2025
4e2d335
Expose the SVGs
zmoon Mar 20, 2025
a0e647d
Expose more display options
zmoon Mar 20, 2025
f8c8ac3
Split logo URL more
zmoon Mar 20, 2025
c4c7d59
fmt
zmoon Mar 21, 2025
afc6c65
Add optional deps
zmoon Mar 24, 2025
7c8b032
Make SVG with node (will add args)
zmoon Mar 24, 2025
a8964ab
Receive SVG str in Python
zmoon Mar 24, 2025
b735d73
Create function to render
zmoon Mar 24, 2025
9905fbf
Pass the ABC via stdin
zmoon Mar 24, 2025
a325e43
Python function
zmoon Mar 24, 2025
3598982
Convert SVG to other formats with cairosvg
zmoon Mar 24, 2025
fdeb8e5
Tweak docstring
zmoon Mar 24, 2025
ae56fef
Update gitignore for test files
zmoon Mar 24, 2025
37df25e
Document options
zmoon Mar 24, 2025
92fd737
Move compose with ipywidgets to module, update examples
zmoon Mar 24, 2025
b96befe
From fresh, first cell should show logo
zmoon Mar 24, 2025
ada7c0e
Use the widget for Tune _repr_html_
zmoon Mar 24, 2025
f973a58
Generate HTML page
zmoon Mar 25, 2025
ebf7d7f
Add other widget deps, tweak abcjs mentions
zmoon Mar 25, 2025
0eb00bf
Add docstring for sheet
zmoon Mar 25, 2025
252a092
Merge remote-tracking branch 'origin/main' into anywidget
zmoon Jan 15, 2026
08dcf7d
Merge remote-tracking branch 'origin/main' into anywidget
zmoon Jan 15, 2026
6c6f64e
Specify prefix correctly; better build need check
zmoon Jan 15, 2026
cd9198f
Add widget nb to docs build
zmoon Jan 15, 2026
5785f2c
Get tune display in docs working with the new widget approach
zmoon Jan 16, 2026
384d806
Add width (and title) to abcjs logo img
zmoon Jan 16, 2026
8475f1e
Stay on Sphinx 8 for now
zmoon Jan 16, 2026
f221e44
notes; svg example
zmoon Jan 16, 2026
1531e55
Update API doc
zmoon Jan 16, 2026
6df6637
Use tabs for the env var setting example
zmoon Jan 16, 2026
28a78b7
Please mypy
zmoon Jan 16, 2026
678596a
widget and sheet deps needed for example nbs
zmoon Jan 16, 2026
a4b16e2
Fix ABC img example format
zmoon Jan 16, 2026
adfaf72
Build the node package before docs build
zmoon Jan 16, 2026
f0326fc
Use Python 3.14 ubuntu-latest on RTD
zmoon Jan 16, 2026
42bf8e3
Fix build step
zmoon Jan 16, 2026
2f39cfc
Apply suggestions from code review
zmoon Jan 16, 2026
0782cbf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 16, 2026
1a10aa7
Add warning for Tune HTML display deps
zmoon Jan 17, 2026
10cc7f4
When viewing HTML, keep session open, clean up tmp file on exit
zmoon Jan 17, 2026
ebb0664
Move visual test of warning to test suite
zmoon Jan 17, 2026
a5c58fd
Prevent ABC debug view from interpreting HTML
zmoon Jan 17, 2026
a9179a0
Add widget attr helps
zmoon Jan 17, 2026
53c34f7
doc
zmoon Jan 17, 2026
f0711e8
Sort of test the html module
zmoon Jan 17, 2026
03b7c1b
Don't cover npm build errors
zmoon Jan 17, 2026
9d007eb
Test some `svg_to` errors
zmoon Jan 17, 2026
a165f56
Test in_jupyter
zmoon Jan 17, 2026
d89f119
cov
zmoon Jan 17, 2026
870ea29
Try to debug why npm build running again in SVG example
zmoon Jan 17, 2026
f98295e
Revert "Try to debug why npm build running again in SVG example"
zmoon Jan 17, 2026
98c9de9
Demo build instead of trying to hide it
zmoon Jan 17, 2026
5438e28
cov
zmoon Jan 17, 2026
130189e
Use gettempdir in test
zmoon Jan 17, 2026
b6e223a
typo
zmoon Jan 17, 2026
22df9ab
loop not needed
zmoon Jan 17, 2026
9359305
Don't override passed foreground for ipywidget
zmoon Jan 17, 2026
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
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ pyabc2/sources/_*
poetry.lock
venv*/
docs/api/
docs/examples/music*.svg
pyabc2/sheet/test.*

# node
node_modules
package-lock.json

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
6 changes: 4 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: 2

build:
os: ubuntu-24.04
os: ubuntu-lts-latest
tools:
python: "3.11"
python: "3.14"

python:
install:
Expand All @@ -12,6 +12,8 @@ python:
extra_requirements:
- doc
- sources
- widget
- sheet

sphinx:
configuration: docs/conf.py
24 changes: 24 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,27 @@ Functions:
eskin.load_url
eskin.abctools_url_to_abc
eskin.abc_to_abctools_url

Widget
======

.. automodule:: pyabc2.widget

.. autosummary::
:toctree: api/

ABCJSWidget
interactive


Headless rendering
==================

.. automodule:: pyabc2.sheet

.. autosummary::
:toctree: api/

svg
svg_to
build
12 changes: 12 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@
html_theme = "furo"
html_static_path = ["_static"]
html_css_files = ["custom.css"]
html_js_files = [
# TODO: just the pages that need it (example notebooks) instead of every page, using `app.add_js_file`
(
"https://cdn.jsdelivr.net/npm/abcjs@6.4.4/dist/abcjs-basic-min.js",
{
"crossorigin": "anonymous",
# We need it to load before the widget instances
# which seem to be in the extensions group (default priority 500)
"priority": 499,
},
)
]

napoleon_google_docstring = False
napoleon_numpy_docstring = True
Expand Down
16 changes: 16 additions & 0 deletions docs/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,19 @@ pre-commit install
```

You can now make a branch on your fork, work on the code, push your branch to GitHub, and make a PR to the parent repo.

## Widget

Enable hot reloading by setting environment variable `ANYWIDGET_HMR` to `1`
before starting Jupyter Lab.

````{tab} Bash
```bash
export ANYWIDGET_HMR=1
```
````
````{tab} PowerShell
```powershell
$env:ANYWIDGET_HMR = "1"
```
````
2 changes: 2 additions & 0 deletions docs/examples/types.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@
"id": "32",
"metadata": {},
"source": [
"(tune_type)=\n",
"\n",
"## Tune\n",
"\n",
"Pass an ABC string to create a {class}`~pyabc2.Tune`."
Expand Down
Loading