Skip to content

Validation proposal #166

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Validation proposal #166

wants to merge 2 commits into from

Conversation

dkeller9
Copy link
Contributor

I'm opening this to PR to get feedback on the validation schema.

@dkeller9 dkeller9 requested a review from jdcourcol May 14, 2025 08:49
__tablename__ = "validations"

id = Column(Integer, primary_key=True, index=True)
entity_type = Column(String, nullable=False, index=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure I understand :( . Can you give an example of 1 instance of this ? and how it would be consumed ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be easier to look at the schema rather than the data model. So let's say the user contributes a new morphology. The validation logic looks up the morphology entity type in the table then applies the "must_pass_to_upload" validations. If these are successful it runs the validations in "must_run_upon_upload" which annotates the entity, and "must_pass_to_simulate" which generates additional validations needed for the artifact to be simulated.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, then it is not a validation, it is rather something like a "validation plan".

also what does the list of string contains ? I know it is a list of validations. but how do we go from a string to the actual execution of a code ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the validation plan schema stored in the database. The string contains a relative path in a github repo, for example "/morphologies/validate_morphology.py" I wrote a simple "validate_morphology.py" script that sees if it can be read in by NeuroM and returns an error if not. There will need to be some support logic that processes the lists, which I can add to entitycore once we are satisfied with this plan.

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.

2 participants