global-research-platform
global-research-platform copied to clipboard
As a user I can see the results of calculations using uploaded Adoption and TAM data
This is the complement to #5 and #53. Once we have an API endpoint to create new resource entities, how are those used in the calculations.
First step is to research the options for passing adoption and TAM data dynamically to the calculate functions, instead of using the data loaded from the Solutions API CSVs at init.
So in the setup_calculations
function in service/api/calculate.py
line 240, we're just importing an entire solution object before sending it along to be calculated at a later step. I think we should just be able to add our own VMA, TAM, adoption and custom adoption data at that point, similar to how we're doing advanced controls inputs. It's pretty messy, but I think it should work. I don't see any other way to do it, given the current implementation.
what do you think @eethann @sutjin
Notes after discussion:
- Data will stay inside the platform code and solution will GET the data based on the name input, before defaulting to local
- Solution data layer sould be decoupled from the platform as a depdendency, suggested to use REST
So in the platform side, our changes would be passing in a unique name/id that the solutions can do a GET call.