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

Missing source link #59549

Merged
merged 7 commits into from
Sep 6, 2024
Merged

Missing source link #59549

merged 7 commits into from
Sep 6, 2024

Conversation

fbourgey
Copy link
Contributor

The source link located at the upper right-hand side of DataFrame.index and DataFrame.columns is still missing. This may be because they do not have any code.

DataFrame.index and DataFrame.columns are properties.AxisProperty

I still merged the two Axes sections in the .rst file after discussing with @WillAyd

The same thing exists for Series.index

@WillAyd
Copy link
Member

WillAyd commented Aug 19, 2024

/preview

1 similar comment
@WillAyd
Copy link
Member

WillAyd commented Aug 19, 2024

/preview

Copy link
Contributor

Website preview of this PR available at: https://pandas.pydata.org/preview/pandas-dev/pandas/59549/

@WillAyd
Copy link
Member

WillAyd commented Aug 19, 2024

From the preview link I don't think this did anything:

https://pandas.pydata.org/preview/pandas-dev/pandas/59549/docs/reference/api/pandas.DataFrame.index.html

May also just be because these items are class attributes and not properties.

I'm not entirely sure how the docs generate the source link - @mroeschke do you know what tool does that and/or how it works?

@mroeschke
Copy link
Member

They are generated via Sphinx through this extension I presume, but I've never played around with it https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html#confval-linkcode_resolve

@fbourgey
Copy link
Contributor Author

From the preview link I don't think this did anything:

https://pandas.pydata.org/preview/pandas-dev/pandas/59549/docs/reference/api/pandas.DataFrame.index.html

May also just be because these items are class attributes and not properties.

I'm not entirely sure how the docs generate the source link - @mroeschke do you know what tool does that and/or how it works?

This only added a "See also" section for pandas.DataFrame.columns.

@fbourgey
Copy link
Contributor Author

@WillAyd @mroeschke Ideally, do we want the source link to point to this or as Will said as DataFrame.columns has no code, there is no need to have a source link?

@mroeschke
Copy link
Member

There ideally should be a source link to your reference, but there might be some extra Sphinx code needed to find that reference

@fbourgey
Copy link
Contributor Author

fbourgey commented Aug 22, 2024

It seems that Sphinx does not support .pyi files (see here and here and also here)

pandas.DataFrame.columns is a pandas._libs.properties.AxisProperty located here

The same thing exists for pandas.Interval for which the source link is missing as well. It is defined here

Should we close this issue then?

@fbourgey
Copy link
Contributor Author

Nonetheless, I slightly updated the pandas.DataFrame.columns doc (added a Return and See also section)

@mroeschke mroeschke added this to the 3.0 milestone Sep 6, 2024
@mroeschke mroeschke merged commit 352289b into pandas-dev:main Sep 6, 2024
47 checks passed
@mroeschke
Copy link
Member

Thanks @fbourgey

@fbourgey fbourgey deleted the missing-source-link branch September 6, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Missing Source Links
4 participants