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

Consideration of additional pre-processing helper functions #404

Open
medewitt opened this issue Nov 29, 2023 · 6 comments
Open

Consideration of additional pre-processing helper functions #404

medewitt opened this issue Nov 29, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@medewitt
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
During the course of #402 we created a helper function for the test suite.

run_window_filter <- function(x, filter_report_remove = 10, filter_reference_include = 10) {
medewitt marked this conversation as resolved.
    obs <- enw_filter_report_dates(x, remove_days = filter_report_remove)
    obs <- enw_filter_reference_dates(obs, include_days = filter_reference_include)
    return(obs)
}

As many of these pre-processing steps are likely to be chained together in repeatable pipelines, there might be an opportunity to provide users with a consolidated helper function.

Describe the solution you'd like

A series of helper functions which chain the pre-processing steps for input data that are often the most repeated with sensible defaults.

Describe alternatives you've considered
Leaving the pre-processing steps discrete allows for easier debugging should an error occur and potentially less code burden to maintain.

However, users will likely create these helper functions on their own and providing some streamlined defaults could help with package adoption and ease in productionalising.

Additional context
N/A

@seabbs
Copy link
Collaborator

seabbs commented Nov 29, 2023

Thanks for this @medewitt I think there are definitely positive and negatives (which you've captured). @Bisaloo do you have a strong view on this?

@seabbs seabbs added enhancement New feature or request help wanted Extra attention is needed question Further information is requested labels Nov 29, 2023
@Bisaloo
Copy link
Collaborator

Bisaloo commented Dec 1, 2023

@Bisaloo do you have a strong view on this?

No, no strong view. It's slightly more maintenance but the small improvement in workflows may be worth it. It can be added as a test and its usefulness can be reevaluated later down the line.

If possible, I would recommend to try and be consistent in your usage in examples & vignettes. Promoting two ways to do the same task can be confusing for new users and being clear on what is the "officially recommended" workflow can help.

@seabbs
Copy link
Collaborator

seabbs commented Dec 1, 2023

Thanks, good points.

recommend to try and be consistent in your usage in examples & vignettes.

Yes definitely.

The only downside I see for this is if we exposed all arguments for the inner two functions that the wrapper would have quite a few.

We might need to workshop the name a bit as well as its a bit vague maybe?

@seabbs
Copy link
Collaborator

seabbs commented Apr 9, 2024

@medewitt any chance you've got capacity to take this one?

@medewitt
Copy link
Collaborator Author

medewitt commented Apr 9, 2024

@seabbs happy to take this on if it can wait until early May...a bit swamped through April.

@seabbs
Copy link
Collaborator

seabbs commented Apr 10, 2024

Yeah that would be no problem - amazing! Good luck getting through the swamp!

@medewitt medewitt self-assigned this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
Status: No status
Development

No branches or pull requests

3 participants