From 3ba138c81c348509e666c794fe5c7b635affcfc7 Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 5 May 2021 22:21:50 -0700 Subject: [PATCH] Move database and models to common submodule --- amanuensis/db/__init__.py | 15 +++++++++++++++ amanuensis/{ => db}/database.py | 0 amanuensis/{ => db}/models.py | 0 tests/test_db.py | 3 +-- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 amanuensis/db/__init__.py rename amanuensis/{ => db}/database.py (100%) rename amanuensis/{ => db}/models.py (100%) diff --git a/amanuensis/db/__init__.py b/amanuensis/db/__init__.py new file mode 100644 index 0000000..09192ae --- /dev/null +++ b/amanuensis/db/__init__.py @@ -0,0 +1,15 @@ +from .database import DbContext +from .models import ( + User, + Lexicon, + Membership, + Character, + ArticleState, + Article, + IndexType, + ArticleIndex, + ArticleIndexRule, + ArticleContentRuleType, + ArticleContentRule, + Post, +) \ No newline at end of file diff --git a/amanuensis/database.py b/amanuensis/db/database.py similarity index 100% rename from amanuensis/database.py rename to amanuensis/db/database.py diff --git a/amanuensis/models.py b/amanuensis/db/models.py similarity index 100% rename from amanuensis/models.py rename to amanuensis/db/models.py diff --git a/tests/test_db.py b/tests/test_db.py index 052956b..bd5d1a0 100644 --- a/tests/test_db.py +++ b/tests/test_db.py @@ -1,8 +1,7 @@ import pytest from sqlalchemy import func -from amanuensis.database import DbContext -from amanuensis.models import * +from amanuensis.db import * @pytest.fixture