Skip to content

Improve handling of invalid engine specifications #15

Description

@caittrip

Currently, the engine is validated in "R/properties.R" with this code:
engine_type <- new_property( class = class_character, validator = function(value) { if (!(value %in% c("TDA", "ripserr"))) { "must be TDAorripserr." } }, default = "TDA" )

If the user provides an invalid engine name, or specifies an engine that is incompatible with the requested filtration, the package currently stops with an error.

Possible Improvements
I'm interested in feedback on which method(s) would be best out of these:

  • Keep the current behavior and improve the error message to be more descriptive
  • Automatically correct obvious mistakes (e.g. fix "tda" to be "TDA")
  • Automatically switch to the compatible engine if an incompatible engine is chosen, while issuing a warning

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions