ropensci / chopin

Computation of Spatial Data by Hierarchical and Objective Partitioning of Inputs for Parallel Processing
https://niehs.github.io/chopin/
Other
12 stars 2 forks source link

Renaming functions #47

Closed sigmafelix closed 9 months ago

sigmafelix commented 10 months ago

Some functions, distribute_* in particular, give lint errors of variable names no longer than 30 characters. As rOpenSci requires a submission to pass lint checks, abbreviation of these function names is necessary. Naming conventions to consider are:

  1. {object type}_{function name} as seen in sf functions (st_*) or stringi functions (stri_*)
  2. Abbreviated not to overlap other generic function names as seen in terra (e.g., vect, rast, etc.)
  3. {function group}_{function name}_{specific use case}: currently used, but will get shorter group and function names

Perhaps distribute_* are too verbose, so I am thinking of using par to represent parallelization (as parallel functions' par* naming).

distribute_process_grid to pargrid or par_grid or parGrid

kyle-messier commented 10 months ago

@sigmafelix we can always make our own lints for naming. If you are able to come up with a clear naming convention that fits the default linters, then great. Otherwise, we can create a style. For example, the cf-naming conventions have a defined style that results in long variable or function names

sigmafelix commented 9 months ago

@Spatiotemporal-Exposures-and-Toxicology Yes we can keep our own lints in this repo, but not sure if ROpenSci review system will accept user-defined linting rules. The function names are mostly changed for shorter names and function organization. Will make a PR for the changes soon.