Skip to content

Rsdk 2071 support modular validation and implicit dependencies #244

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

Conversation

purplenicole730
Copy link
Member

@purplenicole730 purplenicole730 commented Mar 23, 2023

RSDK-2071

Changes in this PR:

  • Adds a new resource validator type with lookup and register functions to work with and store resource validators.
  • Adds validate_config function that allows a module to look up and run (if any) a stored resource validator.
  • Implements ValidateConfig to call validate_config.
  • Adds a new gRPC error called ValidationError that will be raised when any Exception is thrown during validate_config.
  • Test validate_config with example Gizmo module that stores a validator during init.
  • Adds a validator function section to README.md

cc @benjirewis

Copy link
Member

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great! I know this is in draft but thought I'd leave a few comments to potentially discuss offline.

@benjirewis
Copy link
Member

We'll also want to update the module example README to describe the process of registering a custom validator function.

@purplenicole730 purplenicole730 marked this pull request as ready for review March 27, 2023 21:25
@purplenicole730 purplenicole730 requested a review from a team as a code owner March 27, 2023 21:25
@purplenicole730 purplenicole730 requested review from benjirewis, oliviamiller, cheukt and njooma and removed request for oliviamiller March 27, 2023 21:25
Copy link
Member

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great 🧑‍🔧 ! Just a few more nits.

Copy link
Member

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great job + thanks for this 🧑‍🔧

Copy link
Member

@njooma njooma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small nit, but otherwise good!

Copy link
Member

@cheukt cheukt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! had a suggestion to reduce the amount of registries

@purplenicole730 purplenicole730 requested a review from cheukt March 29, 2023 22:25
@purplenicole730 purplenicole730 requested review from cheukt and removed request for cheukt March 31, 2023 17:37
Copy link
Member

@cheukt cheukt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last request around checking that the registration actually contains something to register

Copy link
Member

@cheukt cheukt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@purplenicole730 purplenicole730 merged commit 1cd58d8 into viamrobotics:main Apr 3, 2023
@purplenicole730 purplenicole730 deleted the RSDK-2071-support-modular-validation-and-implicit-dependencies branch April 3, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants