From a34fe9f9950cf884e36e0540b2b842b8f5e5a556 Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 11:26:05 -0600 Subject: [PATCH 01/14] Support the current s-tunes RTF --- pyabc2/sources/bill_black.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyabc2/sources/bill_black.py b/pyabc2/sources/bill_black.py index d9c734c..8e6bbfa 100644 --- a/pyabc2/sources/bill_black.py +++ b/pyabc2/sources/bill_black.py @@ -33,7 +33,7 @@ "o-tunes-1.txt", "pq-tunes-1.txt", "r-tunes-1.txt", - "s-tunes-2.txt", + "s-tunes-2.rtf", "t-tunes-1.txt", "uv-tunes-1.txt", "wz-tunes-1.txt", @@ -118,6 +118,10 @@ def load_meta(*, redownload: bool = False, debug: bool = False) -> list[str]: line.strip() for line in text.splitlines() if not line.lstrip().startswith("%") ) + # For RTF, remove trailing backslashes + if fn.endswith(".rtf"): + text = "\n".join(line.rstrip("\\") for line in text.splitlines()).rstrip("}") + # Find the start of the first tune, in order to skip header info start = text.find("X:") if start == -1: # pragma: no cover From df5b70adc5a0dc70f49898946dd0fe095efe9853 Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 11:28:49 -0600 Subject: [PATCH 02/14] Update Norbeck zip URL --- pyabc2/sources/norbeck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyabc2/sources/norbeck.py b/pyabc2/sources/norbeck.py index 0547829..2092733 100644 --- a/pyabc2/sources/norbeck.py +++ b/pyabc2/sources/norbeck.py @@ -80,7 +80,7 @@ def download() -> None: import requests # All Norbeck, including non-Irish - url = "https://www.norbeck.nu/abc/hn202110.zip" + url = "https://www.norbeck.nu/abc/hn202601.zip" r = requests.get(url, timeout=5) From bfc35b0480c6dd0fd57d1f50857848074fec44b9 Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 11:32:27 -0600 Subject: [PATCH 03/14] Update Norbeck Irish count --- tests/test_sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_sources.py b/tests/test_sources.py index 1a23492..6889e29 100644 --- a/tests/test_sources.py +++ b/tests/test_sources.py @@ -17,7 +17,7 @@ the_session, ) -NORBECK_IRISH_COUNT = 2733 +NORBECK_IRISH_COUNT = 2813 @pytest.mark.parametrize("tune_name", examples) From ad03b44b49212bb48856fcfb9153c71184f552cf Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 11:40:50 -0600 Subject: [PATCH 04/14] Fix get sets example I guess the default sorting is newest first, and a new set was added, messing up the test Now it should be more robust to updates --- tests/test_sources.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_sources.py b/tests/test_sources.py index 6889e29..07d25ee 100644 --- a/tests/test_sources.py +++ b/tests/test_sources.py @@ -500,11 +500,12 @@ def test_the_session_get_member_sets(): def test_the_session_get_member_sets_multipage(): - sets = the_session.get_member_sets(1, pages=3, size=2, max_threads=2) + sets = the_session.get_member_sets(1, pages=3, size=2, max_threads=2, orderby="oldest") assert len(sets) == 6 + assert len(sets[0]) == 3 d = sets[0][0] - assert d["name"] == "Toss The Feathers" - assert d["tune_id"] == 138 + assert d["name"] == "The Tarbolton" + assert d["tune_id"] == 560 def test_the_session_consume_validation(): From 4062cb5f9aa691b3de4b9bdd9b8c9d86ae7d39db Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 11:46:59 -0600 Subject: [PATCH 05/14] Update BB alltunes fns test for current s-tunes RTF --- tests/test_sources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_sources.py b/tests/test_sources.py index 07d25ee..8225287 100644 --- a/tests/test_sources.py +++ b/tests/test_sources.py @@ -462,7 +462,7 @@ def test_bill_black_text_fns(): r = requests.get(url, headers={"User-Agent": "pyabc2"}, timeout=5) r.raise_for_status() - fns_web = sorted(re.findall(r'href=["\']([a-z0-9\-]+\.txt)["\']', r.text)) + fns_web = sorted(re.findall(r'href=["\']([a-z0-9\-]+\.(?:txt|rtf))["\']', r.text)) if "s-tunes-1.txt" in fns_web: # We're using s-tunes-2, not both fns_web.remove("s-tunes-1.txt") From 2ef3f6e6a19d459fedb76ba7dd25c73e70be7c8c Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 11:49:05 -0600 Subject: [PATCH 06/14] BB has HTTPS now --- pyabc2/sources/bill_black.py | 6 +++--- pyabc2/sources/bill_black_tunefolders.py | 8 ++++---- tests/test_sources.py | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pyabc2/sources/bill_black.py b/pyabc2/sources/bill_black.py index 8e6bbfa..c9360aa 100644 --- a/pyabc2/sources/bill_black.py +++ b/pyabc2/sources/bill_black.py @@ -1,7 +1,7 @@ """ Bill Black's Irish Traditional Tune Library -http://www.capeirish.com/ittl/ +https://www.capeirish.com/ittl/ """ import logging @@ -41,7 +41,7 @@ def download() -> None: - """Download the alphabetical text files from http://www.capeirish.com/ittl/alltunes/text/ + """Download the alphabetical text files from https://www.capeirish.com/ittl/alltunes/text/ and store them in a compressed archive. """ import zipfile @@ -57,7 +57,7 @@ def download_one(url): with ThreadPoolExecutor(max_workers=4) as executor: futures = [] for fn in TXT_FNS: - url = f"http://www.capeirish.com/ittl/alltunes/text/{fn}" + url = f"https://www.capeirish.com/ittl/alltunes/text/{fn}" futures.append(executor.submit(download_one, url)) SAVE_TO.mkdir(exist_ok=True) diff --git a/pyabc2/sources/bill_black_tunefolders.py b/pyabc2/sources/bill_black_tunefolders.py index 0d45b3c..abbc523 100644 --- a/pyabc2/sources/bill_black_tunefolders.py +++ b/pyabc2/sources/bill_black_tunefolders.py @@ -1,11 +1,11 @@ """ Bill Black's Irish Traditional Tune Library -http://www.capeirish.com/ittl/ +https://www.capeirish.com/ittl/ As of the 2025-06-14 update, the "tunefolders" method is deprecated. -Bill Black is now using the Eskin ABC Tools (http://www.capeirish.com/ittl/alltunes/html/), -while also posting ABC text files (http://www.capeirish.com/ittl/alltunes/text/), +Bill Black is now using the Eskin ABC Tools (https://www.capeirish.com/ittl/alltunes/html/), +while also posting ABC text files (https://www.capeirish.com/ittl/alltunes/text/), both split up alphabetically by tune name. """ @@ -20,7 +20,7 @@ HERE = Path(__file__).parent -ITTL = "http://www.capeirish.com/ittl/" +ITTL = "https://www.capeirish.com/ittl/" SAVE_TO = HERE / "_bill-black_tunefolders" diff --git a/tests/test_sources.py b/tests/test_sources.py index 8225287..7d45318 100644 --- a/tests/test_sources.py +++ b/tests/test_sources.py @@ -416,6 +416,7 @@ def test_eskin_invalid_tunebook_key(): _ = eskin.get_tunebook_info("asdf") +@pytest.mark.xfail(reason="Bill Black site now has HTTPS", strict=False) def test_bill_black_no_https(): # If the site does get HTTPS, we'd like to know import requests From 9ed3da0123e05465ed981811ead99cde6a61b542 Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 11:52:41 -0600 Subject: [PATCH 07/14] Update O'Farrell's dirs --- pyabc2/sources/bill_black_tunefolders.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pyabc2/sources/bill_black_tunefolders.py b/pyabc2/sources/bill_black_tunefolders.py index abbc523..8f17302 100644 --- a/pyabc2/sources/bill_black_tunefolders.py +++ b/pyabc2/sources/bill_black_tunefolders.py @@ -106,7 +106,6 @@ def url_to_file(self, url: str) -> Path: key="jol", title="Johnny O'Leary of Sliabh Luachra", folder="31", - subfolders=["31-hps", "31-jigs", "31-misc", "31-polkas", "31-reels", "31-slides"], ), Collection( key="levey", @@ -119,13 +118,10 @@ def url_to_file(self, url: str) -> Path: title="O'Farrell's Pocket Companion", folder="48", subfolders=[ - "48-hps", - "48-jigs", - "48-marches", - "48-misc", - "48-polkas", - "48-reels", - "48-sjigs", + "481", + "482", + "483", + "484", ], ), Collection( @@ -146,7 +142,6 @@ def url_to_file(self, url: str) -> Path: key="roche", title="Roche Collection", folder="53", - subfolders=["53-hps", "53-jigs", "53-misc", "53-polkas", "53-reels", "53-sjigs"], ), ] From 75c0d2e18f4c2458f5f50fd73687bd34d0d65722 Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 12:00:02 -0600 Subject: [PATCH 08/14] Allow BB tunefolders to fail for now --- tests/test_sources.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_sources.py b/tests/test_sources.py index 7d45318..ded9332 100644 --- a/tests/test_sources.py +++ b/tests/test_sources.py @@ -432,6 +432,7 @@ def test_bill_black_no_https(): r.raise_for_status() +@pytest.mark.xfail(reason="Bill Black tunefolders are currently in flux", strict=False) @pytest.mark.parametrize("key", list(bill_black_tunefolders._KEY_TO_COLLECTION)) def test_bill_black_tunefolders(key): import requests From ad4f33d4c5c6b8bb16199f17d265fb9180239d03 Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 12:08:35 -0600 Subject: [PATCH 09/14] More tunefolders organization updates --- pyabc2/sources/bill_black_tunefolders.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/pyabc2/sources/bill_black_tunefolders.py b/pyabc2/sources/bill_black_tunefolders.py index 8f17302..8894665 100644 --- a/pyabc2/sources/bill_black_tunefolders.py +++ b/pyabc2/sources/bill_black_tunefolders.py @@ -106,6 +106,14 @@ def url_to_file(self, url: str) -> Path: key="jol", title="Johnny O'Leary of Sliabh Luachra", folder="31", + subfolders=[ + "31-hps", + "31-jigs", + "31-misc", + "31-polkas", + "31-reels", + "31-slides", + ], ), Collection( key="levey", @@ -142,6 +150,14 @@ def url_to_file(self, url: str) -> Path: key="roche", title="Roche Collection", folder="53", + subfolders=[ + "53-hps", + "53-jigs", + "53-misc", + "53-polkas", + "53-reels", + "53-sjigs", + ], ), ] From b3bcb0ffa96f90588947c06804cbe3a90a6da23c Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 12:09:45 -0600 Subject: [PATCH 10/14] Consistent subfolder formatting --- pyabc2/sources/bill_black_tunefolders.py | 56 +++++++++++++++++++++--- 1 file changed, 49 insertions(+), 7 deletions(-) diff --git a/pyabc2/sources/bill_black_tunefolders.py b/pyabc2/sources/bill_black_tunefolders.py index 8894665..92c7c30 100644 --- a/pyabc2/sources/bill_black_tunefolders.py +++ b/pyabc2/sources/bill_black_tunefolders.py @@ -65,13 +65,26 @@ def url_to_file(self, url: str) -> Path: key="bbmg", title="BB's Mostly Gems", folder="12", - subfolders=["12-AE", "12-FJ", "12-KQ", "12-RST", "12-UY"], + subfolders=[ + "12-AE", + "12-FJ", + "12-KQ", + "12-RST", + "12-UY", + ], ), Collection( key="bs", title="Bulmer & Sharpley", folder="13", - subfolders=["13-hps", "13-jigs", "13-misc", "13-p&s", "13-reels", "13-sjigs"], + subfolders=[ + "13-hps", + "13-jigs", + "13-misc", + "13-p&s", + "13-reels", + "13-sjigs", + ], ), Collection( key="car", @@ -82,25 +95,48 @@ def url_to_file(self, url: str) -> Path: key="cre", title="Ceol Rince na hÉireann", folder="18", - subfolders=["18-hornpipes", "18-jigs", "18-polkas_slides", "18-reels", "18-slipjigs"], + subfolders=[ + "18-hornpipes", + "18-jigs", + "18-polkas_slides", + "18-reels", + "18-slipjigs", + ], ), Collection( key="dmi", title="Dance Music of Ireland", folder="21", - subfolders=["hps", "jigs", "reels", "slipjigs"], + subfolders=[ + "hps", + "jigs", + "reels", + "slipjigs", + ], ), Collection( key="dmwc", title="Dance Music of Willie Clancy", folder="22", - subfolders=["22-hps", "22-jigs", "22-misc", "22-reels", "22-sjigs"], + subfolders=[ + "22-hps", + "22-jigs", + "22-misc", + "22-reels", + "22-sjigs", + ], ), Collection( key="foinn", title="Foinn Seisiún", folder="25", - subfolders=["hps", "jigs", "misc", "p&s", "reels"], + subfolders=[ + "hps", + "jigs", + "misc", + "p&s", + "reels", + ], ), Collection( key="jol", @@ -119,7 +155,13 @@ def url_to_file(self, url: str) -> Path: key="levey", title="Levey Collection", folder="33", - subfolders=["33-hps", "33-jigs", "33-marches", "33-reels", "33-sjigs"], + subfolders=[ + "33-hps", + "33-jigs", + "33-marches", + "33-reels", + "33-sjigs", + ], ), Collection( key="ofpc", From 3fe1c5bc0a515e3a647261424d7342327e9b97ff Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 12:24:49 -0600 Subject: [PATCH 11/14] Add User-Agent for Norbeck zip downloader --- pyabc2/sources/norbeck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyabc2/sources/norbeck.py b/pyabc2/sources/norbeck.py index 2092733..28d6b11 100644 --- a/pyabc2/sources/norbeck.py +++ b/pyabc2/sources/norbeck.py @@ -82,7 +82,7 @@ def download() -> None: # All Norbeck, including non-Irish url = "https://www.norbeck.nu/abc/hn202601.zip" - r = requests.get(url, timeout=5) + r = requests.get(url, headers={"User-Agent": "pyabc2"}, timeout=5) try: r.raise_for_status() From 4488a46fe5a2aa7f2b8502caaa22899a38cdbd3d Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 12:36:37 -0600 Subject: [PATCH 12/14] Set cell timeout to 60 s for sources nb the note counts (using pandas and the note regex) computation is taking much longer (~ 7x) than it did in the v0.1.0 release --- docs/examples/sources.ipynb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/examples/sources.ipynb b/docs/examples/sources.ipynb index c9c4c31..e62baa9 100644 --- a/docs/examples/sources.ipynb +++ b/docs/examples/sources.ipynb @@ -468,6 +468,9 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3" + }, + "mystnb": { + "execution_timeout": 60 } }, "nbformat": 4, From f7f5322450b31ee843061e48deb55e4174caa440 Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 12:44:53 -0600 Subject: [PATCH 13/14] Revert "Add User-Agent for Norbeck zip downloader" This reverts commit 3fe1c5bc0a515e3a647261424d7342327e9b97ff. --- pyabc2/sources/norbeck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyabc2/sources/norbeck.py b/pyabc2/sources/norbeck.py index 28d6b11..2092733 100644 --- a/pyabc2/sources/norbeck.py +++ b/pyabc2/sources/norbeck.py @@ -82,7 +82,7 @@ def download() -> None: # All Norbeck, including non-Irish url = "https://www.norbeck.nu/abc/hn202601.zip" - r = requests.get(url, headers={"User-Agent": "pyabc2"}, timeout=5) + r = requests.get(url, timeout=5) try: r.raise_for_status() From 921aca741e3de2e144cc88a4b8fe9ddb7a80801b Mon Sep 17 00:00:00 2001 From: zmoon Date: Mon, 2 Feb 2026 12:53:19 -0600 Subject: [PATCH 14/14] changelog --- docs/changes.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/changes.md b/docs/changes.md index 330f615..f873d0b 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -1,5 +1,10 @@ # Release notes +## v0.1.2 (unreleased) + +* Update Norbeck to the current 2026-01 version ({pull}`96`) +* Various Bill Black fixes ({pull}`96`) + ## v0.1.1 (2026-01-20) * Fix loading The Session sets data ({pull}`77`)