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

ENH: Change signature of customizable functions to use kwargs #425

Merged
merged 1 commit into from
Sep 20, 2018

Conversation

JoostJM
Copy link
Collaborator

@JoostJM JoostJM commented Sep 14, 2018

All functions that can be customized in the settings, or call functions that can be customized, now use a signature using kwargs, which will contain all customization specified in the setting section. Necessary elements are obtained using get() at the start of the function.

This enables easier addition of new features (only needed to update validation and the function itself, which saves updating the calls to the function throughout pyradiomics). Additionally, this also allows users to replaces functions in PyRadiomics with their own, so long as it follows the same signature (but now does allow for additional/different customization arguments).

cc @Radiomics/developers

@JoostJM JoostJM force-pushed the enhance-function-customization branch 3 times, most recently from f569738 to e026706 Compare September 14, 2018 12:54
All functions that can be customized in the settings, or call functions that can be customized, now use a signature using `kwargs`, which will contain all customization specified in the `setting` section. Necessary elements are obtained using `get()` at the start of the function.

This enables easier addition of new features (only needed to update validation and the function itself, which saves updating the calls to the function throughout pyradiomics). Additionally, this also allows users to replaces functions in PyRadiomics with their own, so long as it follows the same signature (but now does allow for additional/different customization arguments).
@JoostJM JoostJM force-pushed the enhance-function-customization branch from e026706 to f84c17f Compare September 20, 2018 11:55
@JoostJM JoostJM merged commit 4f73269 into AIM-Harvard:master Sep 20, 2018
@JoostJM JoostJM deleted the enhance-function-customization branch September 26, 2018 07:32
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.

1 participant