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 #485: Fix linting #509

Merged
merged 8 commits into from
Nov 29, 2023
Merged

Issue #485: Fix linting #509

merged 8 commits into from
Nov 29, 2023

Conversation

nikosbosse
Copy link
Contributor

@nikosbosse nikosbosse commented Nov 28, 2023

Description

This PR closes #485

This PR fixes linting issues on the current development branch. It

  • adds R files based on the vignettes to the files ignored by the linter (these are automatically generated based on the vignettes and always contain linting issues)
  • fixes various linting issues across a large number of files.

Two single items stand out:

  1. the function name interval_coverage_deviation_quantile is too long
  2. the function name plot.scoringutils_available_forecasts is too long

We could simply change interval_coverage_deviation_quantile to interval_coverage_dev_quantile (exactly 30 chars long). An alternative would be to simply exclude the line from linting.
The second one is related to #403.

Update 1 I created a second PR for the name of plot.scoringutils_available_forecasts(), #511, which addresses #403
Update 2 I renamed the function to interval_coverage_dev_quantile

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 base branch from main to develop November 28, 2023 12:31
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (55e5744) 81.21% compared to head (d2844d3) 81.21%.
Report is 3 commits behind head on develop.

Files Patch % Lines
R/metrics-quantile.R 65.51% 10 Missing ⚠️
R/metrics-sample.R 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #509   +/-   ##
========================================
  Coverage    81.21%   81.21%           
========================================
  Files           20       20           
  Lines         1725     1725           
========================================
  Hits          1401     1401           
  Misses         324      324           

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

@nikosbosse nikosbosse requested a review from seabbs November 28, 2023 13:26
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.

Definitely looks better. I think shortening the name is fine. Still failing as its flagging all the lines that are new and don't have test coverage.

.lintr Show resolved Hide resolved
R/add_coverage.R Outdated Show resolved Hide resolved
R/data.R Show resolved Hide resolved
R/utils_data_handling.R Outdated Show resolved Hide resolved
@nikosbosse
Copy link
Contributor Author

I think I addressed all your comments. Are you happy for me to merge? In particular, should we address tests in a different PR, or would you prefer doing this now?

@nikosbosse nikosbosse requested a review from seabbs November 28, 2023 22:33
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.

LGTM

@nikosbosse nikosbosse merged commit 97d204f into develop Nov 29, 2023
8 of 9 checks passed
@nikosbosse nikosbosse deleted the fix-linting branch November 29, 2023 12:51
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.

Fix linting issues
2 participants