From 0d5422d6e10a69f2a2da2252d59de9e959caa19e Mon Sep 17 00:00:00 2001 From: Mirko Bunse Date: Tue, 1 Oct 2024 10:36:53 +0200 Subject: [PATCH] Increase Python version and circumvent a warning emitted when splitting equation boundaries --- .github/workflows/ci.yml | 4 ++-- critdd/tikz.py | 2 +- pyproject.toml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea83f39..f176556 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: strategy: matrix: python-version: - - "3.8" # oldest version; end of live in October 2024 - - "3.11" + - "3.9" # oldest version; end of live in October 2025 + - "3.12" steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/critdd/tikz.py b/critdd/tikz.py index a628bf3..90fb8f1 100644 --- a/critdd/tikz.py +++ b/critdd/tikz.py @@ -185,7 +185,7 @@ def _treatment(label, rank, xpos, ypos, anchor, reverse_x): return f"\\draw[treatment line] ([yshift=-2pt] axis cs:{rank}, 0) |- (axis cs:{xpos}, {-ypos})\n node[treatment label, anchor={anchor}] {{{_label(label)}}};" def _label(label): parts = [] - for i, part in enumerate(re.split("\$", label)): # split on equation boundaries + for i, part in enumerate(re.split("\\$", label)): # split on equation boundaries if i % 2 == 0: # if the current part is outside of an equation parts.append(re.sub("(? "\_" else: diff --git a/pyproject.toml b/pyproject.toml index db227d4..bf1731f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ dependencies = [ "scipy", "networkx", ] -requires-python = ">= 3.8" +requires-python = ">= 3.9" keywords = [ "machine learning", "benchmark", @@ -24,10 +24,10 @@ classifiers = [ "Topic :: Text Processing :: Markup :: LaTeX", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] readme = "README.md" authors = [