-
Notifications
You must be signed in to change notification settings - Fork 20
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 #562: Reorganise/rename files #705
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #705 +/- ##
=======================================
Coverage 95.28% 95.28%
=======================================
Files 21 21
Lines 1632 1632
=======================================
Hits 1555 1555
Misses 77 77 ☔ View full report in Codecov by Sentry. |
Merge branch 'main' into reorganise-files # Conflicts: # R/summarise_scores.R # tests/testthat/test-summarise_scores.R
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Nikos. This is looking good. Let me suggest a few "move-arounds" and let's engage.
-
validate_metrics()
should be moved out ofas_forecast.R
. Maybe tometrics-validate.R
? -
as_forecast()
should be renamed toforecast.R
. Why? because that script is about creating<forecast>
objects, coercing to<forecast>
, and validating<forecast>
objects. This will be similar to howscore.R
is structured. That script is currently quite long so we may want to move thevalidate_*()
functions tovalidate.R
-
convenience-functions.R
should probably be split up into 3 scripts, one for each function. Else, what's the difference betweenconvenience-functions
more broadly, and utils/helpers, etc?
Good suggestions! I did the first two now - how would you feel about addressing the other changes in a separate PR, along with the |
Nice work, Nikos. I'm happy with the suggestion. LGTM. |
Description
This PR closes #562
As discussed in #562, the current file structure doesn't always make a lot of sense. This PR is a first step towards addressing that. Specifically, it
get_coverage()
toget_-functions.R
and deletes the fileadd_coverage.R
(+ adapts the tests accordingly)validate.R
toas_forecast.R
get_forecast_counts()
toget_-functions.R
and deletes the existingavailable_forecasts.R
(+ updates tests)add_pairwise_comparison()
fromsummarise_scores.R
toR/pairwise-comparison.R
(+ tests)As Sam can testify, unrelated changes are my signature move. Alas, there is an unrelated change in this PR:
we (meaning I...) didn't update the docs when merging #692. So there also some updated .Rd files in here. Sorry!
Additional thoughts: We might want to split the
get_-functions.R
file into one file per function. By now, there are quite a few functions in there and maybe they deserve a nice home for themselves. I suggest addressing that + further changes in a different issue/PR (mostly so that I can continue developing without producing lots of merge conflicts)Checklist
lintr::lint_package()
to check for style issues introduced by my changes.