import json from absl import logging from track_discovery.adapters.accoustic_brainz import AccousticBrainzAdapter def etl_from_raw_file(filepath:str)->dict: """ Extract transform and load from raw files params: filepath: str - filepath returns: dict - dictionary of features """ adapter = AccousticBrainzAdapter() with open(filepath) as json_file: raw_lowlevel_features = json.load(json_file) features = adapter.transform(raw_lowlevel_features) logging.debug(features) return features