-
Setup Environment:
git clone [email protected]:BlockScience/koi-net-gdrive-sensor-node.git cd koi-net-gdrive-sensor-node # Optional: Create Virtual Environment # python -m venv ./venv # source ./venv/bin/activate git checkout dev python -m pip install --upgrade pip pip install -r requirements.txt # location of all metadata including caches and identities mkdir net/metadata
-
Authentication Options:
-
Setup Developement Environment:
a. User Authentication - Quickstart / Testing Environment: Quickstart with Personal Google Account authentication and authorization flow - Following the steps in Google API Quickstart
b. Service Account Authentication: A User Account dedicated to the GDrive Sensor Full
Node web application -
Execute the following to download credentials:
# Run GDrive API python -m experiments.gdrive_api_exp
-
-
Setup Google Drive (KOI) Sensor Net:
- Coordinator Terminal:
python -m net.basic_coordinator_node
- Full Node Terminal(s):
python -m gdrive_sensor #--first_contact "http://127.0.0.1:8000/koi-net"
Testing:
- Integration Test Backfill by asserting Cache & Drive Equivalence as a result of a Backfill for mimetTypes defiend as RIDs:
- Pre-requisite:
python -m gdrive_sensor
- Should Pass for Types are defined as RIDs:
pytest -vs testing/test_backfill.py::Test_TypedCacheAndTypedDriveAreEquivalent
- Should Fail until ALL Types are defined as RIDs:
pytest -vs testing/test_backfill.py
- Pre-requisite:
Diagramming
- code2flow
python diagram_c2f.py
- pyreverse
pyreverse -o png -p GDriveSensor gdrive_sensor
# pyreverse -o mmd -p GDriveSensor gdrive_sensor
# mmdc -i classes_GDriveSensor.mmd -o classes_GDriveSensor.png
# mmdc -i packages_GDriveSensor.mmd -o packages_GDriveSensor.png