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

Docs for members #27

Open
nyalldawson opened this issue Feb 4, 2019 · 6 comments
Open

Docs for members #27

nyalldawson opened this issue Feb 4, 2019 · 6 comments

Comments

@nyalldawson
Copy link

Looking into why https://qgis.org/pyqgis/3.4/core/Raster/QgsRasterHistogram.html has such poor docs, it's because the member variable documentation isn't transferred to sip docstrings.

This isn't currently supported by sip, but I think it should be possible. See https://stackoverflow.com/a/40488936/1861260

@3nids
Copy link
Member

3nids commented Feb 5, 2019

I think that SIP will return an error if you try to document a member, have you tested?
It might be possible to bring that to PyQt list and to see it fixed, but I guess this is not a trivial fix.

But anyway, this kind of class is not very common in the API. I have no strong opinion, but it seems we should try to stay coherent and offer setters/getters rather than making the members public. But it's maybe off-topic.

@nyalldawson
Copy link
Author

Yes, sip errors. I guess there's a lot of parts involved here -- sipify, pyqt, sphinx,... I'd be inclined to agree with you that's it's too much effort, but then.. I don't like missing nice stuff :p

@3nids
Copy link
Member

3nids commented Feb 5, 2019

sipify and sphinx are the easy parts ;) I'll be happy to tackle them if you do the SIP part.
Or just refactor the class with setters and getters (a V2 and implicit conversion)?

@nyalldawson
Copy link
Author

@3nids do you have a way to locally test the doc generation?

@3nids
Copy link
Member

3nids commented Feb 19, 2019

yes I do. There is also a build on any pull request on this repo, and the generated docs are accessible here https://qgis.org/pyqgis/master_temp/

@3nids
Copy link
Member

3nids commented Mar 5, 2019

I asked for enum on the list
https://www.riverbankcomputing.com/pipermail/pyqt/2019-March/041423.html

Another easier approach might be to create extra files with sipify and integrate them in sphinx.

3nids added a commit that referenced this issue Mar 8, 2019
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

2 participants