Skip to content

Atomic workspace saving and non-uniform coordinates in Web API transfers - #425

Merged
PierreRaybaut merged 3 commits into
developfrom
fix/review-2026-10-24
Oct 24, 2026
Merged

PierreRaybaut merged 3 commits into
developfrom
fix/review-2026-10-24

Conversation

@PierreRaybaut

Copy link
Copy Markdown
Contributor

Fixes from the cross-repository review of the develop branches (2026-10-24), one commit per finding.

Finding Fix
A01 Workspaces (and capsules, which save one) and .dlhist files are written to a temporary file of the same directory, which replaces the destination only once completely written (atomic_native_writer). A failed save (serialization error, full disk, interruption) no longer destroys the previous file; permissions are kept.
A06 Web API NPZ: images record is_uniform_coords and, when non-uniform, xcoords.npy/ycoords.npy (lengths checked against the shape). Archives without the flag are still read as uniform; earlier readers ignore the new entries.
Docs Release notes for A01, A06 and the user-visible fixes coming from DataLab-Platform/Sigima#82 and DataLab-Platform/SigimaX#20; resampling bounds documented as pixel centers; resampling test scenario updated. French translations updated.

Merge order: after DataLab-Platform/Sigima#82 and DataLab-Platform/SigimaX#20 (release notes describe their fixes; the full suite was run against them).

Follow-up (out of scope): DataLab-Kernel keeps its own copy of the NPZ serializer, which must be updated to send/receive non-uniform coordinates (it has unrelated local changes in progress).

Validation:

  • Full suite with local Sigima/SigimaX fix branches: 1151 passed, 3 skipped (31 min).
  • New tests fail without their fix (3 in atomic_save_unit_test.py, 6 in webapi_extra_test.py).
  • ruff and pylint (changed modules) clean.

Saving a workspace opened the destination file in write mode, which
truncated it, then serialized the panels and the provenance: an error
during serialization, a full disk or an interruption destroyed the last
valid version of the file (the workspace stayed marked as modified, but the
file on disk was already lost).

Workspaces (and capsules, which save one) and .dlhist files are now written
to a temporary file of the same directory, which replaces the destination
only once completely written and closed (atomic_native_writer). On failure,
the temporary file is removed and the previous file is left untouched. The
permissions of an existing file are kept.

Assisted-by: Claude Opus 5.5
The NPZ format of the Web API stored the pixels of an image and its x0, y0,
dx and dy, but not non-uniform coordinates: an image with non-uniform axes
uploaded to or downloaded from DataLab was rebuilt with default uniform
coordinates, so that remote processing and measurements used another
geometry than the original.

Image archives now record is_uniform_coords and, for non-uniform images,
the pixel center coordinates in xcoords.npy and ycoords.npy. Their lengths
are checked against the image shape. Archives written by earlier versions
(without the flag) are still read with uniform coordinates, and earlier
readers ignore the new entries. The format is documented in the module and
in the Web API guide.

Assisted-by: Claude Opus 5.5
Describe the user-visible corrections of this release cycle coming from
the review: atomic workspace saving, non-uniform image coordinates in Web
API transfers, HDF5 link cycles (SigimaX) and the processing fixes of
Sigima 1.4.0 (resampling grid, real/complex signal operations, complex
images, independent geometric results, ROI extraction and rotation of
non-uniform images, product uncertainty). Document the resampling bounds as
pixel centers (and fix the x_min formula markup) and update the resampling
test scenario accordingly. French translations updated.

Assisted-by: Claude Opus 5.5
@PierreRaybaut
PierreRaybaut merged commit bd9291d into develop Oct 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant