Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
python-version: ['3.11', '3.12', '3.13']
os: [macos-latest, ubuntu-latest, windows-latest]
env:
# Display must be available globally for linux to know where xvfb is
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,7 @@ _version_save.py

.idea

pyjibe/_version.py
pyjibe/_version.py

# uv
uv.lock
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
0.16.4
- setup: support latest python versions (#32, #46)
- setup: support latest matplotlib versions (#32, #46)
- fix: remember user's choice upon curve open (#44, #45)
0.16.3
- setup: bump afmformats to 0.18.6
Expand Down
22 changes: 18 additions & 4 deletions pyjibe/fd/mpl_indent.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,27 @@ def update(self, fdist, rescale_x=None, rescale_y=None):
self.plots["residuals"].set_data(fdist["tip position"]*xscale,
(fdist["fit residuals"])*yscale)
# fit range
xy = self.plots["fit range"].get_xy()
fitrange = (fdist[xaxis]*xscale)[fdist["fit range"]]
fitmin = np.min(fitrange)
fitmax = np.max(fitrange)
xy[:, 0] = fitmax
xy[2:4, 0] = fitmin
self.plots["fit range"].set_xy(xy)
fr_patch = self.plots["fit range"]
# Matplotlib changed `Axes.axvspan` from returning a
# Polygon (3.7.x) to returning a Rectangle (>=3.8).
if hasattr(fr_patch, "set_x") and hasattr(fr_patch, "set_width"):
fr_patch.set_x(fitmin)
fr_patch.set_width(fitmax - fitmin)
else:
xy = np.asarray(fr_patch.get_xy(), dtype=float).copy()
if xy.ndim == 2 and xy.shape[1] == 2 and xy.shape[0] >= 4:
# Expected vertex order:
# (xmin,0),(xmin,1),(xmax,1),(xmax,0),...
xy[0, 0] = fitmin
xy[1, 0] = fitmin
xy[2, 0] = fitmax
xy[3, 0] = fitmax
if xy.shape[0] >= 5:
xy[4, 0] = fitmin
fr_patch.set_xy(xy)

self.update_plot(rescale_x=rescale_x,
rescale_y=rescale_y)
Expand Down
2 changes: 1 addition & 1 deletion pyjibe/head/custom_widgets/mpl_navigation_toolbar_icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from PyQt6 import QtCore, QtGui, QtWidgets

from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT
from matplotlib.backends.backend_qtagg import NavigationToolbar2QT
from matplotlib import cbook

# TODO:
Expand Down
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ license = { text = "GPL version 3.0 or later" }
dependencies = [
"afmformats>=0.18.6",
"nanite>=4.2.3",
# https://github.com/AFM-analysis/PyJibe/issues/32
"matplotlib>=3,<3.7.5", # NavigationToolbar2QT mod
"matplotlib>3.7.5", # NavigationToolbar2QT mod
"packaging", # for version checking during update
"pyqt6",
]
Expand All @@ -49,6 +48,10 @@ changelog = "https://pyjibe.readthedocs.io/en/stable/sec_changelog.html"
[tool.setuptools]
packages = ["pyjibe"]

[tool.coverage.run]
# sysmon is faster on py>=3.12 and avoids pytest collection hangs
core = "sysmon"

[tool.setuptools_scm]
write_to = "pyjibe/_version.py"
version_scheme = "post-release"
version_scheme = "post-release"
Loading