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

chore: fix coverage tests sqlalchemy 2.0 migration #987

Merged

Conversation

kiraksi
Copy link
Contributor

@kiraksi kiraksi commented Jan 10, 2024

This PR:

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #934 🦕

@kiraksi kiraksi added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 10, 2024
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. labels Jan 10, 2024
@nayaknishant nayaknishant added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 16, 2024
@kiraksi kiraksi force-pushed the migration-coverage branch from df9d72c to 65b8ce8 Compare January 22, 2024 21:40
@kiraksi kiraksi added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 24, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 24, 2024
@kiraksi kiraksi marked this pull request as ready for review January 24, 2024 05:57
@kiraksi kiraksi requested review from a team as code owners January 24, 2024 05:57
@kiraksi kiraksi requested review from m-strzelczyk and Neenu1995 and removed request for m-strzelczyk and Neenu1995 January 24, 2024 05:57
@kiraksi kiraksi requested a review from chalmerlowe January 24, 2024 05:57
@kiraksi kiraksi added the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 24, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 24, 2024
@kiraksi kiraksi removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 24, 2024
@kiraksi kiraksi changed the base branch from main to development-build-v1.11.0.dev0 January 25, 2024 19:48
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: xl Pull request size is extra large. labels Jan 25, 2024
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: l Pull request size is large. labels Jan 29, 2024
@kiraksi kiraksi force-pushed the migration-coverage branch from dfda247 to 1f6b887 Compare January 29, 2024 22:14
@product-auto-label product-auto-label bot added size: l Pull request size is large. size: s Pull request size is small. and removed size: s Pull request size is small. size: l Pull request size is large. labels Jan 29, 2024
@kiraksi kiraksi force-pushed the migration-coverage branch from 4325fef to 1f6b887 Compare January 29, 2024 22:38
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: s Pull request size is small. labels Jan 29, 2024
@kiraksi kiraksi merged commit 19d9ce2 into googleapis:development-build-v1.11.0.dev0 Jan 29, 2024
8 checks passed
chalmerlowe added a commit that referenced this pull request Apr 3, 2024
…#1053)

* feat!: Support SQLAlchemy 2.0, drop support for 1.x

This patch makes this library backward incompatible for
versions of SQLAlchemy < 2.0.

Fixes #510

* constraints updated

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fixing README.rst

* fixing README.rst

* upping sqlalchemy version in constraints-3.8.txt

* adding 2.0 version restrictions to owlbot.py

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix for

* Updated some compliance tests for sqla2 and bq

* Addressed snippet errors

* revert bad commit

* More compliance tests checking

* reformatted with black

* Changed more compliance tests, updated requirements for testing

* Fixed attributeerror in failing sample test

* Fixed geolography test failing issue

* Minor tweaks to tests and code

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Fixed small error in compliance tests, added pip freeze for owl bot testing

* Fixed some failing compliance tests by reformatting

* Added UuidTest to compliance tests

* Moved back sqlalchemy constraints to 1.4

* Update testing/constraints-3.8.txt

* Fixed minimum version of sqlalchemy for 1.4 backwards compatibility

* Bumping support for sqlalchemy 1.4.16 for sample tests

* Bump setup.py sqlalchemy to 1.4.16

* Updated compliance sqlalchemy to 1.4.16

* Fixed broken code in last merged main, as we need to avoid duplicate entries and potential implicit joins due to identical table names

* modified tests for join order variation in 1.4 vs 2.0

* typo

* Modified one compliance StringTest thats been flaky

* Updated docs

* minor fixes to noxfile and README

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* cleaned up code from review, removed unnecessary code and files

* Update tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py

* create development release 1.11.0.dev0 branch

* chore: cleanup compliance tests for sqlalchemy migration (#1013)

* chore: remove code for sqlalchemy before 1_4

* reformatted with black:

* Removed sqlalchemy compliance tests from versions before 1.4

* removed code in base.py for sqlalchemy < 1.4

* fix coverage issues in base.py

* temporarily commented out code lines not passing coverage for testing purposes

* replaced functions previously removed for not passing cover

* testing removing functions for coverage

* add no cover tag to untested code and clean up commented out functions

* fix lint issues

* black

* chore: cleanup compliance file tests after migration

* lint

* fixed small import error

---------

Co-authored-by: Sharoon Thomas <[email protected]>

* Revert "chore: cleanup compliance tests for sqlalchemy migration" (#1015)

* chore: fix coverage tests sqlalchemy 2.0 migration (#987)

* chore: remove code for sqlalchemy before 1_4

* reformatted with black:

* Removed sqlalchemy compliance tests from versions before 1.4

* removed code in base.py for sqlalchemy < 1.4

* fix coverage issues in base.py

* temporarily commented out code lines not passing coverage for testing purposes

* replaced functions previously removed for not passing cover

* testing removing functions for coverage

* add no cover tag to untested code and clean up commented out functions

* fix lint issues

* black

* Readded deleted tests and renamed them from deprecated names

* black

---------

Co-authored-by: Sharoon Thomas <[email protected]>

* chore: sqlalchemy test compliance suite cleanup (#1018)

* chore: remove code for sqlalchemy before 1_4

* reformatted with black:

* Removed sqlalchemy compliance tests from versions before 1.4

* removed code in base.py for sqlalchemy < 1.4

* fix coverage issues in base.py

* temporarily commented out code lines not passing coverage for testing purposes

* replaced functions previously removed for not passing cover

* testing removing functions for coverage

* add no cover tag to untested code and clean up commented out functions

* fix lint issues

* black

* Readded deleted tests and renamed them from deprecated names

* black

* chore: sqlalchemy test compliance suite cleanup code

* black

* black

---------

Co-authored-by: Sharoon Thomas <[email protected]>

* create development release 1.11.0.dev1 branch

* feat: grouping sets, rollup and cube compatibility

* create development release 1.11.0.dev2

* test commit to run kokooro tests

* removed unnecessary clause function changes, edited tests

* test basic implementation of group_by_clause and visit_label

* fixed render label as label assignment

* added test case

* reformat logic

* test commit

* create development build 1.11.0.dev3

* chore: add more grouping sets/rollup/cube tests (#1029)

* chore: add more tests for grouping functions fix

* reformatted tests

* update changelog

* revert changelog

* remove note

* don't install prerelease in compliance session

* sync owlbot

* Update tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py

* make results order not matter

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Sharoon Thomas <[email protected]>
Co-authored-by: Nishant Nayak <[email protected]>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: kiraksi <[email protected]>
Co-authored-by: Chalmer Lowe <[email protected]>
Co-authored-by: Chalmer Lowe <[email protected]>
Co-authored-by: Kira <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove tests and specific code for sqlalchemy versions < 1.4
5 participants