-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Remove duplicate color for waterwaste #1226
Conversation
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.
Thanks Josh! One small comment.
Besides the code changes themselves, I think we'll also need to run something to upgrade the database with this new color. More background: https://github.com/hackforla/311-data/tree/dev/server/api/alembic
I'm not sure how to do this right now. Are you interested in looking into this?
I'll take a look - will give you updates later today. Thanks for the suggestion! |
FYI, this has been on my mind since I've been looking at the databases. I think we'd either need to manually update this row by SSHing into the database (we currently don't have access to do this right now), or we'd need to write a new alembic script that drops the request_types table and creates it again given the new data. |
Thanks for the suggestions Nich! I was curious regarding the point on alembic script - does simply changing the color field in the request_types table not work? See dummy script below: # flake8: noqa
"""update request type color
Revision ID: N/A
Revises: f605be47c1ec
Create Date: 2022-06-05 10:37:43.545716
"""
from os.path import join, dirname
from alembic import op
# revision identifiers, used by Alembic.
revision = ' N/A'
down_revision = 'f605be47c1ec'
branch_labels = None
depends_on = None
DATA_FOLDER = join(dirname(__file__), '../seeds/')
def upgrade():
op.execute('UPDATE request_types SET color = "#DCED08" WHERE type_name = "Water Waste"')
def downgrade():
op.execute('UPDATE request_types SET color = #EDAD08 WHERE type_name = "Water Waste"')
Reference: request_types table definition P.S.
|
Yes, I think your solution works too! |
@joshuayhwu : is this something we can finish up? |
Isn't this the one that required SSH from Matt because we need to make update with alembic? If we ignore the db part then the rest is indeed completed |
Trying to get an empty migration script with alembic revision with docker after using bash entry point - but failed at running docker containers. Seems to be some issue with the async functions. Any thoughts on this?
|
Hey @joshuayhwu, have you tried running |
Ah - now I am facing the same docker error I faced before you came where the API where the prefect container is not starting :(
The issue sort of resolved itself when I started manually starting containers on the docker UI, but after using docker-compose up again it seems to get back to the same buggy state. |
Hmm could you explain why it seems like the prefect container is not starting? It seems like it is starting, but it just exits early? Are you using Docker Desktop? Can you check if there's a container called 311-prefect? Also, I think you can just directly run |
You're right - the container starts and immediately exits. I am currently using Docker Desktop on my PC with wsl2 backend. There is container called 311-prefect. I tried running the docker-compose up, but the prefect container exit early again. Then I tried running the docker-compose run api ... line, and return the following. API still unavailable?
|
Closed without merge due to outdated PR & irrelevant to current working branch |
Fixes #{1223}
Added color "#DCED08" for water waste in DISCRETE_COLOR_MAP of design.py and update the reference file.
dev
branch