Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: silx-kit/silx
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.0
Choose a base ref
...
head repository: silx-kit/silx
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 8 commits
  • 3 files changed
  • 6 contributors

Commits on Jan 27, 2025

  1. Small improvements to Release section of CONTRIBUTING

    loichuder committed Jan 27, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    vrozkovec Vit Rozkovec
    Copy the full SHA
    0704c91 View commit details
  2. Merge pull request #4208 from silx-kit/update-contrib

    Documentation: Small improvements to Release section of CONTRIBUTING
    loichuder authored Jan 27, 2025

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    e7b05b7 View commit details

Commits on Jan 29, 2025

  1. h5py does not raise base exceptions

    woutdenolf committed Jan 29, 2025
    Copy the full SHA
    953fd5c View commit details
  2. Merge pull request #4209 from silx-kit/fix_is_h5py_exception

    h5py_utils: Fixed base exceptions cannot be h5py exceptions
    t20100 authored Jan 29, 2025
    Copy the full SHA
    f15382c View commit details

Commits on Feb 3, 2025

  1. matplotlib backend: attempt to remove matplotlib warning on conflict …

    …between y limits and autoscale
    payno authored and t20100 committed Feb 3, 2025
    Copy the full SHA
    95e0f7b View commit details
  2. Uncomment set_autoscaley_on

    t20100 committed Feb 3, 2025
    Copy the full SHA
    49317a4 View commit details
  3. Use set_ylim auto argument

    t20100 committed Feb 3, 2025
    Copy the full SHA
    be9f3f8 View commit details
  4. Merge pull request #4204 from silx-kit/fix_4203

    gui matplotlib backend warning: fix conflict between y limits and autoscale
    payno authored Feb 3, 2025
    Copy the full SHA
    3c8c2b3 View commit details
Showing with 17 additions and 8 deletions.
  1. +6 −1 CONTRIBUTING.rst
  2. +9 −7 src/silx/gui/plot/backends/BackendMatplotlib.py
  3. +2 −0 src/silx/io/h5py_utils.py
7 changes: 6 additions & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -129,6 +129,8 @@ Use cases

The `release branch` is the ``main`` branch, except for bug fix releases.

First, decide which kind of release is needed:

Release candidates
..................

@@ -161,6 +163,8 @@ Automated tests
- ``REPOSITORY``: ``https://github.com/<user>/silx`` (default: ``https://github.com/silx-kit/silx``)
- ``TAG``: branch or tag to test (default: ``main`` branch)

These tests take a long time. You can move to the *Prepare the release* section in the meantime.

Manual testing
..............

@@ -177,7 +181,8 @@ Write the release notes
(see `github automatically generated release notes`_) between a new tag and the previous release.
- Copy the generated changelog to ``CHANGELOG.rst`` and close github's release web page.
**Warning: DO NOT publish the release yet!**
- Sort, curate and fix the list of PRs and match the styling of previous release notes.
- Sort, curate and fix the list of PRs and match the styling of previous release notes. You can run ``tools/format_GH_release_notes.py``
first, that will format the GH release notes in `CHANGELOG_new.rst`.

Steps
.....
16 changes: 9 additions & 7 deletions src/silx/gui/plot/backends/BackendMatplotlib.py
Original file line number Diff line number Diff line change
@@ -1192,16 +1192,17 @@ def setLimits(self, xmin, xmax, ymin, ymax, y2min=None, y2max=None):
self._dirtyLimits = True
self.ax.set_xlim(min(xmin, xmax), max(xmin, xmax))

keepRatio = self.isKeepDataAspectRatio()
if y2min is not None and y2max is not None:
if not self.isYAxisInverted():
self.ax2.set_ylim(min(y2min, y2max), max(y2min, y2max))
self.ax2.set_ylim(min(y2min, y2max), max(y2min, y2max), auto=keepRatio)
else:
self.ax2.set_ylim(max(y2min, y2max), min(y2min, y2max))
self.ax2.set_ylim(max(y2min, y2max), min(y2min, y2max), auto=keepRatio)

if not self.isYAxisInverted():
self.ax.set_ylim(min(ymin, ymax), max(ymin, ymax))
self.ax.set_ylim(min(ymin, ymax), max(ymin, ymax), auto=keepRatio)
else:
self.ax.set_ylim(max(ymin, ymax), min(ymin, ymax))
self.ax.set_ylim(max(ymin, ymax), min(ymin, ymax), auto=keepRatio)

self._updateMarkers()

@@ -1250,10 +1251,11 @@ def setGraphYLimits(self, ymin, ymax, axis):
xcenter = 0.5 * (xmin + xmax)
ax.set_xlim(xcenter - 0.5 * newXRange, xcenter + 0.5 * newXRange)

keepRatio = self.isKeepDataAspectRatio()
if not self.isYAxisInverted():
ax.set_ylim(ymin, ymax)
ax.set_ylim(ymin, ymax, auto=keepRatio)
else:
ax.set_ylim(ymax, ymin)
ax.set_ylim(ymax, ymin, auto=keepRatio)

self._updateMarkers()

@@ -1315,7 +1317,7 @@ def setYAxisLogarithmic(self, flag):
dataRange = self._plot.getDataRange()[dataRangeIndex]
if dataRange is None:
dataRange = 1, 100 # Fallback
axis.set_ylim(*dataRange)
axis.set_ylim(*dataRange, auto=self.isKeepDataAspectRatio())
redraw = True
if redraw:
self.draw()
2 changes: 2 additions & 0 deletions src/silx/io/h5py_utils.py
Original file line number Diff line number Diff line change
@@ -126,6 +126,8 @@ def is_h5py_exception(e):
:param BaseException e:
:returns bool:
"""
if not isinstance(e, Exception):
return False
for frame in traceback.walk_tb(e.__traceback__):
for namespace in (frame[0].f_locals, frame[0].f_globals):
if namespace.get("__package__", None) == "h5py":