olirice / alembic_utils

An alembic/sqlalchemy extension for migrating sql views, functions, triggers, and policies
https://olirice.github.io/alembic_utils
MIT License
211 stars 43 forks source link

sqlalchemy 1.4 & 2.0 support (1.3 dropped) #105

Closed jdimmerman closed 1 year ago

jdimmerman commented 1 year ago

Fixes for

Still one failing test

olirice commented 1 year ago

CI is passing. which test is failing for you locally?

The pre-commit CI check can be resolved with

pip install pre-commit
pre-commit install
pre-commit run --all

which will format the files

jdimmerman commented 1 year ago

Great thanks @olirice. I pushed the formatting fixes.

I'm seeing a failure for the following

src/test/test_recreate_dropped.py::test_succeeds_when_defering - sqlalchemy.exc.ProgrammingError: (psycopg2.errors.DuplicateTable) relation "branch" already exists
codecov-commenter commented 1 year ago

Codecov Report

Merging #105 (3daa6e7) into master (aef523d) will decrease coverage by 0.01%. The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##           master     #105      +/-   ##
==========================================
- Coverage   99.88%   99.88%   -0.01%     
==========================================
  Files          18       18              
  Lines         863      862       -1     
==========================================
- Hits          862      861       -1     
  Misses          1        1              
Flag Coverage Δ
unittests 99.88% <100.00%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/alembic_utils/testbase.py 100.00% <ø> (ø)
src/alembic_utils/__init__.py 100.00% <100.00%> (ø)
src/alembic_utils/simulate.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

jdimmerman commented 1 year ago

Ah @olirice the test only fails with sqlalchemy 2+. I think ideally CI would run against 1.x and 2.x as part of this PR.

olirice commented 1 year ago

thanks for your work on this, I appreciate it!

the update is available on pypi alembic_utils==0.8.1