-
Notifications
You must be signed in to change notification settings - Fork 11
Rename functions #282
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
base: main
Are you sure you want to change the base?
Rename functions #282
Conversation
get_resource() does not need to be deprecated as it is not a public function
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #282 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 23 +1
Lines 638 650 +12
=========================================
+ Hits 638 650 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Right, I forgot tests for my deprecated functions. Will add that. |
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.
Good work. Everything done as it should by using lifecycle R package both in functions and in tests. 👍
Fix #263
Our functions all start with a verb, which makes sense, because they perform an action (read, create, remove).
That is less the case for accessor functions (which have a generic "get"). That is why it's more intuitive to just call them after the thing, e.g.
schema()
rather thanget_schema()
. We already did this withresources()
, which is better namedresource_names()
as that is what it returns. Future accessor functions could includeversion()
.This PR therefore renames:
get_schema()
→schema()
: a public accessor function => deprecationresources()
→resource_names()
: a publicreadaccessor function => deprecationget_resource()
→resource()
: a private accessor function => no deprecationThe filename for
print.R
is also renamed toprint.datapackage.R
in preparation for print functions forschema()
andresource()
.