Skip to content

Unify help#735

Merged
dominikbach merged 57 commits intodevelopfrom
unify-help
Aug 12, 2024
Merged

Unify help#735
dominikbach merged 57 commits intodevelopfrom
unify-help

Conversation

@dominikbach
Copy link
Copy Markdown
Contributor

@dominikbach dominikbach commented Jun 25, 2024

Fixes #23 .

Changes proposed in this pull request: Matlabbatch GUI items follow the logic of using function help wherever possible.
Exceptions:

  • generic help texts in pspm_cfg_selector_... functions
  • GUI-specific hints and help
  • data-type specific help in pspm_import, which is partly summarised in pspm_text. This will be dealt with in a separate PR.
  • pspm_review which has no function help
  • pspm_process_illuminance: function help needs to be modified for pspm_help
  • pspm_pupil_correct: function help needs to be modified for pspm_help

@dominikbach dominikbach marked this pull request as draft June 25, 2024 13:56
@dominikbach dominikbach self-assigned this Jun 25, 2024
@dominikbach dominikbach added the In Progress Currently being worked on label Jun 25, 2024
@dominikbach dominikbach added this to the v7.0 milestone Jun 25, 2024
@dominikbach dominikbach marked this pull request as ready for review July 15, 2024 11:24
@dominikbach dominikbach requested a review from teddphil August 8, 2024 08:06
@dominikbach dominikbach added Completed & Waiting for Review Completed and waiting for review Improvement A minor improvement to the project GUI Issue An issue related to the GUI and removed In Progress Currently being worked on labels Aug 8, 2024
@teddphil teddphil added Under Review and removed Completed & Waiting for Review Completed and waiting for review labels Aug 8, 2024
@teddphil
Copy link
Copy Markdown

image

I suggest that I can update pspm_cfg_help_format to make sure the output will not start with a blank space or a dot.

Comment thread src/pspm_cfg/pspm_cfg_help_format.m Outdated
% this syntax allows chaining several nested structs into one argname
evalc(sprintf('helptext = settings.help.%s.Arguments.%s;', funcname, argname));
[startindx, endindx] = regexp(helptext, '\[\s*([^\[\]]*)\s*\]'); % thanks ChatGPT for finding the regexp
helptext(startindx:endindx) = [];
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

startindx and endindx could be 1xn (n>1) array. I would suggest to use transpose in this occasion. Please find screenshot.

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed.

ecg2hb_amri_teo_bandpass.val = {[8 40]};
ecg2hb_amri_teo_bandpass.help = {['Define the cutoff frequencies (Hz) for bandpass filter applied to filtered ECG',...
' signal before applying TEO']};
ecg2hb_amri_teo_bandpass.help = pspm_cfg_help_format('pspm_convert_ecg2hb_amri', 'options.teo_bandpass');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just now sure if this is expected...

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Comment thread src/pspm_combine_markerchannels.m Outdated
% │ indexing in further processing which by default
% │ takes the first marker channel as input
% └.marker_chan_num: any number of marker channel numbers - if undefined
% └.marker_chan_num : any number of marker channel numbers - if undefined
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There are two duplicated lines?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Comment thread src/pspm_emg_pp.m
% Default is 'emg' (i.e. last EMG channel)
% .channel_action: ['add'/'replace'] Defines whether the new channel should
% be added or the previous outputs of this function should
% be replaced. (Default: 'replace')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There is an empty line above History section. Better to delete it to avoid potential mis-recognition.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Copy link
Copy Markdown

@teddphil teddphil left a comment

Choose a reason for hiding this comment

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

Tested all the functions that use pspm_cfg_help_format and found them running ok.
Just minor changes could be useful....

@teddphil teddphil added Approved The pull request has been approved and can be checked and then merged. and removed Under Review labels Aug 11, 2024
@dominikbach dominikbach merged commit f3906bf into develop Aug 12, 2024
@dominikbach dominikbach deleted the unify-help branch August 12, 2024 07:41
@teddphil teddphil removed Improvement A minor improvement to the project GUI Issue An issue related to the GUI Approved The pull request has been approved and can be checked and then merged. labels Jan 7, 2025
@teddphil teddphil mentioned this pull request Jan 7, 2025
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.

Find a way to fix documentation duplication

2 participants