Skip to content

Commit 03d2b7a

Browse files
authored
Merge pull request #5 from PetterHopp/main
NVIpjsr v0.1.0 First release
2 parents 7afc663 + aa37a93 commit 03d2b7a

File tree

94 files changed

+8298
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+8298
-2
lines changed

.Rbuildignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
^\.git$
2+
^\.gitignore$
3+
^\.Rhistory$
4+
^CODE_OF_CONDUCT\.md$
5+
^CONTRIBUTING\.md$
6+
^data-raw$
7+
^man-roxygen$
8+
^notes$
9+
^README\.md
10+
^README\.Rmd$
11+
^.*\.Rproj$
12+
^\.Rproj\.user$
13+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ po/*~
4747

4848
# RStudio Connect folder
4949
rsconnect/
50+
inst/doc
51+
!vignettes/NVIpjsr.pdf
52+

CODE_OF_CONDUCT.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at Petter.Hopp@vetinst.no.
63+
All complaints will be reviewed and investigated promptly and fairly.
64+
65+
All community leaders are obligated to respect the privacy and security of the
66+
reporter of any incident.
67+
68+
## Enforcement Guidelines
69+
70+
Community leaders will follow these Community Impact Guidelines in determining
71+
the consequences for any action they deem in violation of this Code of Conduct:
72+
73+
### 1. Correction
74+
75+
**Community Impact**: Use of inappropriate language or other behavior deemed
76+
unprofessional or unwelcome in the community.
77+
78+
**Consequence**: A private, written warning from community leaders, providing
79+
clarity around the nature of the violation and an explanation of why the
80+
behavior was inappropriate. A public apology may be requested.
81+
82+
### 2. Warning
83+
84+
**Community Impact**: A violation through a single incident or series of
85+
actions.
86+
87+
**Consequence**: A warning with consequences for continued behavior. No
88+
interaction with the people involved, including unsolicited interaction with
89+
those enforcing the Code of Conduct, for a specified period of time. This
90+
includes avoiding interactions in community spaces as well as external channels
91+
like social media. Violating these terms may lead to a temporary or permanent
92+
ban.
93+
94+
### 3. Temporary Ban
95+
96+
**Community Impact**: A serious violation of community standards, including
97+
sustained inappropriate behavior.
98+
99+
**Consequence**: A temporary ban from any sort of interaction or public
100+
communication with the community for a specified period of time. No public or
101+
private interaction with the people involved, including unsolicited interaction
102+
with those enforcing the Code of Conduct, is allowed during this period.
103+
Violating these terms may lead to a permanent ban.
104+
105+
### 4. Permanent Ban
106+
107+
**Community Impact**: Demonstrating a pattern of violation of community
108+
standards, including sustained inappropriate behavior, harassment of an
109+
individual, or aggression toward or disparagement of classes of individuals.
110+
111+
**Consequence**: A permanent ban from any sort of public interaction within the
112+
community.
113+
114+
## Attribution
115+
116+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
117+
version 2.1, available at
118+
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
119+
120+
Community Impact Guidelines were inspired by
121+
[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion].
122+
123+
For answers to common questions about this code of conduct, see the FAQ at
124+
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.
125+
126+
[homepage]: https://www.contributor-covenant.org

CONTRIBUTING.md

Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
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

Comments
 (0)