Skip to content

Change synthesis.py to numpydoc style - #212

Merged
bnavigator merged 2 commits into
python-control:masterfrom
KybernetikJo:numpydoc_synthesis_py
Jan 7, 2024
Merged

Change synthesis.py to numpydoc style#212
bnavigator merged 2 commits into
python-control:masterfrom
KybernetikJo:numpydoc_synthesis_py

Conversation

@KybernetikJo

@KybernetikJoKybernetikJo commented Aug 27, 2023

Copy link
Copy Markdown
Contributor

This PR refactors the Slycot/slycot/synthesis.py in order to be closer to the numpydoc style as discussed in #100.
Should be part of #204.

Remark:
The synthesis.py has already been quite close to numpydoc before this PR. There must have been major cleanups in the past.

(finished 18 of 18 = (17 + 1) routines)

Routine nameFinishedStatus description
sb01bd
*3
sb02md
*3
sb02mt
*3
sb02od
*3
sb03md
*3
sb03md57
*3
sb03od
*3
sb04md
*3
sb04qd
*3
sb10ad
*3
sb10dd
*3
sb10fd
*3
sb10hd
*3
sb10jd
*3
sb10yd
*3
sg02ad
*3
sg03ad
*3
sg03bd
*3

Status description:

  1. numpydoc docstring sections, fixed
  2. parameters data types, fixed and 1 fixed
  3. optional and default values, fixed and 2 fixed

@KybernetikJoKybernetikJo mentioned this pull request Aug 27, 2023
10 tasks
@bnavigatorbnavigator added this to the 0.6.0 milestone Aug 27, 2023
@KybernetikJo
KybernetikJoforce-pushed the numpydoc_synthesis_py branch 2 times, most recently from def6f95 to 8b21b5bCompareJanuary 7, 2024 14:26
@KybernetikJo

Copy link
Copy Markdown
ContributorAuthor

The test coverage drops, because the routine sb10jd has been added to init.py, but there is no pytest for it.

@KybernetikJo
KybernetikJo marked this pull request as ready for review January 7, 2024 16:19
@KybernetikJo
KybernetikJo marked this pull request as draft January 7, 2024 16:20
@KybernetikJo
KybernetikJo marked this pull request as ready for review January 7, 2024 16:25
@bnavigator

Copy link
Copy Markdown
Collaborator

The test coverage drops, because the routine sb10jd has been added to init.py, but there is no pytest for it.

It's actually because of the removal of the last :info = -i: from the docstrings:

The following block is not covered properly.

ifinfospec=="info = -i":
if'i'notincheckvars.keys():
continue
infospec_=infospec.replace(" = ", " == ")
try:
info_eval=eval(infospec_, checkvars)
exceptNameError:
raiseRuntimeError("Unknown variable in infospec: "
+infospec)
exceptSyntaxError:
raiseRuntimeError("Invalid infospec: "+infospec)

This is outside of the scope of this PR.

@bnavigator
bnavigator merged commit 70be09b into python-control:masterJan 7, 2024
@bnavigator

Copy link
Copy Markdown
Collaborator

Thanks a lot @KybernetikJo!

@KybernetikJo
KybernetikJo deleted the numpydoc_synthesis_py branch June 18, 2024 07:49
Sign up for freeto 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.

2 participants

@KybernetikJo@bnavigator