meltano/sdk

docs: Classes reference `source` links broken

Opened this issue · 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

def get_records(self, context: Context | None) -> t.Iterable[dict[str, t.Any]]:
, or at least https://github.com/meltano/sdk/blob/main/singer_sdk/streams/rest.py.

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 sphinx-doc/sphinx#1556 that might be worth exploring.

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.