frictionless-r
frictionless-r copied to clipboard
Rename `get_schema()` (and helper functions) to `schema()`
With #262 we plan to introduce a version(), a function that doesn't start with a verb. This is similar to some camtrapdp functions (version(), deployments(), etc.). The functions have the advantage that they can have an equivalent set function version()<-.
Frictionless currently has other verb-less functions, mainly resources() (and also example_package() and the private locale(), col_types(), ...).
For consistency, I think we then need:
version() # new
version()<- # new
resources()
schema() # currently not the case
create_schema() # creates a schema from a data frame, doesn't "get" it
The alternative is:
get_version() # new
set_version() # new
get_resources() # currently not the case
get_schema()
create_schema() # creates a schema from a data frame, doesn't "get" it
That alternative is less appealing to me. @PietrH @sannegovaert @damianooldoni thoughts?
If we implement this:
- [ ] Rename
get_schema()toschema() - [ ] Deprecate
get_schema() - [ ] Rename private function
get_resource()toresource() - [ ] Change description for GitHub issue label
function:get
I don't think we need to rename internal helpers, it's to our benefit that we avoid collisions there as much as possible. I have no issue with renaming get_schema() and get_resource(), but if we are retooling completely for a v2, then maybe we should consider packaging the frictionless object in such a way that these functions aren't needed for users to access these properties.