You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know whether to create this issue here or in the nbdev repo. As an enhancement proposal, it would be great to be able to generate .py modules with numpy docstrings, from the original notebooks that have docments, and then convert back if someone edits the docstring in the .py module, something like:
Original notebook:
defadd (x: int, # First summand.y: int, # Second summand.
): int# Result of adding `x` and `y`."Adds x and y"returna+b
Generated .py module:
defadd (x: int,
y: int,
): int""" Adds x and y. Parameters ---------- x: int First summand. y: int Second summand. Returns ------- int Result of adding `x` and `y`. """returna+b
We modify the docstring in the .py module:
defadd (x: int,
y: int,
): int""" Adds integer x and integer y. Parameters ---------- x: int First number to add. y: int Second number to add. Returns ------- int Result of adding `x` and `y`. """returna+b
Convert back to notebook with docment syntax:
defadd (x: int, # First number to add.y: int, # Second number to add.
): int# Result of adding `x` and `y`."Adds integer x and integer y."returna+b
It seems this is not difficult to do with the current functionality, is this something that would be interesting for the team?
Thank you very much for your awesome work.
The text was updated successfully, but these errors were encountered:
I don't know whether to create this issue here or in the
nbdev
repo. As an enhancement proposal, it would be great to be able to generate .py modules with numpy docstrings, from the original notebooks that have docments, and then convert back if someone edits the docstring in the .py module, something like:Original notebook:
Generated .py module:
We modify the docstring in the .py module:
Convert back to notebook with docment syntax:
It seems this is not difficult to do with the current functionality, is this something that would be interesting for the team?
Thank you very much for your awesome work.
The text was updated successfully, but these errors were encountered: