pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.49k stars 1.04k forks source link

Use sphinx-codeautolink in docs? #7010

Open TomNicholas opened 1 year ago

TomNicholas commented 1 year ago

I'm a big fan of sphinx-codeautolink 🙂

_Originally posted by @Zac-HD in https://github.com/pydata/xarray/pull/6908#discussion_r963290657_

This looks cool, lets add it!

dcherian commented 1 year ago

I tried this with xarray-tutorial a few months ago (https://github.com/xarray-contrib/xarray-tutorial/pull/85) and it was quite frustrating: I kept hovering over things that didn't show popups. Though there's been some recent development, so perhaps its better now.

Did you try it out?

felix-hilden commented 1 year ago

Hi, I've indeed implemented links for assignment targets, bare names and annotated function arguments recently. The changes are still unreleased though, because I want to include match support in the same batch (felix-hilden/sphinx-codeautolink#110). Feel free to try "master" meanwhile, but I'll let you know when it's released 👍 (to stop this stalking and/or harassment, press 🚀)

dcherian commented 1 year ago

to stop this stalking and/or harassment,

Hi @felix-hilden I really appreciate your comments!

I love the idea of the package but just want to be conservative before rolling it out.

felix-hilden commented 1 year ago

Yeah I was just messing around 😄 Being conservative with random packages is advised. Buuut, 0.12 released just now with the extra links! Lemme know how it goes 👍

dcherian commented 5 days ago

FWIW scikit-image does this very well with underlined links making it clear what you can click on: https://scikit-image.org/docs/stable/auto_examples/segmentation/plot_regionprops.html