Fixes for Issue related to MATLAB/Octave documentation Issue #302#341
Fixes for Issue related to MATLAB/Octave documentation Issue #302#341deepanshu-zade wants to merge 6 commits intomainfrom
Conversation
…DESCRIPTION/SYNTAX/LICENSE)
Tony-Drummond
left a comment
There was a problem hiding this comment.
I have reviewed these changes with @deepanshu-zade. All the .m files are updated because Deepanshu implemented a script that standardized the header for all MATLAB/Octave scripts, and now using documentation the tags like; Purpose, Syntax, and Description.
We will wait for another reviewer before merging to the main branch.
|
Thank you @deepanshu-zade for the the contribution.
adding a non-blocking follow up below, you can either append that here, or we can do merge them as a follow-up, whichever best works for you. Among git-tracked Edge case — PURPOSE/SYNTAX regions are closed on any line that matches |
|
|
||
| # Remove SYNTAX block from lines | ||
| del lines[syntax_start:syntax_end] | ||
|
|
There was a problem hiding this comment.
Fallback option logic would like something similar to the below -
if not first_desc_line.strip():
for line in lines:
s = line.strip()
if not s:
continue
if re.search(
r'[-]{10,}|SPDX-License-Identifier:|© \d{4}-\d{4}|See LICENSE file',
s,
):
continue
body = re.sub(r"^\s*%\s?", "", s).strip()
if re.match(
r"^(PURPOSE|DESCRIPTION|SYNTAX|LICENSE)\s*:?\s*$",
body,
re.IGNORECASE,
):
continue
first_desc_line = s
break
What type of PR is this? (check all applicable)
Description
Related Issues & Documents
QA Instructions, Screenshots, Recordings
Check ReadTheDocs
Added/updated tests?
_We encourage you to test all code included with MOLE, including examples.
have not been included
Read Contributing Guide and Code of Conduct
[optional] Are there any post deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?