Skip to content

Commit

Permalink
Merge pull request #176 from inbo/dev_nextrelease
Browse files Browse the repository at this point in the history
Release n2khab 0.10.0
  • Loading branch information
florisvdh authored Dec 1, 2023
2 parents 2f33a03 + 1546890 commit 93cb7ec
Show file tree
Hide file tree
Showing 75 changed files with 866 additions and 5,142 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ pkgdown/
^appveyor\.yml$
^\.zenodo\.json$
^\.github$
^CODE_OF_CONDUCT\.md$
13 changes: 6 additions & 7 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,31 +101,30 @@ This is the structure of the [repo]:
├── n2khab.Rproj <- Main RStudio project file.
├── NAMESPACE
├── NEWS.md <- The changelog.
└── README.md
└── README.md <- The package homepage.
```

### Coding tools

When writing functions for `n2khab`:

- please use `tidyverse`, `sf` and `raster` packages for data reading.
Discover the human-friendly way of coding a data processing pipeline through the use of [pipes](https://r4ds.had.co.nz/pipes.html)!
- please use `sf` and `terra` packages for reading geospatial data.
Organise data in R in a [tidy](https://r4ds.had.co.nz/tidy-data.html#tidy-data-1) way in order to avoid troubles later on.
Recommended resources to get started are:
- [R for Data Science](https://r4ds.had.co.nz/)
- [Geocomputation with R](https://geocompr.robinlovelace.net)
- [R packages](https://r-pkgs.org/) (by Hadley Wickham and Jenny Bryan)
- [R packages](https://r-pkgs.org/)
- [`vignette("rd-formatting", package = "roxygen2")`](https://roxygen2.r-lib.org/articles/formatting.html) for documentation syntax.
Or use markdown support in function documentation after adding the `@md` tag.
- have a quick look at the [tidyverse style guide](https://style.tidyverse.org/).
There you see how to style object, variable and function names, as well as the documentation.
At least keep in mind: **use lower case and 'snake_case'** for object, variable and function names.
- if your function returns a dataframe, use `dplyr::as_tibble()` to return it as a tibble instead.
A tibble is a dataframe that makes working in the tidyverse a little [easier](https://r4ds.had.co.nz/tibbles.html).
- if your function returns a data frame, use `dplyr::as_tibble()` to return it as a tibble instead.
A tibble is a data frame that makes working in the tidyverse a little [easier](https://r4ds.had.co.nz/tibbles.html).
- functions that read or process data should return data as much as possible internationalized:
- availability of English names for types, environmental pressures, ...
Other languages can be accommodated as well;
- English names for table headings (dataframe variables).
- English names for table headings (data frame variables).


### How to contribute code?
Expand Down
10 changes: 5 additions & 5 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
"license": "GPL-3.0",
"upload_type": "software",
"access_right": "open",
"version": "0.9.1",
"version": "0.10.0",
"creators": [
{
"name": "Vanderhaeghe, Floris",
"affiliation": "Research Institute for Nature and Forest",
"affiliation": "Research Institute for Nature and Forest (INBO)",
"orcid": "0000-0002-6378-6229"
},
{
"name": "Westra, Toon",
"affiliation": "Research Institute for Nature and Forest",
"affiliation": "Research Institute for Nature and Forest (INBO)",
"orcid": "0000-0003-2478-9459"
},
{
"name": "Herr, Cécile",
"affiliation": "Research Institute for Nature and Forest",
"affiliation": "Research Institute for Nature and Forest (INBO)",
"orcid": "0000-0002-2833-6046"
},
{
"name": "Van Calster, Hans",
"affiliation": "Research Institute for Nature and Forest",
"affiliation": "Research Institute for Nature and Forest (INBO)",
"orcid": "0000-0001-8595-8426"
}
],
Expand Down
126 changes: 126 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at floris.vanderhaeghe@inbo.be.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][https://github.com/mozilla/inclusion].

For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at <https://www.contributor-covenant.org/translations>.

[homepage]: https://www.contributor-covenant.org
6 changes: 5 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: n2khab
Title: Providing Preprocessed Reference Data for Flemish Natura 2000 Habitat Analyses
Version: 0.9.1
Version: 0.10.0
Authors@R: c(
person("Floris", "Vanderhaeghe", email = "floris.vanderhaeghe@inbo.be", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-6378-6229")),
person("Toon", "Westra", email = "toon.westra@inbo.be", role = c("aut"), comment = c(ORCID = "0000-0003-2478-9459")),
Expand Down Expand Up @@ -54,15 +54,19 @@ Suggests:
jsonlite,
knitr,
mapview,
n2khabmon,
openssl,
raster (>= 3.6-3),
readxl,
rmarkdown,
terra,
testthat (>= 3.0.0),
tidyverse,
tools,
units,
utils,
withr
Remotes:
inbo/n2khabmon
VignetteBuilder: knitr
Config/testthat/edition: 3
7 changes: 5 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export(download_zenodo)
export(expand_types)
export(fileman_folders)
export(fileman_up)
export(locate_n2khab_data)
export(md5sum)
export(n2khab_options)
export(read_GRTSmh)
export(read_GRTSmh_base4frac)
export(read_GRTSmh_diffres)
Expand Down Expand Up @@ -80,6 +82,8 @@ importFrom(purrr,map_lgl)
importFrom(rlang,.data)
importFrom(rlang,na_lgl)
importFrom(rprojroot,find_root)
importFrom(rprojroot,find_root_file)
importFrom(rprojroot,has_dir)
importFrom(rprojroot,is_git_root)
importFrom(rprojroot,is_rstudio_project)
importFrom(sf,"st_crs<-")
Expand All @@ -101,9 +105,8 @@ importFrom(stringr,str_split)
importFrom(stringr,str_squish)
importFrom(stringr,str_sub)
importFrom(stringr,str_to_title)
importFrom(tidyr,gather)
importFrom(tidyr,nest)
importFrom(tidyr,spread)
importFrom(tidyr,tribble)
importFrom(tidyr,unnest)
importFrom(utils,packageDescription)
importFrom(utils,packageVersion)
30 changes: 28 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# n2khab 0.10.0 (2023-12-01)

## Breaking change

`read_GRTSmh()`, `read_GRTSmh_base4frac()`, `read_GRTSmh_diffres()` and `read_raster_runif()` now return a `SpatRaster` object from {[terra](https://rspatial.github.io/terra)} by default (#173).
Previous behaviour using {raster} can still be restored; see below.
However do note that {raster} is a legacy package and {terra} is its successor.

## New feature

The package can be configured using `options()` or corresponding environment variables.
Current configuration state is returned by `n2khab_options()`.
See `?n2khab_options` for information on package configuration.

Two settings are now available:

- optionally use {raster} instead of {terra} (#173);
- optionally set a custom `n2khab_data` path, affecting all functions that need this path (#174).

## Deprecated functions

`read_schemes()` and `read_scheme_types()` were moved to a new package {[n2khabmon](https://inbo.github.io/n2khabmon)}.
In {n2khab} they are still functional but deprecated, and will eventually disappear (#175).
The accompanying data sources `schemes` and `scheme_types` have moved to {n2khabmon}.
{n2khab} 0.10.0 will be the minimum version required by {n2khabmon}.

# n2khab 0.9.1 (2023-11-24)

- Added workaround for a note during package installation ([d300e4a](https://github.com/inbo/n2khab/commit/d300e4a)).
Expand Down Expand Up @@ -26,7 +52,7 @@ These data sources have not changed since previous release.

# n2khab 0.7.0 (2022-05-23)

- Upgrade most [vc-formatted](https://ropensci.github.io/git2rdata) data sources to the format of **git2rdata** version 0.4.0. In this version, files not optimized for version control (but rather for readability), are saved as csv instead of tsv files. For **n2khab**, this applies to the `types` and `env_pressures` data sources. Since it is expected that this upgrade is not compatible with older **git2rdata** versions, the version dependency for **git2rdata** has been updated (#161).
- Upgrade most [vc-formatted](https://ropensci.github.io/git2rdata) data sources to the format of {git2rdata} version 0.4.0. In this version, files not optimized for version control (but rather for readability), are saved as csv instead of tsv files. For {n2khab}, this applies to the `types` and `env_pressures` data sources. Since it is expected that this upgrade is not compatible with older {git2rdata} versions, the version dependency for {git2rdata} has been updated (#161).
- `scheme_types` data source: update typegroup membership of type `7210` in scheme `GW_03.3` (#161).

# n2khab 0.6.0 (2022-02-03)
Expand Down Expand Up @@ -176,5 +202,5 @@ Further, a number of smaller fixes and enhancements were made.
This package is the successor of the 'n2khabutils' package.
Previous to commit `c8608d9`, the code was part of the [n2khab-monitoring](https://github.com/inbo/n2khab-monitoring) repo (formerly 'n2khab-inputs'), where the original version history remains stored.
At that time, the package was called 'n2khabutils'.
As a convenience, the **n2khab** repo still holds the rewritten (shrinked) package history from before commit `c8608d9`, as defined by the related files and folders.
As a convenience, the {n2khab} repo still holds the rewritten (shrinked) package history from before commit `c8608d9`, as defined by the related files and folders.
See [this](https://github.com/inbo/n2khab-monitoring/issues/28) issue in the 'n2khab-monitoring' repo, where the migration is documented.
Loading

0 comments on commit 93cb7ec

Please sign in to comment.