Arrays#297
Merged
Merged
Conversation
To avoid: Caused by error in `enc2utf8()`: ! argument is not a character vector
To avoid: Caused by error in `enc2utf8()`: ! argument is not a character vector
To avoid error by readr::col_factor() `! `levels` must be `NULL` or a character vector:` `- `levels` is a 'list'`
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 23 23
Lines 670 672 +2
=========================================
+ Hits 670 672 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
The fix is tested with 2 acoustic Camtrap DP: camera-traps/bioacoustics#30 |
- This is a good test that single-value arrays are retained as is. - For v2 I had to switch the value/label example to the first resource.
peterdesmet
approved these changes
Jun 18, 2026
peterdesmet
left a comment
Member
There was a problem hiding this comment.
Good to have this fixed! I made a number of important changes:
- I've updated the example dataset so that the
missingValuesof the second resource are a single-element array. That way, we can capture the updated behaviour where such elements are retained with the testwrite_package() writes unaltered datapackage.json as is. enumis now always written as a list. Before, single elementenum(very rare!) would be written as"enum": "value"which is incorrect. Did not create a test, as it's really an edge case (that is now resolved).- I've described in NEWS that multiple
pathandmissingValueswill now be written on multiple lines. This will affect us when working with the bird-tracking datapackage.json files. 😁
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes #276 .