ropensci / europepmc

R Interface to Europe PMC RESTful Web Service
https://docs.ropensci.org/europepmc
27 stars 8 forks source link

Improvements to code style #3

Closed njahn82 closed 6 years ago

njahn82 commented 8 years ago

From the onboarding review:

There are a few local package variables in use: supported_dbs and supported_semantic_types are used in one function each, and are defined in that function's file; supported_data_src is used in many functions, but defined in epmc_details.r. I'm not sure if there's an accepted best practice for this, but it seems it'd make more sense to either put these inside functions or put them in their own file, say supported.r.

njahn82 commented 8 years ago

I removed functions that are commonly used to utils.r I also started to dry out my code by defining the uri and the rest path in utils.r only. However, more can be done, including:

njahn82 commented 6 years ago

Will close it now because I feel that this ticket is too generic