sdk icon indicating copy to clipboard operation
sdk copied to clipboard

docs: Classes reference `source` links broken

Open ReubenFrankel opened this issue 1 year ago • 2 comments

Documentation type

Reference

Description

Not sure if this is the case for all source links, just all the ones I've checked direct to https://github.com/meltano/sdk/blob/main/singer_sdk/init.py.

For example: https://sdk.meltano.com/en/latest/classes/singer_sdk.RESTStream.html#singer_sdk.RESTStream.get_records - I expect this to go to https://github.com/meltano/sdk/blob/2e5567a4a5e2bbf3fa276c65aeb74b00aa749572/singer_sdk/streams/rest.py#L571, or at least https://github.com/meltano/sdk/blob/main/singer_sdk/streams/rest.py.

ReubenFrankel avatar Jun 13 '24 16:06 ReubenFrankel

Thanks for logging!

I think the issue is the auto-generated API docs for that class are coming from singer_sdk.RESTStream (i.e. where it's imported) instead of singer_sdk.streams.rest.RESTStream (where it's defined).

I'll try to take a quick dive through the Sphinx docs next week to see if there's a way to work around that, or if we need to update the currentmodule setting in https://github.com/meltano/sdk/blob/main/docs/reference.rst without breaking the https://sdk.meltano.com/en/latest/classes/singer_sdk.RESTStream.html URL...

NB it might still be hard to link to a specific line in the source code. Though, there's a workaround in https://github.com/sphinx-doc/sphinx/issues/1556 that might be worth exploring.

edgarrmondragon avatar Jun 14 '24 21:06 edgarrmondragon

NB it might still be hard to link to a specific line in the source code. Though, there's a workaround in sphinx-doc/sphinx#1556 that might be worth exploring.

I'm not sure what it did originally - if it is difficult, just the file is fine IMO.

ReubenFrankel avatar Jun 14 '24 22:06 ReubenFrankel