Skip to content
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

Consider standardizing the way functions are named #31

Closed
wlandau opened this issue Jul 2, 2018 · 2 comments
Closed

Consider standardizing the way functions are named #31

wlandau opened this issue Jul 2, 2018 · 2 comments

Comments

@wlandau
Copy link
Member

wlandau commented Jul 2, 2018

Some exported functions are snake case

  • construct_yml_config()
  • datapackager_object_read

Others are camel case

  • dataVersion()
  • keepDataObjects()

And one has a dot as the delimiter.

  • datapackage.skeleton()

Please consider changing these names to a single convention. Snake case is usually recommended, but the important thing here is to be consistent. Another reason I recommend snake case is that most of your exported functions already use it. The usual practice is to smoothly deprecate old functions and point users to new ones, but since DataPackageR is not on CRAN yet, I do not think it is a big deal if you just rename the affected functions.

@wlandau
Copy link
Member Author

wlandau commented Jul 2, 2018

On second thought, maybe it is better if you deprecate and rename functions smoothly. rOpenSci has recommendations on this:

gfinak added a commit that referenced this issue Jul 2, 2018
… based config.

- #31
- update doc
- remove test case for this function.
gfinak added a commit that referenced this issue Jul 2, 2018
gfinak added a commit that referenced this issue Jul 2, 2018
- rename datapacakge.skeleton to datapackage_skeleton
- add examples to datapackage_skeleton
- add examples to package_build
- add examples to data_version
- add examples to datapackager_object_read
keepDataObjects removed in 100f340
- fix renaming of functions so warnings only appear when old names are called
- update docs
- update tests
@wlandau
Copy link
Member Author

wlandau commented Jul 6, 2018

Solved.

@wlandau wlandau closed this as completed Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants