h3-py icon indicating copy to clipboard operation
h3-py copied to clipboard

Python API Reference

Open jmccartin opened this issue 3 years ago • 4 comments

The core project has a good set of documentation about the API methods, which are linked from this project's README. However, there are at least a couple of issues that frustrate a Python user:

  • the API documentation endpoints are camelCase, whereas the Python endpoints are snake_case
  • some of the types in the existing documentation are very much C-specific. Some Python equivalents wouldn't go amiss

Is there any plan for a Python-specific API reference, or could the endpoints be changed to matched that of the C ones? The latter would be a breaking change, so isn't desirable. Other projects (such as Apache Spark) have gone with the method of copying the case convention when making bindings for Python for ease of documentation, however.

jmccartin avatar Mar 08 '21 11:03 jmccartin

Yes! I am (slowly) trying to put together Python-specific documentation.

You can see the current state of things at https://ajfriend.github.io/h3-py-docs/intro.html, with the source here: https://github.com/ajfriend/h3-py-docs

Just note that this is still very much an experimental work in progress, and that link will probably not be the location for the finalized docs; it is just a spot for me to try to get things working.

I try to work on it when I can, but could definitely use and would appreciate any help if folks are looking to contribute!

ajfriend avatar Mar 12 '21 06:03 ajfriend

That looks great! Are you planning on keeping that as a separate repository long term or fold it into this repo at some point?

kylebarron avatar Mar 30 '21 16:03 kylebarron

@isaacbrodsky is working on redoing the entire h3geo.org website so that the usage documentation for the uber-maintained bindings will also live there. So I think @ajfriend 's docs will be used as reference for that merging of docs.

dfellis avatar Mar 30 '21 18:03 dfellis

Part of the remaining work is to convert all the function docstrings to a form that will parse properly. I'm using numpy style for the docs listed above; @isaacbrodsky do you know if your documentation solution can parse python docstrings in numpy style?

ajfriend avatar Mar 30 '21 18:03 ajfriend