Skip to content

Instructions to developers

Marc Choisy edited this page Aug 20, 2019 · 1 revision

Here are some "rules" to follow in order to harmonize the development of the package:

  • do not edit README.md: this file is automatically generated by pkgdown from the README.Rmd file. This means that whatever you write on this file will be deleted any time the package's website is rebuilt. Write on README.Rmd instead;
  • similarly, whatever is in the /docs folder is automatically generated by pkgdown, meaning that whatever you write there will be lost as soon as the website is rebuilt;
  • do not edit NAMESPACE: this file is automatically generated by roxygen2 at package's built, meaning that whatever you write on this file will be lost whenever the package is rebuilt;
  • write commits, issues, messages, etc... all in English;
  • whenever you make a commit an issue that fix an issue, make sure that you close the issue, pointing to the commit's ID in the closing message;
  • whenever you make a new issue, please make sure that it has not been done before by checking both open and closed issues;
  • whenever you make a new issue, please tag it and assign to somebody;
  • somebody assigned an issue should feel free to reassign to somebody else;
  • in case you're assigned an issue or a review together with somebody else, and if you decide to work on it, please indicate so in a message so that the other people assigned the same issue be informed;
  • please write clear, concise and easy-to-understand issues. Don't forget that, ideally, that should be understandable by anyone;
  • whenever you write an issue reporting a bug, please provide a minimal reproducible example;
  • before reporting a bug, make sure that you have (1) pulled from origin/master, (2) rebuilt the package locally and (3) cleaned the environment;
  • whenever you intend to modified a function, it has to pass all the test: do not change the behavior of this function without first having everyone's opinion;
  • try to use branches as much as you can and ask for review and pulling to somebody else. Quick fixes and changes can of course be pushed directly to master. Before you do a pull request of a branch and before you merge a branch, please
    • git pull origin master onto the branch you want to be pulled (or you want to merge);
    • clean your environment;
    • delete potential logs of previous build attempts;
    • rebuild the package;
    • check the package;
    • and resolve all potential problem locally on your branch before pushing to origin it and requesting a pull from origin master.
  • make as specific issues, commits and branches as possible. Never put 2 different unrelated things in a same issue, a same commit or a same branch.
  • whenever you merge a pull request that fix an issue, please don't forget to close the corresponding issue.
  • please don't forget to rebuild the website whenever you change the documentation. To do so, type .buildsite() at the command line. If this function is absent from your working environnement, you can generate it by typing source("building_package_and_website/buildsite.R") at the command line.
  • DO NOT edit the files of the folder inst/doc: the files are the vignettes and are generated automatically from the files in the folder vignettes.
Clone this wiki locally