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

Issue #502 - Add tests and Improve error handling #924

Merged
merged 8 commits into from
Sep 30, 2024
Merged

Conversation

nikosbosse
Copy link
Contributor

@nikosbosse nikosbosse commented Sep 25, 2024

Description

This PR closes #502.

Replacing warnings with errors:

  • bias_quantile()
  • interval_coverage
  • interval_coverage_deviation()

This makes it more consistent with the behaviour of other functions that also error. In addition, we get a nicer message in score(), where the error gets converted into a warning like Error in 'interval_coverage()': error content.

Further updates to bias_quantile():

  • update docs
  • improve error handling if median isn't there and can't be imputed

updates tests for the above

Checklist

  • My PR is based on a package issue and I have explicitly linked it.
  • I have included the target issue or issues in the PR title as follows: issue-number: PR title
  • I have tested my changes locally.
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required.
  • I have built the package locally and run rebuilt docs using roxygen2.
  • My code follows the established coding standards and I have run lintr::lint_package() to check for style issues introduced by my changes.
  • I have added a news item linked to this PR.
  • I have reviewed CI checks for this PR and addressed them as far as I am able.

@nikosbosse nikosbosse changed the title Improve errors Issue #502 - Add tests and Improve error handling Sep 25, 2024
@nikosbosse nikosbosse marked this pull request as ready for review September 27, 2024 15:33
@nikosbosse nikosbosse requested a review from seabbs September 27, 2024 15:33
@seabbs
Copy link
Contributor

seabbs commented Sep 30, 2024

/document

Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

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

Nice!

@seabbs
Copy link
Contributor

seabbs commented Sep 30, 2024

I may have some issues with all the rebasing here and if so I can investigate

@nikosbosse
Copy link
Contributor Author

I may have some issues with all the rebasing here and if so I can investigate
That was just due to the fact that one PR updated a test for a function that another PR deleted

@seabbs seabbs merged commit 31097eb into main Sep 30, 2024
9 checks passed
@seabbs seabbs deleted the improve-errors branch September 30, 2024 22:35
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.

Add more tests for score()
2 participants