Skip to content

Commit

Permalink
fix: fixed tests and removed return of failed rows for download from …
Browse files Browse the repository at this point in the history
…mapillary
  • Loading branch information
Gigaszi committed Nov 28, 2024
1 parent df17d3c commit 8593a3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mapswipe_workers/mapswipe_workers/utils/process_mapillary.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ def download_and_process_tile(row, attempt_limit=3):
data = pd.DataFrame(data)

if not data.empty:
return data, None
return data
except Exception as e:
print(f"An exception occurred while requesting a tile: {e}")
attempt += 1

print(f"A tile could not be downloaded: {row}")
return None, row
return None


def coordinate_download(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def setUp(self) -> None:
df = pd.read_csv(file)
df['geometry'] = df['geometry'].apply(wkt.loads)

mock_get.return_value = (df, None)
mock_get.return_value = df
self.project = StreetProject(project_draft)

def test_init(self):
Expand Down

0 comments on commit 8593a3c

Please sign in to comment.