Create add_properties() function - #382
Merged
Merged
Conversation
- Rename - Move checking to the helper function (we'll need it again later) - Allow trailing ,
- Drop phrasing that frictionless does not support manipulation functions - In data-resource, order manipulation functions as `add_properties()`, `add_resource()`, `remove_resource()`
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #382 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 28 29 +1
Lines 827 833 +6
=========================================
+ Hits 827 833 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sannegovaert
requested changes
Sep 17, 2026
sannegovaert
left a comment
Contributor
There was a problem hiding this comment.
I really like add_properties(), it is so elegant!
| #' position of the added element. | ||
| #' | ||
| #' `add_resource()` also supports adding metadata properties to a Data Resource, | ||
| #' and checks for reserved properties. |
Contributor
There was a problem hiding this comment.
What do you mean with reserved?
Member
Author
There was a problem hiding this comment.
Properties that are automatically set by add_resource(). Would the following be clearer?
add_resource()also supports adding metadata properties to a Data Resource, except those automatically set by that function.
Co-authored-by: Sanne Govaert <44606923+sannegovaert@users.noreply.github.com>
sannegovaert
approved these changes
Sep 17, 2026
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 function is the result of a discussion on how to best support an
append()-like function. This implementation has several advantages:append()append()functionality and arguments. E.g. the to-be-added elements are not provided in a single argumentvaluesbut in...Implementation details
...are not named. This is done with helper functioncheck_dots()(a renamedget_dot_names()) which is also used byadd_resource()append_with_attributes(). Many of its tests were kept.append()example in frictionless.Rmd replaced.Relation to issues
add_metadata()oradd_property()#48append()drops customdatapackageclass #198