-
Notifications
You must be signed in to change notification settings - Fork 208
[DOC] Fix Broken [Source] Link and Improve Documentation for suppress_output() #2677
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for contributing to
|
I plan to add test cases in a follow-up commit. |
Your examples are failing our tests currently. Please have a look through the logs and resolve. |
Hi, I am not getting why the test are failing could you please help me identify what might be going wrong? |
Hi, the doctest error message seems pretty clear to me. Are you checking the pytest log for the actions? |
I think the tests are failing because doctests is not able to capture |
I noticed that the broken source link issue is not limited to This was caused by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
Thanks a lot. Looking forward to keep contributing more! |
Suppressing only stdout: | ||
|
||
>>> import sys | ||
>>> sys.stderr = sys.stdout # Needed so doctest can capture stderr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem to be the case above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, sorry but I am not getting what you are saying, are you talking about sys.stderr = sys.stdout
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes. But checking again you do actually do it again above. If you do not include it is there just no output?
|
||
Suppressing only stdout: | ||
|
||
>>> import sys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These imports are a bit inconsistent. I think you only have to import it once?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will fix this.
Reference Issues/PRs
FIxes: #2642
What does this implement/fix? Explain your changes.
FIx Broken Source Link
inspect.unwrap()
to handle wrapped or decorated functions to get the original source.Improved function documentataion
Does your contribution introduce a new dependency? If yes, which one?
Any other comments?
PR checklist
For all contributions
For new estimators and functions
__maintainer__
at the top of relevant files and want to be contacted regarding its maintenance. Unmaintained files may be removed. This is for the full file, and you should not add yourself if you are just making minor changes or do not want to help maintain its contents.For developers with write access