x-atlas-consortia / ubkg-api

A web service for the Unified Biomedical Knowlege Graph system
MIT License
0 stars 0 forks source link

Complete refactoring: move validate_application_context() from ubkg-api to hs-ontology-api #79

Closed AlanSimmons closed 1 week ago

AlanSimmons commented 1 year ago

fyi @shirey @yuanzhou

Statement of problem

The ubkg-api contains code that checks for application context. This code should be in the hs-ontology-api.

Solution

  1. Copy validate.py to hs-ontology-api.
  2. Update pointers in hs-ontology-api to use the version of validate.py in hs-ontology-api instead of the version in ubkg-api.
  3. Remove validate.py from ubkg-api.
yuanzhou commented 12 months ago

@AlanSimmons to complete your solution list, we'll also need to

AlanSimmons commented 12 months ago

@yuanzhou A couple of notes:

  1. You are correct in that the test calls in the test_api.sh script need to be modified. The issue, however, is not that the script contains calls that it should be in hs-ontology-api, but that the calls erroneously contain the application_context parameter. The current set of calls is specific to ubkg-api endpoints. It is a matter of removing from the calls the reference to application_context, not moving the calls themselves.
  2. I'm not sure whether the tests in test_controllers.py would work in their current form. The "expected response" JSONs referenced (e.g., sennet_expected_responses/valueset_organs.json) are ignored by .gitignore. We'd need to regenerate them. This seems like something that we need to rearchitect, so that the expected results of tests are stored in a form accessible to anyone who needs to regression test--i.e., not ignored, but in a path in the repo. I'll create a separate issue.