Skip to content

Commit

Permalink
Change to lib structure and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sandenbergmelo committed Jan 9, 2025
1 parent 789f6f3 commit b9411fb
Show file tree
Hide file tree
Showing 16 changed files with 257 additions and 243 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
26 changes: 15 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
[project]
name = "fast-zero"
version = "0.1.0"
description = ""
version = "0.0.1"
readme = "README.md"
authors = [{ name = "Sandenberg Ferreira Melo" }]
requires-python = ">=3.12"
dependencies = [
"alembic>=1.14.0",
"fastapi[standard]>=0.115.5",
"fastapi[standard]>=0.115.6",
"psycopg[binary]>=3.2.3",
"pwdlib[argon2]>=0.2.1",
"pydantic-settings>=2.6.1",
"pydantic-settings>=2.7.1",
"pyjwt>=2.10.1",
"python-multipart>=0.0.18",
"python-multipart>=0.0.20",
"sqlalchemy>=2.0.36",
]

[dependency-groups]
dev = [
"factory-boy>=3.3.1",
"freezegun>=1.5.1",
"pytest>=8.3.3",
"pytest>=8.3.4",
"pytest-cov>=6.0.0",
"ruff>=0.8.1",
"sqlalchemy>=2.0.36",
"ruff>=0.8.6",
"taskipy>=1.14.1",
"testcontainers>=4.8.2",
"testcontainers>=4.9.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"


[tool.taskipy.tasks]
dev = 'fastapi dev fast_zero/app.py'
dev = 'fastapi dev src/fast_zero/app.py'
start = 'fastapi run src/fast_zero/app.py'

pre_test = 'task lint'
test = 'pytest --cov=fast_zero -vv'
Expand All @@ -41,7 +45,7 @@ migrate_generate = 'alembic revision --autogenerate -m'
migrate = 'task migrate_generate'
post_migrate = 'task migrate_upgrade'

seed = 'python fast_zero/db/seed.py'
seed = 'python src/fast_zero/db/seed.py'

coverage = 'coverage html'

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 5 additions & 7 deletions fast_zero/db/seed.py → src/fast_zero/db/seed.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import sys
from pathlib import Path

import alembic
import alembic.command
import factory
import factory.fuzzy
from alembic.config import Config
from rich import print
from sqlalchemy import text

sys.path.append(str(Path(__file__).resolve().parents[2]))

import factory
import factory.fuzzy

from fast_zero.db.connection import get_session
from fast_zero.db.models import Todo, TodoState, User
from fast_zero.helpers.security import get_password_hash
Expand All @@ -38,7 +34,9 @@ class Meta:
user_id = factory.fuzzy.FuzzyInteger(1, 5)


alembic_config = Config(Path(__file__).parent.parent.parent / 'alembic.ini')
alembic_config = Config(
Path(__file__).parent.parent.parent.parent / 'alembic.ini'
)
session = next(get_session())

# Delete all tables
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
461 changes: 236 additions & 225 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit b9411fb

Please # to comment.