Skip to content

Commit

Permalink
chore: enable debug sqlalchemy and alembic, updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyrcdias committed Oct 25, 2022
1 parent 5087168 commit c03776e
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 38 deletions.
1 change: 1 addition & 0 deletions kingdom_sdk/adapters/unit_of_work.py
Expand Up @@ -15,6 +15,7 @@
bind=create_engine(
config.get_database_url(),
isolation_level="REPEATABLE_READ",
echo=config.is_debug_active(),
),
autoflush=False,
)
Expand Down
4 changes: 3 additions & 1 deletion kingdom_sdk/database/migrations.py
Expand Up @@ -55,7 +55,9 @@ def run_migrations_online(
In this scenario we need to create an Engine
and associate a connection with the context.
"""
connectable = create_engine(config.get_database_url())
connectable = create_engine(
config.get_database_url(), echo=config.is_debug_active()
)

with connectable.connect() as connection:
if schema:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -30,6 +30,7 @@ python-dotenv = "^0.19.1"
sql-formatter = "^0.6.2"
types-redis = "^3.5.15"
pytest-asyncio = "^0.16.0"
click = "8.0.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
63 changes: 30 additions & 33 deletions requirements.dev.txt
@@ -1,52 +1,49 @@
alembic==1.7.5; python_version >= "3.6"
atomicwrites==1.4.0; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.4.0"
attrs==21.2.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
backports.entry-points-selectable==1.1.1; python_version >= "2.7" and python_full_version >= "3.6.1"
black==21.10b0; python_full_version >= "3.6.2"
cfgv==3.3.1; python_full_version >= "3.6.1"
click==8.0.3; python_version >= "3.6" and python_full_version >= "3.6.2"
colorama==0.4.4; sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.6.2" and platform_system == "Windows" and (python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.5.0")
distlib==0.3.3; python_full_version >= "3.6.1"
filelock==3.4.0; python_version >= "3.6" and python_full_version >= "3.6.1"
alembic==1.8.1; python_version >= "3.7"
atomicwrites==1.4.1; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.4.0"
attrs==22.1.0; python_version >= "3.6"
black==21.12b0; python_full_version >= "3.6.2"
cfgv==3.3.1; python_full_version >= "3.6.1" and python_version >= "3.7"
click==8.0.2; python_version >= "3.6"
colorama==0.4.6; sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.7.0" and platform_system == "Windows" and (python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.7.0")
distlib==0.3.6; python_version >= "3.7"
filelock==3.8.0; python_version >= "3.7"
flake8==4.0.1; python_version >= "3.6"
greenlet==1.1.2; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and python_full_version >= "3.5.0" and (python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6")
identify==2.3.6; python_full_version >= "3.6.1"
greenlet==1.1.3.post0; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.7") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and python_full_version >= "3.5.0" and (python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.7")
identify==2.5.7; python_version >= "3.7"
iniconfig==1.1.1; python_version >= "3.6"
isort==5.10.1; python_full_version >= "3.6.1" and python_version < "4.0"
jinja2==3.0.3; python_version >= "3.6"
jinja2==3.1.2; python_version >= "3.7"
jinjasql==0.1.8
mako==1.1.5; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
markupsafe==2.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
mako==1.2.3; python_version >= "3.7"
markupsafe==2.1.1; python_version >= "3.7"
mccabe==0.6.1; python_version >= "3.6"
mypy-extensions==0.4.3; python_version >= "3.5" and python_full_version >= "3.6.2"
mypy==0.910; python_version >= "3.5"
nodeenv==1.6.0; python_full_version >= "3.6.1"
packaging==21.2; python_version >= "3.6"
pathspec==0.9.0; python_full_version >= "3.6.2"
platformdirs==2.4.0; python_version >= "3.6" and python_full_version >= "3.6.2"
nodeenv==1.7.0; python_version >= "3.7" and python_full_version < "3.0.0" or python_full_version >= "3.7.0" and python_version >= "3.7"
packaging==21.3; python_version >= "3.6"
pathspec==0.10.1; python_version >= "3.7" and python_full_version >= "3.6.2"
platformdirs==2.5.2; python_version >= "3.7" and python_full_version >= "3.6.2"
pluggy==1.0.0; python_version >= "3.6"
pre-commit==2.15.0; python_full_version >= "3.6.1"
psycopg2-binary==2.9.2; python_version >= "3.6"
pre-commit==2.20.0; python_version >= "3.7"
psycopg2-binary==2.9.5; python_version >= "3.6"
py==1.11.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
pyclean==2.0.0
pyclean==2.2.0
pycodestyle==2.8.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.6"
pydocstyle==6.1.1; python_version >= "3.6"
pyflakes==2.4.0; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6"
pyparsing==2.4.7; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.3.0" and python_version >= "3.6"
pyparsing==3.0.9; python_full_version >= "3.6.8" and python_version >= "3.6"
pytest-asyncio==0.16.0; python_version >= "3.6"
pytest==6.2.5; python_version >= "3.6"
python-dotenv==0.19.2; python_version >= "3.5"
pytz==2021.3
pyyaml==6.0; python_version >= "3.6" and python_full_version >= "3.6.1"
pyyaml==6.0; python_version >= "3.7"
redis==3.5.3; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
regex==2021.11.10; python_full_version >= "3.6.2"
six==1.16.0; python_full_version >= "3.6.1"
snowballstemmer==2.1.0; python_version >= "3.6"
snowballstemmer==2.2.0; python_version >= "3.6"
sql-formatter==0.6.2; python_version >= "3.6"
sqlalchemy==1.4.27; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
sqlalchemy==1.4.42; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
toml==0.10.2; (python_version >= "2.6" and python_full_version < "3.0.0") or (python_full_version >= "3.3.0")
tomli==1.2.2; python_version >= "3.6" and python_full_version >= "3.6.2"
types-pytz==2021.3.0
types-redis==3.5.16
typing-extensions==4.0.0
virtualenv==20.10.0; python_full_version >= "3.6.1"
tomli==1.2.3; python_version >= "3.6" and python_full_version >= "3.6.2"
types-pytz==2021.3.8
types-redis==3.5.18
typing-extensions==4.4.0
virtualenv==20.16.5; python_version >= "3.7"
8 changes: 4 additions & 4 deletions requirements.txt
@@ -1,7 +1,7 @@
greenlet==1.1.2; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and python_full_version >= "3.5.0"
jinja2==3.0.3; python_version >= "3.6"
greenlet==1.1.3.post0; python_version >= "3" and python_full_version < "3.0.0" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") or python_version >= "3" and (platform_machine == "aarch64" or platform_machine == "ppc64le" or platform_machine == "x86_64" or platform_machine == "amd64" or platform_machine == "AMD64" or platform_machine == "win32" or platform_machine == "WIN32") and (python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0") and python_full_version >= "3.5.0"
jinja2==3.1.2; python_version >= "3.7"
jinjasql==0.1.8
markupsafe==2.0.1; python_version >= "3.6"
markupsafe==2.1.1; python_version >= "3.7"
pytz==2021.3
redis==3.5.3; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
sqlalchemy==1.4.27; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
sqlalchemy==1.4.42; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")

0 comments on commit c03776e

Please sign in to comment.