|
| 1 | +# Contribute to NVIpjsr |
| 2 | + |
| 3 | +<!-- CONTRIBUTING.md and ./vignettes/Contribute_to_NVIpkg.Rmd. are generated |
| 4 | + from ./templates/Contribute_to_NVIpkg.Rmd in NVIpackager. |
| 5 | + Please edit that file --> |
| 6 | + |
| 7 | +Thank you for considering contributing to `NVIpjsr`. |
| 8 | + |
| 9 | +`NVIpjsr` is one of several packages assembled under the name |
| 10 | +`NVIverse`, a collection of R-packages with tools to facilitate data |
| 11 | +management and data reporting at the Norwegian Veterinary Institute |
| 12 | +(NVI). |
| 13 | + |
| 14 | +### NVIverse packages |
| 15 | + |
| 16 | +<table> |
| 17 | +<colgroup> |
| 18 | +<col style="width: 13%" /> |
| 19 | +<col style="width: 8%" /> |
| 20 | +<col style="width: 78%" /> |
| 21 | +</colgroup> |
| 22 | +<thead> |
| 23 | +<tr class="header"> |
| 24 | +<th style="text-align: left;">Package</th> |
| 25 | +<th style="text-align: left;">Status</th> |
| 26 | +<th style="text-align: left;">Description</th> |
| 27 | +</tr> |
| 28 | +</thead> |
| 29 | +<tbody> |
| 30 | +<tr class="odd"> |
| 31 | +<td style="text-align: left;">NVIconfig</td> |
| 32 | +<td style="text-align: left;">Private</td> |
| 33 | +<td style="text-align: left;">Configuration information necessary for |
| 34 | +some NVIverse functions</td> |
| 35 | +</tr> |
| 36 | +<tr class="even"> |
| 37 | +<td style="text-align: left;">NVIdb</td> |
| 38 | +<td style="text-align: left;">Public</td> |
| 39 | +<td style="text-align: left;">Tools to facilitate the use of NVI’s |
| 40 | +databases</td> |
| 41 | +</tr> |
| 42 | +<tr class="odd"> |
| 43 | +<td style="text-align: left;">NVIpjsr</td> |
| 44 | +<td style="text-align: left;">Public</td> |
| 45 | +<td style="text-align: left;">Tools to facilitate working with PJS |
| 46 | +data</td> |
| 47 | +</tr> |
| 48 | +<tr class="even"> |
| 49 | +<td style="text-align: left;">NVIspatial</td> |
| 50 | +<td style="text-align: left;">Public</td> |
| 51 | +<td style="text-align: left;">Tools to facilitate working with spatial |
| 52 | +data at NVI</td> |
| 53 | +</tr> |
| 54 | +<tr class="odd"> |
| 55 | +<td style="text-align: left;">NVIpretty</td> |
| 56 | +<td style="text-align: left;">Public</td> |
| 57 | +<td style="text-align: left;">Tools to make R-output pretty in accord |
| 58 | +with NVI’s graphical profile</td> |
| 59 | +</tr> |
| 60 | +<tr class="even"> |
| 61 | +<td style="text-align: left;">NVIbatch</td> |
| 62 | +<td style="text-align: left;">Public</td> |
| 63 | +<td style="text-align: left;">Tools to facilitate the running of |
| 64 | +R-scripts in batch mode at NVI</td> |
| 65 | +</tr> |
| 66 | +<tr class="odd"> |
| 67 | +<td style="text-align: left;">OKplan</td> |
| 68 | +<td style="text-align: left;">Public</td> |
| 69 | +<td style="text-align: left;">Tools to facilitate the planning of |
| 70 | +surveillance programmes for the NFSA</td> |
| 71 | +</tr> |
| 72 | +<tr class="even"> |
| 73 | +<td style="text-align: left;">OKcheck</td> |
| 74 | +<td style="text-align: left;">Public</td> |
| 75 | +<td style="text-align: left;">Tools to facilitate checking of data from |
| 76 | +national surveillance programmes</td> |
| 77 | +</tr> |
| 78 | +<tr class="odd"> |
| 79 | +<td style="text-align: left;">NVIcheckmate</td> |
| 80 | +<td style="text-align: left;">Public</td> |
| 81 | +<td style="text-align: left;">Extension of checkmate with argument |
| 82 | +checking adapted for NVIverse</td> |
| 83 | +</tr> |
| 84 | +<tr class="even"> |
| 85 | +<td style="text-align: left;">NVIpackager</td> |
| 86 | +<td style="text-align: left;">Public</td> |
| 87 | +<td style="text-align: left;">Tools to facilitate the development of |
| 88 | +NVIverse packages</td> |
| 89 | +</tr> |
| 90 | +<tr class="odd"> |
| 91 | +<td style="text-align: left;">NVIrpackages</td> |
| 92 | +<td style="text-align: left;">Public</td> |
| 93 | +<td style="text-align: left;">Keeps a table of the R packages in |
| 94 | +NVIverse</td> |
| 95 | +</tr> |
| 96 | +</tbody> |
| 97 | +</table> |
| 98 | + |
| 99 | +## How you can contribute |
| 100 | + |
| 101 | +There are several ways you can contribute to this project: ask a |
| 102 | +question, propose an idea, report a bug, improve the documentation, or |
| 103 | +contribute code. |
| 104 | + |
| 105 | +### Ask a question |
| 106 | + |
| 107 | +Using `NVIpjsr` and need help? Browse the package help to see if you can |
| 108 | +find a solution. Still problems? Post your question in R-forum at |
| 109 | +workplace or contact the package maintainer by |
| 110 | +[email](mailto:petter.hopp@vetinst.no). |
| 111 | + |
| 112 | +### Propose an idea |
| 113 | + |
| 114 | +Have an idea for a new `NVIpjsr` feature? Take a look at the `NVIpjsr` |
| 115 | +help and [issue |
| 116 | +list](https://github.com/NorwegianVeterinaryInstitute/NVIpjsr/issues) to |
| 117 | +see if it isn’t included or suggested yet. If not, suggest your idea as |
| 118 | +an [issue on |
| 119 | +GitHub](https://github.com/NorwegianVeterinaryInstitute/NVIpjsr/issues/new). |
| 120 | +While we can’t promise to implement your idea, it helps to: |
| 121 | + |
| 122 | +- Explain in detail how it would work. |
| 123 | +- Keep the scope as narrow as possible. |
| 124 | + |
| 125 | +See below if you want to contribute code for your idea as well. |
| 126 | + |
| 127 | +### Report a bug |
| 128 | + |
| 129 | +Using `NVIpjsr` and discovered a bug? Don’t let others have the same |
| 130 | +experience and report it as an [issue on |
| 131 | +GitHub](https://github.com/NorwegianVeterinaryInstitute/NVIpjsr/issues/new) |
| 132 | +so we can fix it. A good bug report makes it easier for us to do so, so |
| 133 | +please include: |
| 134 | + |
| 135 | +- Any details about your local setup that might be helpful in |
| 136 | + troubleshooting. |
| 137 | +- Detailed steps to reproduce the bug. |
| 138 | + |
| 139 | +### Improve the documentation |
| 140 | + |
| 141 | +Noticed a typo on the function help? Think a function could use a better |
| 142 | +example? Good documentation makes all the difference, so your help to |
| 143 | +improve it is very welcome! |
| 144 | + |
| 145 | +Functions are described as comments near their code and translated to |
| 146 | +documentation using [`roxygen2`](https://klutometis.github.io/roxygen/). |
| 147 | +If you want to improve a function description: |
| 148 | + |
| 149 | +1. Go to `R/` directory in the [code |
| 150 | + repository](https://github.com/NorwegianVeterinaryInstitute/NVIpjsr/tree/main/R). |
| 151 | +2. Look for the file with the name of the function. |
| 152 | +3. [Propose a file |
| 153 | + change](https://help.github.com/articles/editing-files-in-another-user-s-repository/) |
| 154 | + to update the function documentation in the roxygen comments |
| 155 | + (starting with `#'`). |
| 156 | + |
| 157 | +### Contribute code |
| 158 | + |
| 159 | +Care to fix bugs or implement new functionality for our\_package? Great! |
| 160 | +Have a look at the [issue |
| 161 | +list](https://github.com/NorwegianVeterinaryInstitute/NVIpjsr/issues) |
| 162 | +and leave a comment on the things you want to work on. See also the |
| 163 | +development guidelines below. |
| 164 | + |
| 165 | +## Development guidelines |
| 166 | + |
| 167 | +If you want to contribute code, you are welcome to do so. You will find |
| 168 | +a description of the code conventions, which have been used, in the |
| 169 | +vignette “NVIverse code conventions” in the package `NVIpackager`. A |
| 170 | +summary of the principles and style convention used for |
| 171 | +`NVIverse`-packages is given below. |
| 172 | + |
| 173 | +- Please limit the number of package dependencies for `NVIpjsr`. The |
| 174 | + use of base functions is much appreciated. |
| 175 | + |
| 176 | +- New code should generally follow the tidyverse [style |
| 177 | + guide](http://style.tidyverse.org) with some modifications. |
| 178 | + |
| 179 | + - use snake\_case for variable names, column names, function names |
| 180 | + etc. |
| 181 | + - function names should start with a verb and should be |
| 182 | + descriptive and can be long. Avoid strange abbreviations. |
| 183 | + - to indent the code you may use the short cut keys Ctrl+a (select |
| 184 | + all) and Ctrl+i (indent) when you are in R-studio. |
| 185 | + - I recommend to use the |
| 186 | + [`styler`](https://CRAN.R-project.org/package=styler) package to |
| 187 | + apply spaces: |
| 188 | + `styler::style_file(filename, scope = c("spaces", "line_breaks"))`. |
| 189 | + Please don’t restyle code that has nothing to do with your pull |
| 190 | + request. |
| 191 | + |
| 192 | +- You should add a bullet point to `NEWS` motivating the change. |
| 193 | + |
| 194 | +- You should add yourself as a contributor to the `DESCRIPTION`. |
| 195 | + |
| 196 | +Although not expected from all contributors, it will be highly |
| 197 | +appreciated if you also are willing to suggest: |
| 198 | + |
| 199 | +- documentation for new functions or new arguments to existing |
| 200 | + functions The `NVIverse`-packages use |
| 201 | + [`roxygen2`](https://cran.r-project.org/package=roxygen2) for |
| 202 | + documentation. |
| 203 | + |
| 204 | +- argument checking of the function arguments. The `NVIverse`-packages |
| 205 | + use the assert-functions from the |
| 206 | + [`checkmate`](https://CRAN.R-project.org/package=checkmate) package |
| 207 | + for argument checking as well as some additional assert-functions in |
| 208 | + [`NVIcheckmate`](https://github.com/NorwegianVeterinaryInstitute/NVIcheckmate). |
| 209 | + |
| 210 | +- one or more tests ensuring that the function works as intended. The |
| 211 | + `NVIverse`-packages use |
| 212 | + [`testthat`](https://cran.r-project.org/package=testthat) for tests. |
| 213 | + |
| 214 | +### Git commit standards |
| 215 | + |
| 216 | +We follow the commit message style guide maintained within the |
| 217 | +angular.js project. |
| 218 | + |
| 219 | +The start of commit messages should be one of the following: |
| 220 | + |
| 221 | +- feat: A new feature |
| 222 | +- fix: A bug fix |
| 223 | +- doc: Documentation only changes |
| 224 | +- style: Changes that do not affect the meaning of the code |
| 225 | + (white-space, formatting, missing semi-colons, etc) |
| 226 | +- refactor: A code change that neither fixes a bug or adds a feature |
| 227 | +- perf: A code change that improves performance |
| 228 | +- test: Adding missing tests |
| 229 | +- chore: Changes to the build process or auxiliary tools and libraries |
| 230 | + such as documentation generation |
| 231 | + |
| 232 | +Do not capitalize the first letter. |
| 233 | + |
| 234 | +## Code of conduct |
| 235 | + |
| 236 | +Please note that this project is released with a [Contributor Code of |
| 237 | +Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). |
| 238 | +By participating to this project, you agree to abide by its terms. |
| 239 | + |
| 240 | +## References |
| 241 | + |
| 242 | +This document is adapted from a |
| 243 | +[template](https://gist.github.com/peterdesmet/e90a1b0dc17af6c12daf6e8b2f044e7c) |
| 244 | +by @peterdesmet . |
0 commit comments