chore: cleanup before v1 (#73)

* chore: move dependencies module to the project root

* chore:update README

* chore: clean conftest

* chore: remove old code + comment

* fix: uv.lock dependencies
This commit is contained in:
d3vyce
2026-02-19 11:49:57 +01:00
committed by GitHub
parent 32ed36e102
commit 73fae04333
7 changed files with 12 additions and 139 deletions

View File

@@ -11,18 +11,12 @@ from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, relationship
from fastapi_toolsets.crud import CrudFactory
# PostgreSQL connection URL from environment or default for local development
DATABASE_URL = os.getenv("DATABASE_URL") or os.getenv(
"TEST_DATABASE_URL",
"postgresql+asyncpg://postgres:postgres@localhost:5432/fastapi_toolsets_test",
DATABASE_URL = os.getenv(
key="DATABASE_URL",
default="postgresql+asyncpg://postgres:postgres@localhost:5432/postgres",
)
# =============================================================================
# Test Models
# =============================================================================
class Base(DeclarativeBase):
"""Base class for test models."""
@@ -89,11 +83,6 @@ class Post(Base):
tags: Mapped[list[Tag]] = relationship(secondary=post_tags)
# =============================================================================
# Test Schemas
# =============================================================================
class RoleCreate(BaseModel):
"""Schema for creating a role."""
@@ -171,10 +160,6 @@ class PostM2MUpdate(BaseModel):
tag_ids: list[uuid.UUID] | None = None
# =============================================================================
# CRUD Classes
# =============================================================================
RoleCrud = CrudFactory(Role)
UserCrud = CrudFactory(User)
PostCrud = CrudFactory(Post)
@@ -182,11 +167,6 @@ TagCrud = CrudFactory(Tag)
PostM2MCrud = CrudFactory(Post, m2m_fields={"tag_ids": Post.tags})
# =============================================================================
# Fixtures
# =============================================================================
@pytest.fixture
def anyio_backend():
"""Use asyncio for async tests."""