Skip to content

Conversation

@t-b
Copy link
Collaborator

@t-b t-b commented May 28, 2025

We know warn the user when the wrong mode is used.

Close #2392
Close #2394

@t-b t-b self-assigned this May 28, 2025
@t-b t-b marked this pull request as ready for review May 29, 2025 10:21
@t-b t-b requested review from MichaelHuth and timjarsky as code owners May 29, 2025 10:21
@t-b t-b assigned timjarsky and unassigned t-b May 29, 2025
@timjarsky

This comment was marked as outdated.

@timjarsky

This comment was marked as outdated.

@timjarsky timjarsky assigned t-b and unassigned timjarsky May 29, 2025
timjarsky
timjarsky previously approved these changes May 29, 2025
@t-b t-b force-pushed the bugfix/2432-labnotebook-better-error-reporting branch from e938639 to a234be5 Compare May 30, 2025 14:31
@t-b

This comment was marked as outdated.

@t-b t-b assigned timjarsky and unassigned t-b May 30, 2025
@t-b t-b force-pushed the bugfix/2432-labnotebook-better-error-reporting branch 2 times, most recently from 2b38d00 to c9a4c53 Compare June 30, 2025 21:19
@t-b t-b force-pushed the bugfix/2432-labnotebook-better-error-reporting branch from c9a4c53 to e15a7a9 Compare July 25, 2025 11:27
@t-b

This comment was marked as outdated.

@timjarsky timjarsky assigned t-b and unassigned timjarsky Aug 4, 2025
timjarsky
timjarsky previously approved these changes Aug 4, 2025
@t-b t-b force-pushed the bugfix/2432-labnotebook-better-error-reporting branch from e15a7a9 to 11b3f8c Compare August 5, 2025 11:56
@t-b
Copy link
Collaborator Author

t-b commented Aug 5, 2025

Fixed conflicts.

@t-b t-b force-pushed the bugfix/2432-labnotebook-better-error-reporting branch from 11b3f8c to a5ec44d Compare August 5, 2025 12:34
@t-b
Copy link
Collaborator Author

t-b commented Aug 5, 2025

Will merge onced CI finished.

@t-b t-b removed their assignment Aug 5, 2025
This is a constant counting the number of different modes. So it does not
make sense to accept it for the labnotebook sweepFormula operation.
@t-b t-b force-pushed the bugfix/2432-labnotebook-better-error-reporting branch from a5ec44d to 802cba3 Compare August 5, 2025 13:37
@timjarsky timjarsky requested a review from Copilot August 5, 2025 19:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the SF labnotebook reporting by improving error handling and user feedback when labnotebook keys cannot be found. It implements fallback behavior and warning messages to guide users when incorrect modes are used.

Key changes:

  • Adds warning messages when labnotebook keys cannot be found with the specified mode but are available with a fallback mode
  • Implements proper error reporting for missing labnotebook keys and invalid wildcards
  • Removes deprecated mode option and adds mode stringification utility

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
Packages/MIES/MIES_SweepFormula_Operations.ipf Core logic for enhanced labnotebook error handling and fallback behavior
Packages/MIES/MIES_MiesUtilities_Logbook.ipf Utility function for mode stringification and removes deprecated mode option
Packages/tests/Basic/UTF_SweepFormula_Operations.ipf Comprehensive test coverage for new warning messages and fallback scenarios
Packages/tests/UTF_HelperFunctions.ipf Test data setup with independent labnotebook entries
Packages/doc/SweepFormula.rst Documentation update explaining fallback behavior
Packages/tests/Basic/UTF_Macros.ipf Removes debugging code

t-b added 5 commits August 6, 2025 13:56
A common error is to not pass UNKNOWN_MODE when asking for user labnotebook
entries or entries like "User comment". In these cases we now warn and
fallback automatically to UNKNOWN_MODE.
The SweepFormula labnotebook operation uses GetLastSettingChannel
internally. And this falls back to independent entries automatically.

Let's document that and add a test so that this stays working.
…vocation

This was left from developing, in addition the controls does not exist
anymore since fd05d85 (DB: Replace SF error SetVar/status LED with
Notebook, separate internal error state, 2025-07-22).
@t-b t-b force-pushed the bugfix/2432-labnotebook-better-error-reporting branch from 0371c13 to 4d15b22 Compare August 6, 2025 11:56
@t-b t-b merged commit 707d781 into main Aug 7, 2025
43 of 44 checks passed
@t-b t-b deleted the bugfix/2432-labnotebook-better-error-reporting branch August 7, 2025 15:15
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.

labnotebook: Warn about wrong entry source type SF labnotebook: Warn user about wrong headstage contingency mode

3 participants