-
Notifications
You must be signed in to change notification settings - Fork 5
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
Load data into Vercel using GitHub Actions #161
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
.github/workflows/etl_to_neon.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While in development, the workflow is only triggered once a week - to save on data transfer costs. The free limit of data transfer is 5 GB/month.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a neon or Github Actions limit? Just curious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a neon limit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a mypy error: Incompatible types in assignment (expression has type "dict[str, tuple[float, float] | None]", variable has type "dict[str, tuple[float, float]]")
. Wasn't sure if I can safely change the type, so temporarily silenced the warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The duplicate check relied on the auto increment PK, which prevented duplicates from being detected. Replaced the autoincrement key with a composite PK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a UNIQUE
constraint to the Property_address
field, so that it can be used to prevent duplicates in the Soft_story_properties
table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one concern, everything else looks good. I will take a look at the mapbox geojson manager type error at a later point.
@@ -3,7 +3,7 @@ | |||
from backend.api.config import settings | |||
|
|||
# Set up the database engine using settings | |||
engine = create_engine(settings.database_url_sqlalchemy, echo=True) | |||
engine = create_engine(settings.neon_url, echo=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there consequences to changing this script to connect to the Neon DB as opposed to the local DB? As in, if I want to test my local DB, do I need to change this line back to connect to database_url_sqlalchemy
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you'd have to change this line back to test locally. If this is a problem, I can add an if-clause that would switch the url based on the environment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I think it’s fine for now. I would probably prefer putting more data in the test DB.
Description
ST_Simplify
with the tolerance level of 0.0001Closes #150, addresses but doesn't close #154
Type of changes
Testing
How to test
Manually trigger the
ETL to Neon
workflow.