Skip to content

Commit

Permalink
Add configs only
Browse files Browse the repository at this point in the history
  • Loading branch information
James Wood authored and James Wood committed Feb 1, 2025
1 parent 13df5df commit c7800fc
Show file tree
Hide file tree
Showing 3 changed files with 553 additions and 561 deletions.
26 changes: 8 additions & 18 deletions hitide_collections/hitide_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,23 +302,14 @@ def add_cumulus_footprint_image(self):
self.add_collections("", collections_query)


def list_all_forge_tig_configs(self):
"""
List all hitide forge-tig configuration files in the S3 directory".
:return: List of file keys in the specified directory.
"""
bucket_name = f"podaac-services-{self.env}-hitide"
prefix = "dataset-configs"

s3_client = boto3.client("s3")
response = s3_client.list_objects_v2(Bucket=bucket_name, Prefix=prefix)

if "Contents" in response:
return [obj["Key"] for obj in response["Contents"]]
else:
return []
def add_configs(self):

s3_url = f"s3://podaac-services-{self.env}-hitide/dataset-configs"

forge_tig_config_files = self.s3.list_s3_keys(s3_url)

print(forge_tig_config_files)


def add_watches(self):

Expand Down Expand Up @@ -541,9 +532,8 @@ def bearer_token(self):

def run(self):

data_configs = self.list_all_forge_tig_configs()
print(data_configs)
self.add_watches()
self.add_configs()
self.update_associations("PODAAC L2 Cloud Subsetter", "service")
self.update_associations("PODAAC Concise", "service")
self.update_associations("PODAAC L2SS-py Concise Chain", "service")
Expand Down
Loading

0 comments on commit c7800fc

Please sign in to comment.