Skip to content

Commit

Permalink
Increase Python version and circumvent a warning emitted when splitti…
Browse files Browse the repository at this point in the history
…ng equation boundaries
  • Loading branch information
mirkobunse committed Oct 1, 2024
1 parent 40f3289 commit 0d5422d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion critdd/tikz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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("(?<!\\\\)_", "\\\\_", part)) # { "_", "\_" } -> "\_"
else:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
"scipy",
"networkx",
]
requires-python = ">= 3.8"
requires-python = ">= 3.9"
keywords = [
"machine learning",
"benchmark",
Expand All @@ -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 = [
Expand Down

0 comments on commit 0d5422d

Please sign in to comment.