Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Rename get_schema() (and helper functions) to schema() #263

Open
4 tasks
peterdesmet opened this issue Aug 29, 2024 · 1 comment
Open
4 tasks

Rename get_schema() (and helper functions) to schema() #263

peterdesmet opened this issue Aug 29, 2024 · 1 comment
Labels
function:get Functions get_schema(), get_resource()

Comments

@peterdesmet
Copy link
Member

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() to schema()
  • Deprecate get_schema()
  • Rename private function get_resource() to resource()
  • Change description for GitHub issue label function:get
@peterdesmet peterdesmet added the function:get Functions get_schema(), get_resource() label Aug 29, 2024
@PietrH
Copy link
Member

PietrH commented Aug 30, 2024

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
function:get Functions get_schema(), get_resource()
Projects
None yet
Development

No branches or pull requests

2 participants