Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change synthesis.py to numpydoc style #212

Merged

Conversation

KybernetikJo
Copy link
Contributor

@KybernetikJo KybernetikJo commented Aug 27, 2023

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 name Finished Status 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

@KybernetikJo
Copy link
Contributor Author

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
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.

Slycot/slycot/exceptions.py

Lines 104 to 114 in 5b65877

if infospec == "info = -i":
if 'i' not in checkvars.keys():
continue
infospec_ = infospec.replace(" = ", " == ")
try:
info_eval = eval(infospec_, checkvars)
except NameError:
raise RuntimeError("Unknown variable in infospec: "
+ infospec)
except SyntaxError:
raise RuntimeError("Invalid infospec: " + infospec)

This is outside of the scope of this PR.

@bnavigator bnavigator merged commit 70be09b into python-control:master Jan 7, 2024
47 of 80 checks passed
@bnavigator
Copy link
Collaborator

Thanks a lot @KybernetikJo!

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.

None yet

2 participants