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 option to require complete lastnight in part 5 #1202

Merged
merged 9 commits into from
Sep 23, 2024

Conversation

vincentvanhees
Copy link
Member

@vincentvanhees vincentvanhees commented Sep 20, 2024

Fixes #1196 by adding a new output parameter require_complete_lastnight_part5
which triggers the omission of the last MM or OO window when recording ends before 9am and the last WW window when recording ends before 3pm. this affects both the part 5 csv report and the exported time series.

I set the default to FALSE to make sure it does not affect existing analysis for users. Will first use this in some projects to make sure it works as expected. Maybe in the future we can change the default or promote using the non-default setting.

Checklist before merging:

  • Existing tests still work (check by running the test suite, e.g. from RStudio).
  • Added tests (if you added functionality) or fixed existing test (if you fixed a bug).
  • Clean code has been attempted, e.g. intuitive object names and no code redundancy.
  • Documentation updated:
    • Function documentation
    • Chapter vignettes for GitHub IO
    • Vignettes for CRAN
  • Corresponding issue tagged in PR message. If no issue exist, please create an issue and tag it.
  • Updated release notes in inst/NEWS.Rd with a user-readable summary. Please, include references to relevant issues or PR discussions.
  • Added your name to the contributors lists in the DESCRIPTION file, if you think you made a significant contribution.
  • GGIR parameters were added/removed. If yes, please also complete checklist below.

If NEW GGIR parameter(s) were added then these NEW parameter(s) are:

  • documented in man/GGIR.Rd
  • included with a default in R/load_params.R
  • included with value class check in R/check_params.R
  • included in table of vignettes/GGIRParameters.Rmd with references to the GGIR parts the parameter is used in.
  • mentioned in NEWS.Rd as NEW parameter

If GGIR parameter(s) were deprecated these parameter(s) are:

  • documented as deprecated in man/GGIR.Rd
  • removed from R/load_params.R
  • removed from R/check_params.R
  • removed from table in vignettes/GGIRParameters.Rmd
  • mentioned as deprecated parameter in NEWS.Rd
  • added to the list in R/extract_params.R with deprecated parameters such that these do not produce warnings when found in old config.csv files.

@vincentvanhees vincentvanhees marked this pull request as ready for review September 23, 2024 09:31
Copy link
Collaborator

@jhmigueles jhmigueles left a comment

Choose a reason for hiding this comment

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

Code works as expected, I tested it with a file ending at 00:30:00 the last night, and the last window was excluded when setting require_complete_lastnight_part5 = T. Documentation also looks good, it it clear that the last window is excluded if finishing earlier than 9am for MM and OO, and earlier than 3pm for WW.

@vincentvanhees vincentvanhees merged commit bae9171 into master Sep 23, 2024
7 checks passed
@vincentvanhees vincentvanhees deleted the issue1196_label_last_window branch September 23, 2024 14:12
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.

Ignore last night in part 5 when doing WW analysis and recording ends after midnight but before 7am
2 participants