IAMconsortium / pyam

Analysis & visualization of energy & climate scenarios
https://pyam-iamc.readthedocs.io/
Apache License 2.0
227 stars 118 forks source link

Avoid misleading attribute-reference in iiasa.Connection docstring #800

Closed danielhuppmann closed 10 months ago

danielhuppmann commented 10 months ago

Description of PR

Per an observation by @Rlamboll, the current docstring of the iiasa.Connection class is misleading because it states

See pyam.iiasa.Connection.valid_connections for a list of available APIs.

when a user actually has to do pyam.iiasa.Connection().valid_connections.

This PR changes the docstring to only show the attribute-name in the docstring (instead of pyam.iiasa...) while maintaining a functioning link to the docs of that attribute.

codecov[bot] commented 10 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (f6eb201) 94.7% compared to head (0990ddc) 94.7%.

:exclamation: Current head 0990ddc differs from pull request most recent head 9afc8d0. Consider uploading reports for the commit 9afc8d0 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #800 +/- ## ===================================== Coverage 94.7% 94.7% ===================================== Files 62 62 Lines 5999 5999 ===================================== Hits 5683 5683 Misses 316 316 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Rlamboll commented 10 months ago

This works, but read_iiasa and lazy_read_iiasa have basically identical docstrings with the same problem (and you aren't referring to attributes of that class there).