-
Notifications
You must be signed in to change notification settings - Fork 25
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
Redirect io #69
Redirect io #69
Conversation
@A-Gray-94 This begins to address some of what you were looking for in #57 |
I think the problem with |
Codecov Report
@@ Coverage Diff @@
## master #69 +/- ##
==========================================
- Coverage 28.21% 27.79% -0.43%
==========================================
Files 25 26 +1
Lines 2307 2342 +35
==========================================
Hits 651 651
- Misses 1656 1691 +35
Continue to review full report at Codecov.
|
I have been using this with both pyHyp and ADflow and they both are redirecting IO properly in a
The |
I think it could be beneficial to add something like this as an example in the function docstrings, I did not fully realize this was the way to call the function |
Not sure how to get the |
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.
We should bump the version here as well
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.
Looks pretty good. Some minor comments
Purpose
This PR moves the multipoint
redirectIO
function to baseclasses. It also includes a new function that allows the user to use awith
block that only redirects the IO during thewith
block. Both of these functions also have increased capability to split thestderr
andstdout
into different files if desired.Type of change
Testing
I added tests to the new
test_redirectIO.py
file. I think these are failing becausetestflo
is capturing output and messing with the file streams before the tests are run. I am not sure how we can get around. I have tested this with my own scripts locally and it seems to work.Checklist
flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted