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

Revise the schema validation tests #838

Open
surchs opened this issue Dec 18, 2024 · 3 comments
Open

Revise the schema validation tests #838

surchs opened this issue Dec 18, 2024 · 3 comments
Labels
tests Enhancing or fixing tests where functioning is not affected.

Comments

@surchs
Copy link
Contributor

surchs commented Dec 18, 2024

Right now our schema validation test is not useful because it will always pass:

https://github.com/neurobagel/annotation_tool/blob/480d493c15df6cb41287274a7a7ad63bfb41bc37/cypress/e2e/validate-output.cy.js

Since #836 this test is now skipped. But we should instead clean it up by either removing it completely or replacing it with a good test.

The problems of the current test are

  • it only validates a single static file (the example data dictionary) against another static file (our copy of the data dictionary schema)
  • the data dictionary is annoying to recreate, essentially you have to manually annotate a dataset and save it
  • we already validate all data dictionaries that are being created against the schema, that's how the validation check on the download page works. So this test is pretty redundant right now
  • it could make more sense if it would always pull the freshest copy of the data dictionary schema and test against that. This at least would ensure that our tools still work with the current schema
@surchs surchs added the tests Enhancing or fixing tests where functioning is not affected. label Dec 18, 2024
@Ravish990
Copy link

@surchs Hello sir , I am Ravish . I would like to fix the issue . can you please assign it to me?
Following are the steps we can apply:-

Dynamic Schema Validation:

Instead of using a static copy of the data dictionary schema, the test could dynamically pull the freshest copy of the data dictionary schema and validate against that. This would ensure that the tools are always tested against the most up-to-date schema, providing more relevant and accurate validation.

for this we can do following:-

Automate Schema Fetching: Use a script to get the latest schema.

Integrate Fetching into Workflow: Include schema fetching as a step in your test workflow.

Update Test Scripts: Ensure scripts use the freshly fetched schema.

After that we can automate the task .

I would like to work on it . Can you please assign it to me??

@Ravish990
Copy link

To automate the process of dynamically fetching the latest data dictionary schema and running validation tests, you can set up a Continuous Integration/Continuous Deployment (CI/CD) pipeline. This pipeline will ensure that the process runs automatically whenever there's a change.

@surchs
Copy link
Contributor Author

surchs commented Dec 20, 2024

Hey @Ravish990, thanks for your interest in contributing to Neurobagel! I think this issue is not a great place to start. If you are interested in frontend, you can also take a look at our query tool: https://github.com/neurobagel/query-tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Enhancing or fixing tests where functioning is not affected.
Projects
Status: No status
Development

No branches or pull requests

2 participants