Make background validation performed by `Services` configurable
hannobraun opened this issue · 2 comments
hannobraun commented
Validation uses parameters defined in ValidationConfig
to determine whether close-by objects are considered coincident or not. However, this is not exposed through the Services
API, which is the main way of using validation.
It should be possible to override the configuration used by Services
in some way.
hannobraun commented
I think this might be a good first issue for anyone interested in getting involved. Here's some more explanation and guidance on how to get this done:
Services
is currently the entry point to thefj-core
crate.- You can see examples of its use in the example models ([1], [2], for example) or pretty much any unit test within
fj-core
(like this one). - One service within
Services
is the validation service, which uses the defaultValidationConfig
by callingValidate::validate
. - So to address this issue, one would have to optionally accept a
ValidationConfig
inServices
(maybe through a second constructor), pass that config into the validation service, and use it there viaValidate::validate_with_config
.
If anyone still has questions, please don't hesitate to ask!
hannobraun commented
Addressed in #2150.