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

CLI: filter cutoffs from JSON file for family cutoffs set #132

Merged
merged 2 commits into from
Oct 10, 2022

Commits on Oct 10, 2022

  1. CLI: filter cutoffs from JSON file for family cutoffs set

    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.
    mbercx committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    63abf88 View commit details
    Browse the repository at this point in the history
  2. First round of review

    mbercx committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    eb391cd View commit details
    Browse the repository at this point in the history