Skip to content

Commit

Permalink
Merge pull request #21 from PetterHopp/main
Browse files Browse the repository at this point in the history
NVIpretty v0.4.0
  • Loading branch information
PetterHopp authored Dec 2, 2022
2 parents a120e87 + ecab47f commit a5ee9e4
Show file tree
Hide file tree
Showing 32 changed files with 860 additions and 519 deletions.
101 changes: 60 additions & 41 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Contribute to NVIpretty
<!-- CONTRIBUTING.md is generated from ./vignettes/Contribute_to_NVIpretty.Rmd. Please edit that file -->

<!-- CONTRIBUTING.md and ./vignettes/Contribute_to_NVIpkg.Rmd. are generated
from ./templates/Contribute_to_NVIpkg.Rmd in NVIpackager.
Please edit that file -->

Thank you for considering contributing to `NVIpretty`.

Expand All @@ -12,9 +15,9 @@ management and data reporting at the Norwegian Veterinary Institute

<table>
<colgroup>
<col style="width: 10%" />
<col style="width: 6%" />
<col style="width: 82%" />
<col style="width: 13%" />
<col style="width: 8%" />
<col style="width: 78%" />
</colgroup>
<thead>
<tr class="header">
Expand All @@ -35,19 +38,19 @@ management and data reporting at the Norwegian Veterinary Institute
<td style="text-align: left;">Tools to facilitate the use of NVI’s databases</td>
</tr>
<tr class="odd">
<td style="text-align: left;">NVIpretty</td>
<td style="text-align: left;">NVIspatial</td>
<td style="text-align: left;">Public</td>
<td style="text-align: left;">Tools to make R-output pretty in accord with NVI’s graphical profile</td>
<td style="text-align: left;">Tools to facilitate working with spatial data at NVI</td>
</tr>
<tr class="even">
<td style="text-align: left;">NVIbatch</td>
<td style="text-align: left;">NVIpretty</td>
<td style="text-align: left;">Public</td>
<td style="text-align: left;">Tools to facilitate the running of R-scripts in batch mode at NVI</td>
<td style="text-align: left;">Tools to make R-output pretty in accord with NVI’s graphical profile</td>
</tr>
<tr class="odd">
<td style="text-align: left;">NVIcheckmate</td>
<td style="text-align: left;">NVIbatch</td>
<td style="text-align: left;">Public</td>
<td style="text-align: left;">Extension of checkmate with additional functions for argument checking for use in NVIverse functions</td>
<td style="text-align: left;">Tools to facilitate the running of R-scripts in batch mode at NVI</td>
</tr>
<tr class="even">
<td style="text-align: left;">OKplan</td>
Expand All @@ -59,11 +62,25 @@ management and data reporting at the Norwegian Veterinary Institute
<td style="text-align: left;">Public</td>
<td style="text-align: left;">Tools to facilitate checking of data from national surveillance programmes</td>
</tr>
<tr class="even">
<td style="text-align: left;">NVIcheckmate</td>
<td style="text-align: left;">Public</td>
<td style="text-align: left;">Extension of checkmate with argument checking adapted for NVIverse</td>
</tr>
<tr class="odd">
<td style="text-align: left;">NVIpackager</td>
<td style="text-align: left;">Public</td>
<td style="text-align: left;">Tools to facilitate the development of NVIverse packages</td>
</tr>
<tr class="even">
<td style="text-align: left;">NVIrpackages</td>
<td style="text-align: left;">Public</td>
<td style="text-align: left;">Keeps a table of the R-Packages in NVIverse</td>
</tr>
</tbody>
</table>

How you can contribute
----------------------
## How you can contribute

