Skip to content

Commit

Permalink
refactor(folder): removed src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
arodindev committed Aug 4, 2024
1 parent ed2d7d4 commit a6d92b9
Show file tree
Hide file tree
Showing 18 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
rev: v0.991
hooks:
- id: mypy
files: ^(src/)
files: ^(todoapp/)
args: [--ignore-missing-imports]
additional_dependencies:
- "pydantic>=1.10.4"
Expand Down
2 changes: 1 addition & 1 deletion bin/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

def main():
logger.warning("Running in development mode. Do not run like this in production.")
uvicorn.run("src.todoapp.main:app", host="0.0.0.0", port=8001, log_level="debug")
uvicorn.run("todoapp.main:app", host="0.0.0.0", port=8001, log_level="debug")


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
__pycache__
Dockerfile
docker-compose.yaml
tests/
*/env*
*/venv*
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ COPY --from=base /tmp/requirements.txt /todoapp/requirements.txt

RUN pip install --no-cache-dir --upgrade -r /todoapp/requirements.txt

COPY ./src /todoapp
COPY ./todoapp /todoapp

CMD ["uvicorn", "todoapp.main:app", "--host", "0.0.0.0", "--port", "8000"]
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
from fastapi.testclient import TestClient

from src.todoapp.main import app
from todoapp.main import app


@pytest.fixture()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from src.todoapp.config.core import settings
from todoapp.config.core import settings


def test_health(test_app) -> None:
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ setenv =
commands_pre =
poetry install -v --no-interaction --no-root --only dev
commands =
poetry run isort src
poetry run ruff check src --fix
poetry run ruff format src
poetry run isort todoapp
poetry run ruff check todoapp --fix
poetry run ruff format todoapp

0 comments on commit a6d92b9

Please sign in to comment.