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

update branch from master #291

Merged
merged 44 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
21625af
fix failing tests
nikosbosse Feb 27, 2023
2cdef9c
make boolean vector explicitly numeric when computing interval scores
nikosbosse Mar 2, 2023
59cb370
Update package version number and news file
nikosbosse Mar 2, 2023
66487aa
Merge pull request #274 from epiforecasts/adjust-interval-score
nikosbosse Mar 2, 2023
b970ca7
function draft that has specific options
nikosbosse Mar 3, 2023
e977438
update suggested draft for transform_forecasts, add documentation and…
nikosbosse Mar 5, 2023
59c0809
add example for adding multiple transformations
nikosbosse Mar 5, 2023
149c354
update examples, handle adding multiple transformations
nikosbosse Mar 5, 2023
0dc87f6
update doc
nikosbosse Mar 5, 2023
7a2783c
Merge branch 'master' into add_scale_fct
nikosbosse Mar 5, 2023
70d0e30
update documentation
nikosbosse Mar 6, 2023
6dba7e3
add a log_shift() function that can be called from transform_forecasts()
nikosbosse Mar 24, 2023
846d1e9
update code to enable transforming existing natural scale values with…
nikosbosse Mar 24, 2023
a4f2037
fix failing example
nikosbosse Mar 24, 2023
fd3f55d
update documentation, rename fucnction argument and lint code
nikosbosse Mar 30, 2023
4a72b1d
update documentation
nikosbosse Apr 10, 2023
0a34230
Add a transform forecasts function and a log_shift() helper that allo…
nikosbosse Apr 10, 2023
e46e7e3
Update examples for transform_forecasts()
nikosbosse Apr 10, 2023
d2b3132
correct typo in documentation
nikosbosse Apr 10, 2023
2066e47
Merge pull request #278 from epiforecasts/add_scale_fct_no_trunc
nikosbosse Apr 11, 2023
95cb58b
update contents of metrics table
nikosbosse Apr 12, 2023
aef47ec
Merge pull request #280 from epiforecasts/update_metrics_file
nikosbosse Apr 13, 2023
388e25e
Create a warning in interval_score if the interval range is between 0…
nikosbosse Apr 17, 2023
93ff254
Update package version and news
nikosbosse Apr 17, 2023
a1787ce
debug interval_score (fix missing na.rm = TRUE)
nikosbosse Apr 17, 2023
7484bdc
change typo in example, mention adrian-lison in NEWS file, correct ty…
nikosbosse Apr 19, 2023
836bc0f
Merge pull request #281 from epiforecasts/add_warning_interval_score
nikosbosse Apr 19, 2023
ebdfc6c
Edit pass on transform_forecasts and NEWS (#283)
seabbs Apr 19, 2023
4b8c073
updated linting to be only for changed files (from @bisaloo)
seabbs Apr 19, 2023
b66064f
update linting for scoringutils'
seabbs Apr 19, 2023
df43946
update wordlist
seabbs Apr 19, 2023
9c0a204
linting changes
seabbs Apr 19, 2023
874cd1f
resolve some linting issues
seabbs Apr 19, 2023
834ea5a
more linting
seabbs Apr 19, 2023
ba0979d
resolve final linting issues
seabbs Apr 19, 2023
59b7586
update news
seabbs Apr 19, 2023
fd64f46
fix snapshot tests
seabbs Apr 19, 2023
80ba491
fix new news updates
seabbs Apr 19, 2023
0efda39
fix additional newly introduced linting issues
seabbs Apr 19, 2023
5d3e269
Merge pull request #284 from epiforecasts/seabbs/lint-only-changed
nikosbosse Apr 19, 2023
01b5c78
Hotfix: Patch missing utility in Dockerfile
seabbs Apr 23, 2023
f4bb4f3
Add more links to scoringutils paper to the package
nikosbosse Jul 4, 2023
884d795
update citation to comply with newer standards
nikosbosse Jul 4, 2023
255721a
increment package version number
nikosbosse Jul 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .devcontainer/library-scripts/common-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
libkrb5-3 \
libgssapi-krb5-2 \
libicu[0-9][0-9] \
liblttng-ust0 \
libstdc++6 \
zlib1g \
locales \
Expand Down
43 changes: 31 additions & 12 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,49 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
branches:
- main
- master
- develop
workflow_dispatch:

name: lint
name: lint-changed-files

jobs:
lint:
lint-changed-files:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[ci skip]')"
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::lintr
needs: lint
extra-packages: |
any::gh
any::lintr
any::purrr
needs: check

- name: Add lintr options
run: |
cat('\noptions(lintr.linter_file = ".lintr")\n', file = "~/.Rprofile", append = TRUE)
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Lint
run: lintr::lint_package()
- name: Extract and lint files changed by this PR
run: |
files <- gh::gh("GET https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/files")
changed_files <- purrr::map_chr(files, "filename")
all_files <- list.files(recursive = TRUE)
exclusions_list <- as.list(setdiff(all_files, changed_files))
lintr::lint_package(exclusions = exclusions_list)
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
21 changes: 15 additions & 6 deletions .lintr
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
linters: with_defaults(
line_length_linter = line_length_linter(120),
cyclocomp_linter = cyclocomp_linter(complexity_limit = 20L),
object_usage_linter = NULL)
exclusions: c(list.files(path = "tests/", recursive = T, full.names = T),
list.files(path = "inst/", recursive = T, full.names = T))
linters: linters_with_tags(
tags = NULL, # include all linters
implicit_integer_linter = NULL,
extraction_operator_linter = NULL,
undesirable_function_linter = NULL,
function_argument_linter = NULL,
object_name_linter = NULL,
line_length_linter(120),
cyclocomp_linter(20L)
)
exclusions: c(
list.files("tests", recursive = TRUE, full.names = TRUE),
list.files("inst", recursive = TRUE, full.names = TRUE),
"vignettes/metric-details.Rmd"
)
exclude: "# nolint"
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: scoringutils
Title: Utilities for Scoring and Assessing Predictions
Version: 1.1.0
Version: 1.1.4
Language: en-GB
Authors@R: c(
person(given = "Nikos",
Expand All @@ -23,7 +23,7 @@ Authors@R: c(
comment = c(ORCID = "0000-0002-3777-1410")),
person("Sebastian", "Funk",
email = "[email protected]",
role = c("ctb")))
role = c("aut")))
Description:
Provides a collection of metrics and proper scoring rules
(Tilmann Gneiting & Adrian E Raftery (2007)
Expand All @@ -41,7 +41,8 @@ Description:
Scoring metrics can be used either through a convenient data.frame format,
or can be applied as individual functions in a vector / matrix format.
All functionality has been implemented with a focus on performance and is
robustly tested.
robustly tested. Find more information about scoringutils in the
accompanying paper (Bosse et al., 2022) <arXiv:2205.07090v1>.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Expand All @@ -66,7 +67,7 @@ Config/Needs/website:
amirmasoudabdol/preferably
Config/testthat/edition: 3
RoxygenNote: 7.2.3
URL: https://epiforecasts.io/scoringutils/, https://github.com/epiforecasts/scoringutils
URL: https://doi.org/10.48550/arXiv.2205.07090, https://epiforecasts.io/scoringutils/, https://github.com/epiforecasts/scoringutils
BugReports: https://github.com/epiforecasts/scoringutils/issues
VignetteBuilder: knitr
Depends:
Expand Down
4 changes: 3 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
S3method(print,scoringutils_check)
export(abs_error)
export(add_coverage)
export(add_transformation)
export(ae_median_quantile)
export(ae_median_sample)
export(avail_forecasts)
Expand All @@ -18,6 +17,7 @@ export(crps_sample)
export(dss_sample)
export(find_duplicates)
export(interval_score)
export(log_shift)
export(logs_binary)
export(logs_sample)
export(mad_sample)
Expand Down Expand Up @@ -46,6 +46,7 @@ export(squared_error)
export(summarise_scores)
export(summarize_scores)
export(theme_scoringutils)
export(transform_forecasts)
importFrom(data.table,"%like%")
importFrom(data.table,':=')
importFrom(data.table,.I)
Expand Down Expand Up @@ -102,6 +103,7 @@ importFrom(ggplot2,ylab)
importFrom(lifecycle,deprecated)
importFrom(methods,hasArg)
importFrom(rlang,enexprs)
importFrom(rlang,warn)
importFrom(scoringRules,crps_sample)
importFrom(scoringRules,dss_sample)
importFrom(scoringRules,logs_sample)
Expand Down
Loading