Closed pritchardn closed 1 year ago
Addressing Andreas' comments
1. When trying to deploy to ood-cld the graph does get deployed but there is an error message and the execution fails as well. The error message in the translator log says: TypeError: 'str' object is not an iterator
Fixed, the new gen_pg endpoint was returning a streaming response - which was incorrect, this has been changed to a JSONResponse; much more sensible. The JSON is a string, however, so in the main.js file, this needs to be parsed before sending off to OOD.
2. This is actually a left-over I've found when trying the really nice FastAPI docs feature: There is a stray </script> tag at the very end of matrix_vis.html.
Easily fixed
3. The API docs should probably also be an additional item in the Help pull-down menu
Added
This MR re-implements the translator web service with Fast API. Additionally, this MR provides new implementations for each of the translator command-line actions.
To see the live documentation of the translator, load up an instance (e.g. 0.0.0.0:8086) and head to 0.0.0.0:8086/docs. Not only is this a clean presentation of the APIs, but allows for manual in-browser testing of each of the endpoints. I have convinced myself that the re-implementation does introduce any breaking changes, although I would like this to be checked before merging if possible.
I will henceforth evangelise FastAPI - it is a delight to use.