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 #431: Remove observation process function #439

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

athowes
Copy link
Collaborator

@athowes athowes commented Nov 15, 2024

Description

This PR closes #431.

It moves the mutating calls into the tests, vignettes, and sticker. It also slims them down to what is needed.

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 in the for Issue(s) issue-numbers: PR title
  • I have read the contribution guidelines.
  • I have tested my changes locally.
  • I have added or updated unit tests where necessary.
  • I have updated the documentation if required.
  • My code follows the established coding standards.
  • 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.

@athowes athowes changed the title Issue # Remove observe_process Issue #431: Remove observation process function Nov 15, 2024
@athowes athowes marked this pull request as ready for review November 15, 2024 11:20
@athowes
Copy link
Collaborator Author

athowes commented Nov 15, 2024

I think this should be good now.

@athowes athowes requested a review from seabbs November 15, 2024 17:17
@athowes
Copy link
Collaborator Author

athowes commented Nov 15, 2024

image

Failing here but it already has tolerance = 0.2 so should be within range..

@seabbs
Copy link
Contributor

seabbs commented Nov 15, 2024

I think tolerance is a relative measure more than you think and so needs maybe some tuning

seabbs
seabbs previously approved these changes Nov 15, 2024
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

seabbs
seabbs previously approved these changes Nov 19, 2024
truncated_obs <- obs |>
filter(.data$stime_upr <= obs_time) |>
mutate(obs_time = obs_time) |>
Copy link
Contributor

Choose a reason for hiding this comment

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

why add this line?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's required I think

ptime_upr = .data$ptime_lwr + 1,
stime_lwr = floor(.data$stime),
stime_upr = .data$stime_lwr + 1,
obs_time = obs_time
Copy link
Contributor

Choose a reason for hiding this comment

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

why add obs_time vs using as a variable as previously?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think later on in the code it is used as a part of the dataframe (this is what observe_process was doing, so previously it was not used as a variable I think)

Copy link
Contributor

Choose a reason for hiding this comment

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

its coded as a variable on line 3 - if you just take it out of the mutate call I think it should all just work

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.09%. Comparing base (e840b4b) to head (fd1a9f2).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #439      +/-   ##
==========================================
- Coverage   94.24%   94.09%   -0.16%     
==========================================
  Files          16       15       -1     
  Lines         469      457      -12     
==========================================
- Hits          442      430      -12     
  Misses         27       27              

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


🚨 Try these New Features:

@athowes athowes requested a review from seabbs November 19, 2024 15:29
@athowes
Copy link
Collaborator Author

athowes commented Nov 19, 2024

If we get this merged I can work on #430.

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.

Remove observe_process()
2 participants