There are several ways you can contribute to this project: ask a
question, propose an idea, report a bug, improve the documentation, or
Expand Down Expand Up @@ -129,8 +146,7 @@ list](https://github.com/NorwegianVeterinaryInstitute/NVIpretty/issues)
and leave a comment on the things you want to work on. See also the
development guidelines below.

Development guidelines
----------------------
## Development guidelines

If you want to contribute code, you are welcome to do so. Please try to
adhere to some principles and style convention used for
Expand All @@ -140,38 +156,43 @@ adhere to some principles and style convention used for
use of base functions is much appreciated.

- New code should generally follow the tidyverse [style
guide](http://style.tidyverse.org). I recommend to use the
[`styler`](https://CRAN.R-project.org/package=styler) package to
apply spaces: `styler::style_file(filename, scope = "spaces")`.
Please don’t restyle code that has nothing to do with your pull
request.

- You should add a bullet point to `NEWS.md` motivating the change.
guide](http://style.tidyverse.org) with some modifications.

- use snake\_case for variable names, column names, function names
etc.
- function names should start with a verb and should be
descriptive and can be long. Avoid strange abbreviations.
- to indent the code you may use the short cut keys Ctrl+a (select
all) and Ctrl+i (indent) when you are in R-studio.
- I recommend to use the
[`styler`](https://CRAN.R-project.org/package=styler) package to
apply spaces:
`styler::style_file(filename, scope = c("spaces", "line_breaks"))`.
Please don’t restyle code that has nothing to do with your pull
request.

- You should add a bullet point to `NEWS` motivating the change.

- You should add yourself as a contributor to the `DESCRIPTION`.

- If you’re adding a new function or new arguments to an existing
function, you’ll also need to document them. `NVIverse`-packages use
[`roxygen2`](https://cran.r-project.org/package=roxygen2), with
[Markdown
syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/markdown.html),
for documentation. Make sure to re-run `devtools::document()` on the
code before submitting.
Although not expected from all contributors, it will be highly
appreciated if you also are willing to suggest:

- `NVIverse`-packages use the assert-functions from
- documentation for new functions or new arguments to existing
functions The `NVIverse`-packages use
[`roxygen2`](https://cran.r-project.org/package=roxygen2) for
documentation.

- argument checking of the function arguments. The `NVIverse`-packages
use the assert-functions from the
[`checkmate`](https://CRAN.R-project.org/package=checkmate) package
for argument checking as well as some additional assert\_functions
in
for argument checking as well as some additional assert-functions in
[`NVIcheckmate`](https://github.com/NorwegianVeterinaryInstitute/NVIcheckmate).
Adding argument checking for new functions and/or arguments will be
highly appreciated.

- If you can, also write a test. `NVIverse`-packages use
- one or more tests ensuring that the function works as intended. The
`NVIverse`-packages use
[`testthat`](https://cran.r-project.org/package=testthat) for tests.

- Also run `devtools::check()` to make sure your function doesn’t
imply downstream errors or warnings.

### Git commit standards

We follow the commit message style guide maintained within the
Expand All @@ -192,15 +213,13 @@ The start of commit messages should be one of the following:

Do not capitalize the first letter.

Code of conduct
---------------
## Code of conduct

Please note that this project is released with a [Contributor Code of
Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html).
By participating to this project, you agree to abide by its terms.

References
----------
## References

This document is adapted from a
[template](https://gist.github.com/peterdesmet/e90a1b0dc17af6c12daf6e8b2f044e7c)
Expand Down
32 changes: 19 additions & 13 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,40 +1,46 @@
Package: NVIpretty
Title: Tools for making R-output pretty in accord with NVI's graphical profile
Version: 0.3.2
Date: 2021-11-05
Version: 0.4.0
Date: 2022-12-02
Authors@R:
c(person(given = "Petter",
family = "Hopp",
role = c("aut", "cre"),
email = "[email protected]"),
person(given = "Norwegian Veterinary Institute",
role = "cph"))
Description: Tools for styling output from R in accord with NVI's graphical profile. The package is under development.
Description: Provides tools for styling output from R in accord with NVI's graphical
profile. Included are colour palettes and a NVI-theme for ggplot2 as well as
tools to format and style output in Excel.
URL: https://github.com/NorwegianVeterinaryInstitute/NVIpretty
BugReports: https://github.com/NorwegianVeterinaryInstitute/NVIpretty/issues
Depends: R (>= 4.0.0)
License: BSD_3_clause + file LICENSE
Encoding: UTF-8
LazyData: true
Imports:
NVIdb (>= 0.3.0),
checkmate,
checkmate (>= 2.1.0),
ggplot2,
knitr,
openxlsx,
NVIcheckmate (>= 0.3.0)
rmarkdown,
NVIcheckmate (>= 0.5.0),
NVIdb (>= 0.3.0),
NVIrpackages
Suggests:
datasets,
knitr,
devtools,
remotes,
rmarkdown,
testthat (>= 3.0.0),
roxygen2,
devtools
testthat (>= 3.0.0),
NVIpackager
Remotes:
NorwegianVeterinaryInstitute/NVIcheckmate,
NorwegianVeterinaryInstitute/NVIdb,
NorwegianVeterinaryInstitute/NVIcheckmate
NorwegianVeterinaryInstitute/NVIpackager,
NorwegianVeterinaryInstitute/NVIrpackages
VignetteBuilder: knitr
Language: en-GB
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
Roxygen: list(markdown = FALSE)
RoxygenNote: 7.2.1
Config/testthat/edition: 3
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Generated by roxygen2: do not edit by hand

export(add_formatted_worksheet)
export(append_text_line)
export(style_background_per_column)
export(style_text_line)
export(theme_NVI)
importFrom(ggplot2,"%+replace%")
17 changes: 17 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
NVIpretty 0.4.0 - (2022-12-02)
--------------------------

New features:

- Created append_text_line for appending a line with explanatory text to a data frame before writing it to Excel.

- Created style_text_line to style a line in an Excel sheet based on text content in one cell.


Other changes:

- Updated documentation (help, README and CONTRIBUTING).

- Improved argument checking of functions formatting Excel workbooks.


NVIpretty 0.3.2 - (2021-11-05)
--------------------------

Expand Down
Loading

0 comments on commit a5ee9e4

Please sign in to comment.