Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Validate/sanitize inputs more generally #102

Open
thomased opened this issue Jun 18, 2018 · 2 comments
Open

Validate/sanitize inputs more generally #102

thomased opened this issue Jun 18, 2018 · 2 comments
Assignees

Comments

@thomased
Copy link
Collaborator

We've got some specific checks around, but might be nice to have some general checks & a generic error ('Input not recognised') that just catches all totally-wrong inputs. All the functions expect pretty specific stuff, so an internal checker function or two, that's then called near the beginning of main functions, would probably do it.

@thomased thomased self-assigned this Jun 18, 2018
@Bisaloo
Copy link
Collaborator

Bisaloo commented Jun 19, 2018

I totally agree! Many functions use the same first lines of code and it would be great to refactor it to reduce code redundancy. I think the main challenge here is to stay flexible enough when checking the input. For example, I tend to work a lot with dataframes instead of dedicated S3 classes. There's nothing more annoying than functions that fail without explanations because you didn't provide the exact input they expect (matrices vs df, named rows, etc.).

@Bisaloo

This comment has been minimized.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants