-
Notifications
You must be signed in to change notification settings - Fork 4
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
Write tests for cam-pipeline #94
Comments
Moving over the existing code is going to be a pain, because it has deep dependencies with ZIO testing, Circe and the code in cam-kp-api that models the TRAPI messages. Instead, I think the right approach needs to be:
An example of a simple query that works against Automat CAM-KP (i.e. by running {
"message": {
"query_graph": {
"nodes": {
"n0": {
"categories": ["biolink:Gene"],
"ids": ["NCBIGene:13870"]
},
"n1": {
"categories": ["biolink:BiologicalProcess"]
}
},
"edges": {
"e01": {
"subject": "n0",
"object": "n1",
"predicates": ["biolink:causes"]
}
}
}
}
} |
This PR adds a test suite in Python for CAM-KP-API to cam-pipeline. Some of this code has been moved over from https://github.com/ExposuresProvider/cam-kp-api and the rest has been newly written for this. There are three tests here: - test_api.py: test the Automat-CAM-KP API endpoints. - test_examples.py: tests the example files in `examples/`. - test_curies.py: test a set of CURIEs to see if Automat-CAM-KP has information or not about them. This currently includes failing tests from #101 I tried to move over the integration tests from CAM-KP-API, but I couldn't work out the easiest way to figure out how to move them over as a Scala project. I think these Python tests are easier to read and maintain, but I'm happy to be proved wrong. Closes #94
Probably the simplest way of doing this would be to add tests to Souffle so that invalid or suspicious edges are reported somewhere (e.g. any edge that isn't mapped to a Biolink predicate).
We should also set up a test kit in this repository that can query the TRAPI endpoint and confirm that it is working correctly. We have code for doing that in https://github.com/ExposuresProvider/cam-kp-api/, so we could try moving that over in Scala/ZIO or rewriting it into Souffle/Python/something simple.
The text was updated successfully, but these errors were encountered: