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

BHoM_Engine: provide exception based on property "path"; wildcard support #2193

Open
alelom opened this issue Nov 27, 2020 · 0 comments
Open
Labels
type:feature New capability or enhancement

Comments

@alelom
Copy link
Member

alelom commented Nov 27, 2020

Description:

As described in BHoM/BHoM#1084.

Evaluate whether to do this

  1. using a boolean or enum toggle (to choose between specifying simple property name e.g. X or the "path" or "path with wildcard"
  2. having separate inputs for "propertyNameExceptions" (disallow paths and wildcards) and "propertyPathExceptions" (that disallows simple property name, could allow for wildcards)
  3. simply checking the exception case by case (does it contain a . ? Then it is a "path". Does it contain a *? Then use wildcardPattern).

(1) may sound as having more control over things, but you may want to actually avoid pushing the responsibility of the choice of logic on the user, because we can find a way to automate it as in (2) and (3), so I would avoid it probably.

Probably case (3) might be the simplest to use, but could have performance hit depending on implementation.
To minimise performance hit, we could use (3) at the level of the ComparisonConfig, but then split the exceptions in three separate lists to be passed separately to DefiningString (which basically means (3) in the front-end and (2) in the back-end). This way, DefiningString() would avoid the responsibility of checking what type of exception is every time, reducing the performance hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant