-
Notifications
You must be signed in to change notification settings - Fork 11
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
Upgrade SQLAlchemy #315
Upgrade SQLAlchemy #315
Conversation
Face.query.join(Officer, Face.officer_id == Officer.id) | ||
.join(Department, Officer.department_id == Department.id) | ||
.filter(Department.id != AC_DEPT) |
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.
def test_filters_do_not_exclude_officers_without_assignments(mockdata, db): | ||
department = OpenOversight.app.models.Department.query.first() | ||
officer = OpenOversight.app.models.Officer( | ||
first_name="Rachel", last_name="S", department=department, birth_year=1992 | ||
) | ||
db.session.add(officer) | ||
results = OpenOversight.app.utils.grab_officers({"name": "S", "dept": department}) | ||
assert officer in results.all() |
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.
Idk how this test has been passing 🤔
@@ -49,6 +49,7 @@ services: | |||
environment: | |||
ENVIRONMENT: development | |||
FLASK_DEBUG: 1 | |||
SQLALCHEMY_WARN_20: 1 |
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.
Turn on SQLAlchemy 2.x deprecation warnings
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.
Excellent!
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 so much for taking this on! I was able to build & test this locally and it worked great 🚀
@@ -49,6 +49,7 @@ services: | |||
environment: | |||
ENVIRONMENT: development | |||
FLASK_DEBUG: 1 | |||
SQLALCHEMY_WARN_20: 1 |
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.
Excellent!
Description of Changes
Upgrade SQLAlchemy (finally)! Most changes are adapted from lucyparsons@14bfc5b
Notes for Deployment
None!
Screenshots (if appropriate)
N/A
Tests and linting
I have rebased my changes on
main
just lint
passesjust test
passes