Closed amnona closed 6 years ago
Dear Amnona,
thanks for asking and especially for using my software! Although I of course recommend, that you keep it as a separate package, you have the permission to include the code in your repository and change the license. However, I kindly ask you to include the source repository (https://github.com/Chilipp/docrep) as well as a note about the original license in the documentation of the code. E.g.
This module is a copy of the docrep module version 0.2.1 (https://github.com/Chilipp/docrep), that is originally published under the GNU General Public License version 2 (https://opensource.org/licenses/GPL-2.0).
Thanks! We need to fork/copy it since our documentation does not totally follow the numpydoc standard (different section names, etc.). We opted to incorporate into the project to make our installation easier. We will of course include the link to the source repo and the original docrep license and credits :)
Thanks a lot Amnon
You're welcome! I saw your discussion in the pull request (https://github.com/biocore/calour/pull/82) and as far as I got it, your only problem is, that you use Other parameters instead of Other Parameters. But if that is your only change, you can also just subclass the DocstringProcessor. I had the same issue in my psyplot project where I did want to introduce a new section named "Possible types". But the solution (https://github.com/Chilipp/psyplot/blob/fe1e503b9ebc9c6bd047a86850a4c7bae0b112cf/psyplot/docstring.py#L48) was pretty simple.
So in your case, the solution would just be to make
from docrep import DocstringProcessor as DocrepDocstringProcessor
class DocstringProcessor(DocrepDocstringProcessor):
param_like_sections = DocrepDocstringProcessor.param_like_sections + ['Other parameters']
def get_sections(self, s, base, sections=['Parameters', 'Other parameters']):
return super(DocstringProcessor, self).get_sections(self, s, base, sections)
But as I said, if it is more convenient for you to copy the entire module, please feel free to do so.
Best, Philipp
Thanks! This is a cool solution :) (and psyplot looks interesting as well!)
You're welcome, thanks! I will close this issue then, but you can of course just reopen it, in case there is more to it.
Best, Philipp
Will it be ok to copy the code and modify/use it in a BSD 3 license program we are developing (calour)?