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

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

Merged

Conversation

danielhuppmann
Copy link
Member

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.

@danielhuppmann danielhuppmann self-assigned this Nov 18, 2023
Copy link

codecov bot commented Nov 18, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

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

❗ 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
@@          Coverage Diff          @@
##            main    #800   +/-   ##
=====================================
  Coverage   94.7%   94.7%           
=====================================
  Files         62      62           
  Lines       5999    5999           
=====================================
  Hits        5683    5683           
  Misses       316     316           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Rlamboll
Copy link
Collaborator

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).

Copy link
Collaborator

@Rlamboll Rlamboll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope people will understand it better this way! Thanks!

@danielhuppmann danielhuppmann merged commit 95ebfce into IAMconsortium:main Nov 21, 2023
9 checks passed
@danielhuppmann danielhuppmann deleted the docs/valid_connections branch November 21, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants