-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI: Filter cutoffs from JSON file for family cutoffs set (#132)
Currently the `family cutoffs set` command requires that the JSON file that contains the cutoffs _only_ has the cutoff keys specified for each element. This is because the cutoffs are validated by the `RecommendedCutoffMixin.validate_cutoffs()` method, which doesn't allow for extraneous keys. However, the `.json` file could have been adapted by the user from e.g. the SSSP `metadata.json` or some other dictionary that also contains other keys. As long as the cutoff keys are defined, we shouldn't raise an error just because there are other keys present. Here we first filter the data loaded from the JSON file for the cutoffs, before passing the dictionary to the `set_cutoffs` method.
- Loading branch information
Showing
2 changed files
with
27 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters