Skip to content

Commit

Permalink
Merge pull request #4052 from NicholasTurner23/update-fix/Clean_up
Browse files Browse the repository at this point in the history
Update fix/clean up
  • Loading branch information
Baalmart authored Dec 12, 2024
2 parents e2ebab3 + 23a1218 commit 76f24f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/workflows/airqo_etl_utils/airqo_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_devices(
Retrieve devices given a network and device category.
Args:
- network (str): An Enum that represents site ownership.
- network (str): A string that represents device manufaturer.
- device_category (DeviceCategory, optional): An Enum that represents device category. Defaults to `DeviceCategory.None` if not supplied.
Returns:
Expand Down
5 changes: 2 additions & 3 deletions src/workflows/airqo_etl_utils/meta_data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class MetaDataUtils:
@staticmethod
def extract_devices_from_api(tenant: Tenant = Tenant.ALL) -> pd.DataFrame:
def extract_devices_from_api(network: str = "all") -> pd.DataFrame:
devices = AirQoApi().get_devices()
dataframe = pd.json_normalize(devices)
dataframe = dataframe[
Expand All @@ -20,13 +20,12 @@ def extract_devices_from_api(tenant: Tenant = Tenant.ALL) -> pd.DataFrame:
"site_id",
"device_id",
"device_number",
"name",
"description",
"device_manufacturer",
"device_category",
]
]

dataframe["name"] = dataframe["device_id"]
dataframe = DataValidationUtils.remove_outliers(dataframe)

return dataframe
Expand Down

0 comments on commit 76f24f1

Please sign in to comment.