-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add invitation table * invitation wip * Fix test suite * Fix test * Fix sqlmodel relationship issue See: fastapi/sqlmodel#315 * Attempt to fix mypy * Don't use transformer for testing * Remove MyPy * Black 22.3 Co-authored-by: Jeremy Fisher <jeremy@adamsfisher.me>
- Loading branch information
1 parent
bf6df2d
commit fa7a166
Showing
26 changed files
with
606 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
from google.cloud.sql.connector import connector | ||
from sqlmodel import Session, create_engine | ||
|
||
engine = create_engine( | ||
"postgresql+pg8000://", | ||
creator=lambda: connector.connect( | ||
"story-circle-ai:us-east1:yakul", | ||
"pg8000", | ||
user="story-circle-app-sa@story-circle-ai.iam", | ||
db="faboo", | ||
enable_iam_auth=True, | ||
), | ||
) | ||
|
||
|
||
def get_engine(): | ||
return create_engine( | ||
"postgresql+pg8000://", | ||
creator=lambda: connector.connect( | ||
"story-circle-ai:us-east1:yakul", | ||
"pg8000", | ||
user="story-circle-app-sa@story-circle-ai.iam", | ||
db="faboo", | ||
enable_iam_auth=True, | ||
), | ||
) | ||
return engine | ||
|
||
|
||
def get_session(): | ||
engine = get_engine() | ||
with Session(engine) as session: | ||
yield session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ | |
from ..lib.shims import APIRouter | ||
from ..models import UserStoriesRead | ||
|
||
|
||
router = APIRouter() | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.