Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to production #4055

Merged
merged 12 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion k8s/analytics/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ images:
celeryWorker: eu.gcr.io/airqo-250220/airqo-analytics-celery-worker
reportJob: eu.gcr.io/airqo-250220/airqo-analytics-report-job
devicesSummaryJob: eu.gcr.io/airqo-250220/airqo-analytics-devices-summary-job
tag: prod-7ca041eb-1734008736
tag: prod-ecb85570-1734011546
api:
name: airqo-analytics-api
label: analytics-api
Expand Down
2 changes: 1 addition & 1 deletion k8s/device-registry/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app:
replicaCount: 3
image:
repository: eu.gcr.io/airqo-250220/airqo-device-registry-api
tag: prod-7ca041eb-1734008736
tag: prod-ecb85570-1734011546
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion k8s/exceedance/values-prod-airqo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ app:
configmap: env-exceedance-production
image:
repository: eu.gcr.io/airqo-250220/airqo-exceedance-job
tag: prod-7ca041eb-1734008736
tag: prod-ecb85570-1734011546
nameOverride: ''
fullnameOverride: ''
2 changes: 1 addition & 1 deletion k8s/exceedance/values-prod-kcca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ app:
configmap: env-exceedance-production
image:
repository: eu.gcr.io/airqo-250220/kcca-exceedance-job
tag: prod-7ca041eb-1734008736
tag: prod-ecb85570-1734011546
nameOverride: ''
fullnameOverride: ''
2 changes: 1 addition & 1 deletion k8s/predict/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ images:
predictJob: eu.gcr.io/airqo-250220/airqo-predict-job
trainJob: eu.gcr.io/airqo-250220/airqo-train-job
predictPlaces: eu.gcr.io/airqo-250220/airqo-predict-places-air-quality
tag: prod-7ca041eb-1734008736
tag: prod-ecb85570-1734011546
api:
name: airqo-prediction-api
label: prediction-api
Expand Down
2 changes: 1 addition & 1 deletion k8s/spatial/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app:
replicaCount: 3
image:
repository: eu.gcr.io/airqo-250220/airqo-spatial-api
tag: prod-7ca041eb-1734008736
tag: prod-ecb85570-1734011546
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion k8s/website/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ app:
replicaCount: 3
image:
repository: eu.gcr.io/airqo-250220/airqo-website-api
tag: prod-7ca041eb-1734008736
tag: prod-ecb85570-1734011546
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion k8s/workflows/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ images:
initContainer: eu.gcr.io/airqo-250220/airqo-workflows-xcom
redisContainer: eu.gcr.io/airqo-250220/airqo-redis
containers: eu.gcr.io/airqo-250220/airqo-workflows
tag: prod-7ca041eb-1734008736
tag: prod-ecb85570-1734011546
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
2 changes: 1 addition & 1 deletion k8s/workflows/values-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ images:
initContainer: eu.gcr.io/airqo-250220/airqo-stage-workflows-xcom
redisContainer: eu.gcr.io/airqo-250220/airqo-stage-redis
containers: eu.gcr.io/airqo-250220/airqo-stage-workflows
tag: stage-c43059fe-1734008689
tag: stage-76f24f1c-1734011507
nameOverride: ''
fullnameOverride: ''
podAnnotations: {}
Expand Down
4 changes: 3 additions & 1 deletion src/workflows/airqo_etl_utils/meta_data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
from .constants import Tenant
from .data_validator import DataValidationUtils
from .weather_data_utils import WeatherDataUtils
from datetime import datetime, timezone


class MetaDataUtils:
@staticmethod
def extract_devices_from_api(network: str = "all") -> pd.DataFrame:
def extract_devices_from_api() -> pd.DataFrame:
devices = AirQoApi().get_devices()
dataframe = pd.json_normalize(devices)
dataframe = dataframe[
Expand All @@ -26,6 +27,7 @@ def extract_devices_from_api(network: str = "all") -> pd.DataFrame:
]
]
dataframe["name"] = dataframe["device_id"]
dataframe["last_updated"] = datetime.now(timezone.utc)
dataframe = DataValidationUtils.remove_outliers(dataframe)

return dataframe
Expand Down
15 changes: 0 additions & 15 deletions src/workflows/airqo_etl_utils/schema/devices.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
[
{
"name": "tenant",
"type": "STRING",
"mode": "REQUIRED"
},
{
"name": "network",
"type": "STRING",
Expand All @@ -19,16 +14,6 @@
"type": "FLOAT",
"mode": "NULLABLE"
},
{
"name": "approximate_latitude",
"type": "FLOAT",
"mode": "NULLABLE"
},
{
"name": "approximate_longitude",
"type": "FLOAT",
"mode": "NULLABLE"
},
{
"name": "site_id",
"type": "STRING",
Expand Down
Loading