Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kba #349

Merged
merged 3 commits into from
Aug 22, 2024
Merged

Add kba #349

merged 3 commits into from
Aug 22, 2024

Conversation

karpfen
Copy link
Member

@karpfen karpfen commented Aug 22, 2024

No description provided.

@karpfen karpfen requested a review from goergen95 August 22, 2024 09:16
Copy link

codecov bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.70%. Comparing base (8f27b5b) to head (1984aed).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #349      +/-   ##
==========================================
+ Coverage   86.21%   86.70%   +0.49%     
==========================================
  Files          60       62       +2     
  Lines        2691     2723      +32     
==========================================
+ Hits         2320     2361      +41     
+ Misses        371      362       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

package = "mapme.biodiversity")
x <- read_sf(sample_path)
x_area <- st_area(x) |>
units::set_units("ha") |>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not use units here as this would add another dependency.

#' @export
get_key_biodiversity_areas <- function(path = NULL) {

if(is.null(path) || !file.exists(path)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you include a line in the test script that triggers this line?

verbose = mapme_options()[["verbose"]]) {

key_biodiversity_areas <- key_biodiversity_areas[[1]]
if (is.null(key_biodiversity_areas) | nrow(key_biodiversity_areas) == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you are at it, maybe also test this line?

@karpfen
Copy link
Member Author

karpfen commented Aug 22, 2024

@goergen95 thanks for the comments, will adapt! I also just noticed that I'm using native pipes in the unit test. I'll replace them so we're compatible with R 3.5.0

@goergen95
Copy link
Member

Yes, please do. Also, please try to pipes sparingly. We still have #98 open.

@goergen95
Copy link
Member

There are also failures related to ipbes and carbon which I'll try to figure out

@karpfen
Copy link
Member Author

karpfen commented Aug 22, 2024

@goergen95 do you know how I can "force merge" this PR despite the failing check? The merge button is greyed out for me.

@goergen95
Copy link
Member

Guess it requires admin privileges. Shall I (I would squash the commits to a single one)?

@karpfen
Copy link
Member Author

karpfen commented Aug 22, 2024

Yes, please!

@goergen95 goergen95 merged commit 1260ad2 into main Aug 22, 2024
9 of 10 checks passed
@goergen95 goergen95 deleted the add-kba branch August 22, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants