Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflow to store and pull streetview images from GCS subdirectory #894

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from

Conversation

nlebovits
Copy link
Collaborator

To better organize GCS, this PR adds a subdirectory in which to store streerview images, and also updates the front end to pull the images correctly from that directory. Addresses #717 .

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vacant-lots-proj ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 24, 2024 2:02pm

@CodeWritingCow
Copy link
Collaborator

@nlebovits the "PR Checks Backend" is failing. A formatting or linting issue might be causing this. Can you take a look? Thanks!

Screen Shot 2024-09-19 at 7 19 42 PM Screen Shot 2024-09-19 at 7 19 54 PM Screen Shot 2024-09-19 at 7 20 22 PM

Copy link
Collaborator

@CodeWritingCow CodeWritingCow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nlebovits this PR is running into formatting or linting issues. Can you take a look?

@nlebovits
Copy link
Collaborator Author

@CodeWritingCow yep! on it

url = f"https://maps.googleapis.com/maps/api/streetview/metadata?location={quote(address)}, Philadelphia, PA&key={key}"
response = requests.get(url)
return response.json()
url = f"http://example.com/metadata/{address}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an incorrect url, it used to be maps.googleapis.com

metadata = get_streetview_metadata(row["address"])
upload_image_with_metadata(blob, image_content, metadata)
# Check if file already exists
if not blob.exists():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is contrary to comment above.



# Function to retry failed addresses until all succeed
def retry_failed_addresses():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has this been tested?



# Retry failed addresses sequentially until
def process_failed_addresses_sequentially():
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

has this been tested?

@nlebovits
Copy link
Collaborator Author

@zigouras thanks for the review. there are a number of errors in the code--I took a break from working on it on Thursday but expect to get back to it this week.

@nlebovits
Copy link
Collaborator Author

@CodeWritingCow can you review the front end pieces of this commit and lmk if you see where my code is going wrong and what I can fix. No worries if not--I need to put more time into this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants