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

Defaults need better implementation #16

Open
zenBen opened this issue Dec 16, 2017 · 0 comments
Open

Defaults need better implementation #16

zenBen opened this issue Dec 16, 2017 · 0 comments
Assignees

Comments

@zenBen
Copy link
Member

zenBen commented Dec 16, 2017

Default values for most capabilities of any CTAP_* function are hard to find, hard to understand, often incomplete and overall quite chaotic.

Proposition: create a separate function to match every CTAP_* function, which compiles ALL default values, handles input, and returns both the required defaults for a given function, and a human readable formatting of default options. inputParser should be able to handle this, since its functionality has improved. E.g. the field KeepUnmatched can be set to true, which allows unmatched parameters to be entered and passed to called functions, emulating the ... three dots of R. Also, the UsingDefaults field contains those parameters for which an argument was not passed, allowing us to see what arguments the user has changed or not changed.

Thus, these functions can be substituted for the existing solutions (usually but not always the sbf_check_input function inside each ctapeeg_* function: exceptions are were no ctapeeg_* exists for a given CTAP_*). The usage would be that users call the function from command line when writing their pipeline, to see what the options are. Then CTAP_* calls the function to get a required subset of fields for the requested method, and passes to ctapeeg_* (if it calls such).

@zenBen zenBen self-assigned this Dec 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant