Skip to content

Rework and generalize save_script_parameters - #156

Merged
ehrenfeu merged 9 commits into
imcf:develfrom
rohangirishrao:save-script-params
Nov 11, 2026
Merged

ehrenfeu merged 9 commits into
imcf:develfrom
rohangirishrao:save-script-params

Conversation

@rohangirishrao

@rohangirishrao rohangirishrao commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to issue #140 and issue #145

🐛 Fixed

  • skips only parameters whose whole name is in the skip list (fusion_format was skipped because it contains RM).

✨ Changed

  • destination now defaults to " ", and saving is skipped and logged when it's empty
  • Filename is generated from the script's name and a timestamp is created, the default name is:
    • <script_name>_run-<YYYY-MM-DD--HH-MM>_params.txt
  • New param overwrite (default: False): when True, it writes to a fixed <script_name>_params.txt instead, and does not create new files on each run.

💥 Breaking

  • save_file_name has been removed, so calls that pass that will break!

@rohangirishrao

Copy link
Copy Markdown
Contributor Author

Further comments and clarifications from #145

  • output directory variables names differ between scripts, so consistency is hard for the automatic saving to a path
  • same logic for the home directory fallback

The "easier" suggestions from #145 are implemented in this PR

@rohangirishrao

Copy link
Copy Markdown
Contributor Author

Updated imcf-fiji-mocks for the new version with getLocation() for the ScriptInfo module - need to bump the version for the tests to pass again @ehrenfeu

@ehrenfeu ehrenfeu moved this to In review in IMCF-Fiji Oct 14, 2026
@ehrenfeu
ehrenfeu self-requested a review October 14, 2026 09:29
@ehrenfeu

Copy link
Copy Markdown
Member

Updated imcf-fiji-mocks for the new version with getLocation() for the ScriptInfo module - need to bump the version for the tests to pass again @ehrenfeu

This is now done with the 0.15.0 release, plus the required changes have been integrated into devel in 8482d1a.

@rohangirishrao Could you please rebase your PR-branch onto current devel and force-push it here, so that the tests will run properly please? Let me know if you prefer me doing it! 🤗

The parameters file is now timestamped and has the name of the script
as a prefix. An additional overwrite option is also present, so that
the same file can be overwritten while testing.
Destination is now optimal, so the test has to reflect this
@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33%. Comparing base (8482d1a) to head (3ec77db).
⚠️ Report is 24 commits behind head on devel.

Additional details and impacted files
@@         Coverage Diff          @@
##           devel   #156   +/-   ##
====================================
  Coverage     33%    33%           
====================================
  Files         25     25           
  Lines       1806   1819   +13     
====================================
+ Hits         591    604   +13     
  Misses      1215   1215           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ehrenfeu ehrenfeu linked an issue Oct 28, 2026 that may be closed by this pull request
CellKai and others added 2 commits November 11, 2026 11:44
The skip list ("USERNAME", "SJLOG", "COMMAND", "RM") was matched as a
substring, so e.g. a parameter "fusion_format" (contains "RM") was not
saved. Match the whole name (case insensitive), as documented.

(cherry picked from commit bf5b534)
@rohangirishrao

Copy link
Copy Markdown
Contributor Author

Cherry picked @CellKai's bug fixes from PR #162 here, and added a fix for his test to match the current naming scheme of the parameters .txt file.

@rohangirishrao rohangirishrao added this to the 2.1.0 milestone Nov 11, 2026
@rohangirishrao rohangirishrao added the enhancement New feature or request label Nov 11, 2026
@rohangirishrao rohangirishrao self-assigned this Nov 11, 2026
@rohangirishrao

rohangirishrao commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

As this is a breaking change with the removal of save_file_name - the newest version should be v3.0.

@ehrenfeu ehrenfeu added the new-major Change introduced in PR will require a new major release. label Nov 11, 2026
@ehrenfeu
ehrenfeu merged commit 421cc3a into imcf:devel Nov 11, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in IMCF-Fiji Nov 11, 2026
@rohangirishrao
rohangirishrao deleted the save-script-params branch November 11, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request new-major Change introduced in PR will require a new major release.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Generalization of save_script_parameters

3 participants