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

Testing: Test everything that's user-facing with a data.frame instead of a data.table #438

Closed
Tracked by #493
nikosbosse opened this issue Nov 14, 2023 · 3 comments · Fixed by #799
Closed
Tracked by #493
Labels
implementation-ready This is ready for implementation

Comments

@nikosbosse
Copy link
Contributor

nikosbosse commented Nov 14, 2023

Instances like #427 underline that we need to check everything for compatibility with data.frame / data.table

@seabbs
Copy link
Contributor

seabbs commented Nov 19, 2023

This could literally be looping over a list of all exported functions that take a data frame and checking they don't error with a data frame

@nikosbosse nikosbosse added the implementation-ready This is ready for implementation label Dec 5, 2023
@nikosbosse
Copy link
Contributor Author

Suggested way of obtaining a list of all functions that accept a data.frame or similar:

exported_functions <- ls("package:scoringutils")

functions_with_data_arg <- character(0)  # Initialize an empty character vector to store function names

for (func_name in exported_functions) {
  func_args <- formals(get(func_name))
  if (!is.null(names(func_args)) && names(func_args)[1] == "data") {
    functions_with_data_arg <- c(functions_with_data_arg, func_name)
  }
}

@seabbs
Copy link
Contributor

seabbs commented Feb 28, 2024

This looks like it makese sense and could be combined with the class testing in. #587

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
implementation-ready This is ready for implementation
Projects
Status: Done
2 participants