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

Explore Integration with Reasoner Pydantic Models #15

Open
kennethmorton opened this issue May 11, 2022 · 2 comments
Open

Explore Integration with Reasoner Pydantic Models #15

kennethmorton opened this issue May 11, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@kennethmorton
Copy link

Reasoner Pydantic is a project that aims to build pydantic models as a means for validation and serialization. It has been used in production for some time and is available on pypi . I think we should explore integration of this project with the validator service.

@kennethmorton kennethmorton added the enhancement New feature or request label May 11, 2022
@RichardBruskiewich
Copy link
Collaborator

Hi @kennethmorton,

At the moment, the TRAPI validation in this package is strictly a JSON schema validation of a TRAPI JSON message. Do you have some idea at what level could we would leverage the Reasoner Pydantic here? Do you think we'd rewrite parts of the Biolink Model validation part with Pydantic Reasoner (for accessing the salient parts of the TRAPI message)? I imagine that doing that might conceivably buffer the reasoner-validator from too much refactoring for future TRAPI releases(?): I know that the system is currently coded to target TRAPI 1.2.

Do you have some specific suggestions on how to 'resolve' this issue?

That said, the Biolink Model validations mainly leverage the Biolink Model Toolkit, which also (I suspect) now uses Pydantic (but on the semantic model level...).

@kennethmorton
Copy link
Author

Hi @RichardBruskiewich,

I actually think the opposite. I haven't read everything fully but I would image you could integrate a lot of the Biolink Model validation code fairly easily with the Reasoner Pydantic code base. Reasoner Pedantic is a pythonic schema validator that offers some serialization speedups, so largely has a lot of the same benefits of this package.

Reasoner pedantic as it currently exists, can't simultaneously support multiple versions of TRAPI nor does it have a service to perform validation. I'm not sure it makes sense to completely merge the two repositories.

Perhaps this issue is better transfered to reasoner pydantic to suggest that it add biolink model validation.

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

No branches or pull requests

2 participants