https://github.com/raybellwaves/compatsphinxext
https://github.com/raybellwaves/compatsphinxext
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/raybellwaves/compatsphinxext
- Owner: raybellwaves
- Created: 2024-05-08T18:15:25.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-11T23:52:06.000Z (11 months ago)
- Last Synced: 2025-02-01T11:41:25.279Z (4 months ago)
- Language: Shell
- Homepage: https://raybellwaves.github.io/compatsphinxext/
- Size: 2.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# compatsphinxext
Goal: Create a generic sphinx extention similar to https://github.com/rapidsai/cudf/blob/branch-24.06/docs/cudf/source/_ext/PandasCompat.py
That allows linking back to upstream API.
i.e. for cudf it can link to the API of pandas and for cugraph it can link to the API of networkx.
Host on rapids-community, Publish it on pypi then it can be used across cudf and cugraph.cudf and cugraph uses "numpydoc" (https://github.com/rapidsai/cudf/blob/branch-24.06/docs/cudf/source/conf.py#L72C6-L72C14)
The only file to touch is the make_files.sh.
Current if you try and add :meth:`pandas.DataFrame.rename` for example into pandas-compat you get
```
/workspaces/compatsphinxext/compatsphinxext.py:docstring of compatsphinxext.rename:19: WARNING: unknown node type: >Exception occurred:
File "/home/vscode/.local/lib/python3.12/site-packages/docutils/nodes.py", line 2027, in unknown_departure
raise NotImplementedError(
NotImplementedError: departing unknown node type: pending_xref
The full traceback has been saved in /tmp/sphinx-err-mvruu8cb.log, if you want to report the issue to the developers.
```I've got a first draft passing.
TODO:
- Add the source like into the Admonition like it is currently.
- Clean up code
- Add typing similar to the sphinx todo extention
- Copy paste classes to create a networkx-compat extention.
- If interst from RAPIDS folks, move to https://github.com/rapidsai-community
- Release
- Add to cudf and cugraph