Still working on it
Created a cloud function entry point called main.py in app/functions/ which essentially just listens to see if any new document has been added to the "Test" collection. This new document must contain a "name" field. After a new document is created with the "name" field and value, it updates that document by running a test script called "points_calculator.py" on that document that just returns a JSON output in the form "points": "Hello " + name. This document subsequently gets a field called "points" whose value is "Hello " + the name field's value.
This has been thoroughly tested in the cloud firestore emulator which should accurately mimic the production database
Future with this new updates:
we can reuse the entry point "main.py" to easily pass the data of a document when it is created in the "UCLA (M)" collection. It will then run the jupyter notebook (we must convert it to a script that can automatically run the fields) on that data that must take in JSON input and give out JSON output of the points field. This will then automatically update the document with the "points" field and this way we will have both the "shots" field from marking the video and the "points" field after having run the notebook on the data.
Still working on it Created a cloud function entry point called main.py in app/functions/ which essentially just listens to see if any new document has been added to the "Test" collection. This new document must contain a "name" field. After a new document is created with the "name" field and value, it updates that document by running a test script called "points_calculator.py" on that document that just returns a JSON output in the form "points": "Hello " + name. This document subsequently gets a field called "points" whose value is "Hello " + the name field's value.
This has been thoroughly tested in the cloud firestore emulator which should accurately mimic the production database
Future with this new updates: