Skip to content

Commit

Permalink
remove non-ucsc filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
svonworl committed Nov 13, 2024
1 parent ce8aca1 commit 51b04f1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions report.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,13 +706,6 @@ def readTerraWorkspaces(self, path: str) -> Sequence[Mapping]:
return []
return []

def removeNonUcsc(self, terra_workspaces: Sequence[Mapping]) -> Sequence[Mapping]:
return [
mapping for mapping in terra_workspaces if 'workspace' in mapping
and 'createdBy' in mapping['workspace']
and self.isUcscEmail(mapping['workspace']['createdBy'])
]

def isUcscEmail(self, email: str) -> bool:
return email.endswith('ucsc.edu') or email.endswith('gmail.com')

Expand All @@ -726,7 +719,7 @@ def saveUsageData(self, date: datetime.date):
]
self.save_file(self.generate_billing_csv_file_name(date), self.to_csv(rows))
terra_workspaces = self.readTerraWorkspaces(self.terra_workspaces_path)
self.save_file(self.generate_terra_json_file_name(date), self.to_json(self.removeNonUcsc(terra_workspaces)))
self.save_file(self.generate_terra_json_file_name(date), self.to_json(terra_workspaces))

def addCreatedByToRows(self, rows: Sequence[Mapping], terra_workspaces: Sequence[Mapping]):
id_to_created_by = {
Expand Down

0 comments on commit 51b04f1

Please sign in to comment.