Skip to content

Improvements to the state tracking #401 - #405

Merged
rozyczko merged 4 commits into
developfrom
401-project-save
Sep 9, 2026
Merged

rozyczko merged 4 commits into
developfrom
401-project-save

Conversation

@rozyczko

@rozyczko rozyczko commented Sep 8, 2026

Copy link
Copy Markdown
Member

This pull request enhances the functionality of the project-saving mechanism in Project.save_as_json, ensuring atomic file writes.

Atomic and robust project saving:

  • The save_as_json method in Project now writes to a temporary file in the target directory and atomically replaces the destination file using os.replace, ensuring that a failed save does not corrupt or partially overwrite an existing file. Exceptions are now raised instead of being printed, allowing callers to handle errors appropriately.

@rozyczko rozyczko added [scope] enhancement Adds/improves features (major.MINOR.patch) [priority] high Should be prioritized soon enhancement labels Sep 8, 2026
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.42%. Comparing base (35c0aa1) to head (cc29da4).

Files with missing lines Patch % Lines
src/easyreflectometry/_bumps_constraints.py 90.47% 2 Missing ⚠️
src/easyreflectometry/project.py 95.34% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #405      +/-   ##
===========================================
- Coverage    94.43%   94.42%   -0.01%     
===========================================
  Files           54       54              
  Lines         5533     5562      +29     
===========================================
+ Hits          5225     5252      +27     
- Misses         308      310       +2     
Flag Coverage Δ
integration 38.38% <6.25%> (-0.17%) ⬇️
unittests 94.42% <93.75%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/easyreflectometry/inequality_constraints.py 94.00% <ø> (ø)
src/easyreflectometry/_bumps_constraints.py 95.74% <90.47%> (-4.26%) ⬇️
src/easyreflectometry/project.py 94.26% <95.34%> (+0.12%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rozyczko
rozyczko merged commit eeb5957 into develop Sep 9, 2026
53 of 55 checks passed
@rozyczko
rozyczko deleted the 401-project-save branch September 9, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement [priority] high Should be prioritized soon [scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant