python-control / Slycot

Python wrapper for the Subroutine Library in Systems and Control Theory (SLICOT)
Other
132 stars 42 forks source link

Change synthesis.py to numpydoc style #212

Closed KybernetikJo closed 9 months ago

KybernetikJo commented 1 year ago

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
  • [x]
*3
sb02md
  • [x]
*3
sb02mt
  • [x]
*3
sb02od
  • [x]
*3
sb03md
  • [x]
*3
sb03md57
  • [x]
*3
sb03od
  • [x]
*3
sb04md
  • [x]
*3
sb04qd
  • [x]
*3
sb10ad
  • [x]
*3
sb10dd
  • [x]
*3
sb10fd
  • [x]
*3
sb10hd
  • [x]
*3
sb10jd
  • [x]
*3
sb10yd
  • [x]
*3
sg02ad
  • [x]
*3
sg03ad
  • [x]
*3
sg03bd
  • [x]
*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 commented 9 months ago

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

bnavigator commented 9 months ago

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.

https://github.com/python-control/Slycot/blob/5b6587774fe51e51bdfbfb48285d797a6206a39b/slycot/exceptions.py#L104-L114

This is outside of the scope of this PR.

bnavigator commented 9 months ago

Thanks a lot @KybernetikJo!