Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1085 +/- ##
==========================================
+ Coverage 68.00% 68.80% +0.79%
==========================================
Files 404 407 +3
Lines 12935 13690 +755
Branches 1392 1543 +151
==========================================
+ Hits 8797 9419 +622
- Misses 4138 4271 +133 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks for this @fiolj. Would you mind reverting the changes not related to the implementation? (styling) There are too many and it renders difficult to read through the PR. You can check the style_guide for info https://github.com/fortran-lang/stdlib/blob/master/STYLE_GUIDE.md One thing, white spaces in-between parentheses and an intrinsic function are not recommended ( |
|
Thanks @jalvesz, I've fixed the formatting |
|
Reviewing the arguments of Currently, we have the order of |
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
|
In my opinion it has converged, I would be happy to make changes if necessary. Could we get a new review and try to complete the task and merge this PR? |
src/io/stdlib_io.fypp
Outdated
| #:else | ||
| inquire (unit=unit, opened=opened) | ||
| if(.not. opened) then | ||
| write (msgout,'(a,i0,a)') 'savetxt error: unit ',unit,' not open' |
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
|
Thanks @jvdp1 for the review.
|
Added: - comments with intent of variable `fout` - stop the program if unit file is not open - clean-up comments
Added clarification of use with filename and unit. Also added an example
|
I've updated the specs to clarify the behavior when the file already exists (as suggested in the discussion thread):
|
I've been thinking on the suggestion on the the discussion thread) about consistency of the arguments. The use of an additional argument Syntax
Arguments...
The only problem that I can see is that when used with an unit number, the function will always be modifying the position of the file (to the beginning or the end). In the previous version the user could in principle position it arbitrarily. Thoughts, preferences? |
|
Hi, I've reverted some of the changes, to the previous version, removing the |
Co-authored-by: José Alves <102541118+jalvesz@users.noreply.github.com>
Co-authored-by: José Alves <102541118+jalvesz@users.noreply.github.com>
Co-authored-by: José Alves <102541118+jalvesz@users.noreply.github.com>
This PR aims to add optional arguments to
savetxt, that behave similar to numpy's savetxt.This is associated with Issue 263 and this discussion thread.
It add the possibility of supplying the unit of an open file instead of a filename (which could be used for
output_unitfor instance)This implementation is quite simple. The main changes are: