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

Update SQLAlchemy #1142

Closed
wants to merge 10 commits into from
Closed

Update SQLAlchemy #1142

wants to merge 10 commits into from

Conversation

michplunkett
Copy link
Collaborator

@michplunkett michplunkett commented Jan 2, 2025

Description of Changes

Updating SQLAlchemy to version 2.x.y so that we can make use of the MappedAsDataclass class and remove all of our custom __repr__ functions so that we're more up to specifications with standard Python.

Documentation

SQLAlchemy: https://docs.sqlalchemy.org/en/20/orm/dataclasses.html
PR suggestion: #1140 (review)

Tests and Linting

  • This branch is up-to-date with the develop branch.
  • pytest passes on my local development environment.
  • pre-commit passes on my local development environment.

@michplunkett michplunkett self-assigned this Jan 2, 2025
Update requirements.txt

Update database.py

Update database.py
@michplunkett michplunkett deleted the update-sql-alchemy branch January 3, 2025 02:36
michplunkett added a commit that referenced this pull request Jan 16, 2025
## Description of Changes
Adds a generic `__repr__` function and and a generic `to_dict` function
so that objects can be serialized in the future. The reason I didn't use
the SQLAlchemy class like we talked about in the previous PR was because
that would require a complete rework of most object instantiations and
how properties are ordered. For a greater view into that, you can look
at this PR: #1142

## Tests and Linting
- [x] This branch is up-to-date with the `develop` branch.
- [x] `pytest` passes on my local development environment.
- [x] `pre-commit` passes on my local development environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant