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

Allow current postgres config to run on GAE #210

Merged
merged 3 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ repos:
pass_filenames: false
entry: mypy
args: ['--config-file=setup.cfg']
additional_dependencies: ['mypy', 'types-PyYAML', 'types-requests', 'types-python-slugify']
additional_dependencies: ['mypy', 'types-PyYAML', 'types-requests', 'types-python-slugify', 'types-psycopg2']
2 changes: 1 addition & 1 deletion cli/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def db_engine(monkeymodule) -> Engine:
:returns Engine: Engine for use in other setup fixtures
"""
# SQLite doesnt support schemas, so remove pixl schema from engine options
execution_options = {"schema_translate_map": {"pixl": None}}
execution_options = {"schema_translate_map": {"pipeline": None}}
engine = create_engine(
"sqlite:///:memory:",
execution_options=execution_options,
Expand Down
2 changes: 1 addition & 1 deletion docker/postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ COPY --chmod=0755 ./postgres/postgres.conf /etc/postgresql/postgresql.conf

COPY --chmod=0777 ./postgres/pixl-db_init.sh /docker-entrypoint-initdb.d/pixl-db_init.sh

COPY ./postgres/create_pixl_tbls.py /pixl/create_pixl_tbls.py
COPY --chmod=0777 ./postgres/create_pixl_tbls.py /pixl/create_pixl_tbls.py

COPY ./pixl_core/ /pixl/pixl_core

Expand Down
2 changes: 1 addition & 1 deletion pixl_core/src/core/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
class Base(DeclarativeBase):
"""sqlalchemy base class"""

metadata = MetaData(schema="pixl")
metadata = MetaData(schema="pipeline")


class Extract(Base):
Expand Down
2 changes: 1 addition & 1 deletion postgres/create_pixl_tbls.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
engine = create_engine(url, echo=True, echo_pool="debug")

with engine.connect() as connection:
connection.execute(CreateSchema("pixl", if_not_exists=True))
connection.execute(CreateSchema("pipeline", if_not_exists=True))
connection.commit()

Base.metadata.create_all(engine)