-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update unit test for write_fhx() #166
Conversation
(1)`reshape2` is "retired" withthe recomendation to transition to `tidyr`. Updated dcast to pivot_wider, added @importFrom to function documentation, which passes to the NAMESPACE and required Imports in DESCRIPTION. (2) 'Standard' FHX2 files include a space between the data block and year. `write_fhx()` did not include that space. This did not cause problems for `read_fhx()` or any other outside program, but it made it difficult to error check the output of `write_fhx()`. `list_filestrongs()` now adds the space. My checks on the created FHX files all look fine. * test-io.R: Now checks for equal creation of an FHX file. And the years output from `list_filestrings()` is updated to the character vector.
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 looks great! Thanks so much for the update, @chguiterman.
One requested change before merging:
- Could you add a new bullet point in NEWS mentioning the new packages we depend on? If we require people to install new packages, I'd like that explicitly listed.
Thanks again! This is good stuff!
Good idea @brews -- got it. |
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 think this looks good! Thanks for the update. I'll merge away.
I'm updating also your main PR description to close the relevant issues.
Continuation of PR#162.
I found that the FHX files created by
write_fhx()
are slightly different from "standard" FHX2 files. The difference is a space between the data block and years column. I added this space to the output fromlist_filestrings()
because that function is only called bywrite_fhx()
. The year vector now includes a space, which more correctly formats the output FHX files.This addition facilitated an
expect_equal()
unit test forwrite_fhx()
that was previously being skipped.The newly formatted FHX file looked OK and read in fine with
read_fhx()
.Close #163.
Close #164.