Skip to content

Comments

Create pltHelperFunctions#130

Open
mariegosme wants to merge 2 commits intokevinwolz:masterfrom
mariegosme:patch-1
Open

Create pltHelperFunctions#130
mariegosme wants to merge 2 commits intokevinwolz:masterfrom
mariegosme:patch-1

Conversation

@mariegosme
Copy link
Collaborator

Functions to read, translate and compare crop parameter (plt) files between different versions of STICS (V5 and V8) and hi-sAFe (V1 and V>2.5) : fixes issues #32 and #28
I tried to comment the functions using Roxygen tags so that you can generate the help pages... but it's my first time with Roxygen so I may have made mistakes.
Warning: I translated the function names, argument names and warning messages from french to english, but I might have introduced erors in the code when doing that, so please tell me if you get bugs.

functions to read, translate and compare crop parameter (plt) files between different versions of STICS (V5 and V8) and hi-sAFe (V1 and V>2.5)
@kevinwolz
Copy link
Owner

@mariegosme, this is my first pull request (so exciting), so it might take me a while to go through this and merge it. Do you need this to happen quickly or do you not have a deadline?

changed newpltV2.5fromSTICSV8 to take into account the case where there are several cultivars in the STICS file (takes only the first one, with a warning)
@mariegosme
Copy link
Collaborator Author

no deadline.

actually it's an easy pull request: since it's a whole new file, there are no conflicts betwen existing files. Your work would just be to generate de help file from the Roxygen tags and somehow merge it with the package help

@Guillaume-Blanchet
Copy link

A comment so that @kevinwolz knows that Marie's script is not ready to be pulled yet : we discovered bugs for some functions that are not fixed yet. @mariegosme is working on it !

@kevinwolz
Copy link
Owner

Let me know when this is ready. I'm excited to try my first pull!

@kevinwolz
Copy link
Owner

One thing I'll request is that you try to make the formatting and documentation of these new functions as similar as possible to that of the rest of hisafer. I haven't produced a "style guide" for the package, but below are some of the basic criteria off the top of my head. You can also look at other hisafer R files for examples.

  • English-based variable and function names
  • Stylistic uniformity following http://adv-r.had.co.nz/Style.html
  • Simply code as much as possible using the tidyverse
  • If function names include multiple words smashed together, separate them with "_" rather than using camelCase.
  • Don't leave commented out lines of code in any functions. It can be tempting to leave these for future reference, but that's what git is for.
  • At the beginning of every function, all input parameters should be checked to make sure they are of the proper class, length, value, etc, with informative error message provided in English.
  • Whenever you call an internal function, argument names should be used when passing all arguments (I haven't been the best on this in the rest of hisafer...it should really be cleaned up a bit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants