Skip to content

Missing source link#59549

Merged
mroeschke merged 7 commits into
pandas-dev:mainfrom
fbourgey:missing-source-link
Sep 6, 2024
Merged

Missing source link#59549
mroeschke merged 7 commits into
pandas-dev:mainfrom
fbourgey:missing-source-link

Conversation

@fbourgey

Copy link
Copy Markdown
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

WillAyd commented Aug 19, 2024

Copy link
Copy Markdown
Member

/preview

1 similar comment
@WillAyd

WillAyd commented Aug 19, 2024

Copy link
Copy Markdown
Member

/preview

@github-actions

Copy link
Copy Markdown
Contributor

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

@WillAyd

WillAyd commented Aug 19, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

fbourgey commented Aug 22, 2024

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor Author

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

Comment thread doc/source/reference/frame.rst
@mroeschke mroeschke added this to the 3.0 milestone Sep 6, 2024
@mroeschke mroeschke merged commit 352289b into pandas-dev:main Sep 6, 2024
@mroeschke

Copy link
Copy Markdown
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