Qepanna / goFlux

goFlux: A user-friendly way to calculate GHG fluxes yourself, regardless of user experience
https://qepanna.quarto.pub/goflux/
GNU General Public License v2.0
18 stars 5 forks source link

Sugestion: use consistent and explanatory names #4

Closed Schuch666 closed 5 months ago

Schuch666 commented 5 months ago

There are no consistence on the naming of the functions: some functions uses best.flux (with a dot) flux2pdf (a number), goFlux (a capital letter), EGM5_import (using underline) and goFlux_nokmax (using an underline and a capital letter). I suggest that you rename these files to match with only one naming standard.

For the functions for specific instruments: some cases the names are not very informative to the user for LI7820_imp (this is a dataset from LI7820 instrument), and for other cases change the order LI7820_import to import_LI7820 make more sense in the organization of the documentation and help to write the code (but this is up to you to change or not).

Qepanna commented 5 months ago

Dear @Schuch666, I agree that some functions should be renamed. However, I am worried that renaming nearly all functions to one style would be a problem for some current users. I know that many users of this package are new to R and I hope that I can find a way to make this transition easy for them. I know I can modify a function's name while still keeping it and return a message saying that the function name has changed and the previous name will be deprecated, but I have yet to learn how to do that. Solving this issue will take some time.

I suggest modifying the import functions, and changing the order as you suggested, since that would improve organization of the documentation, as you mentioned. I would also use a dot instead of an underline (e.g. import.LI7820). As for the rest, I would keep the different naming styles (capital letter, dot and number).

Regarding the function goFlux_nokmax, it is not an official function described anywhere. The purpose of that function is for demonstration only (e.g. teaching), to show how controlling for the k.max parameter in the Hutchinson and Mosier model really helps to improve the calculation of small fluxes. I will rename it to goFlux.nokmax to get rid of underlines everywhere in the package.

Finally, regarding the datasets, I will change the order and replace the underline with a dot as well (e.g. imp.LI7820). However, I do not understand your comment about the name of the dataset not being informative enough. Is it because the name is too close to the associated import function (import.LI7820)?

Thank you for your suggestion. I agree that consistency is important.

Qepanna commented 5 months ago

@Schuch666