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

Switch to pydocstring backend ? #33

Open
wizmer opened this issue Dec 15, 2021 · 6 comments
Open

Switch to pydocstring backend ? #33

wizmer opened this issue Dec 15, 2021 · 6 comments

Comments

@wizmer
Copy link
Contributor

wizmer commented Dec 15, 2021

Hi !

I have discovered the existence of https://github.com/robodair/pydocstring.
Instead of re-invented the wheel, I think it could be worth replacing the current sphinx-doc backend by the pydocstring one.
What do you think @naiquevin ?
I can make a proof of concept draft PR if necessary.

@wizmer
Copy link
Contributor Author

wizmer commented Jan 6, 2022

Hi @naiquevin , happy new year ! What do you think of my proposal ? I think using a real python backend to generate the docstring can be much more powerful than using the the elisp code we currently have. It can also handle more cases and also more styles (it currently supports google, numpy, reST).

@naiquevin
Copy link
Owner

Hi @wizmer Happy new year to you too. I missed your earlier message, sorry about that. I don't mind the change you are proposing. But IMO, it'd be good if the current implementation of generating docstring in elisp is also supported as a fallback in case pydocstring is not installed in the environment. What do you think?

@zzantares
Copy link

Have you guys considered pyment? seems more active project than pydocstring and IIUIC does the same thing isn't it?

@wizmer
Copy link
Contributor Author

wizmer commented Jan 14, 2022

@naiquevin Yes, I think keeping a fallback option would be nice.

@zzantares Thanks for your suggestion, I was not aware of pyment, it seems indeed more active and also more complete. I'll give it a try.

@timlod
Copy link

timlod commented Jan 18, 2022

On the emacs side of things there's also https://github.com/glyph/python-docstring-mode, unfortunately unmaintained currently.
Bringing it up because it's tangentially related. It also uses its own implementation. Perhaps there's room to build something that does both?

@wizmer
Copy link
Contributor Author

wizmer commented Jan 18, 2022

I have started refactoring pyment here dadadel/pyment#112
I also plan to enhance it and make it more customizable.

That will be for the backend side but when I'll be done with it, it will be time to think whether to integrate it in sphinx-doc or build a new package if it goes too much beyond sphinx-doc scope. Also, sphinx-doc name suggests that it is only for sphinx docstring while pyment is able to handle more styles.

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

No branches or pull requests

4 participants