Skip to content

Commit bcebc43

Browse files
committed
pyproject.toml (and poetry.lock) moved to the root folder, documentation needing an update to reflect it
1 parent 1fd6cdb commit bcebc43

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ WORKDIR /tmp
66

77
RUN pip install poetry
88

9-
COPY src/pyproject.toml src/poetry.lock* /tmp/
9+
COPY ./pyproject.toml ./poetry.lock* /tmp/
1010

1111
RUN poetry export -f requirements.txt --output requirements.txt --without-hashes
1212

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,12 @@ First, you may want to take a look at the project structure and understand what
423423
```sh
424424
.
425425
├── Dockerfile # Dockerfile for building the application container.
426-
├── LICENSE.md # License file for the project.
427-
├── README.md # Project README providing information and instructions.
428426
├── docker-compose.yml # Docker Compose file for defining multi-container applications.
427+
├── pyproject.toml # Poetry configuration file with project metadata and dependencies.
428+
├── README.md # Project README providing information and instructions.
429+
├── LICENSE.md # License file for the project.
429430
430-
── tests # Unit and integration tests for the application.
431+
── tests # Unit and integration tests for the application.
431432
│ ├── __init__.py
432433
│ ├── conftest.py # Configuration and fixtures for pytest.
433434
│ ├── helper.py # Helper functions for tests.
@@ -437,7 +438,6 @@ First, you may want to take a look at the project structure and understand what
437438
├── __init__.py # Initialization file for the src package.
438439
├── alembic.ini # Configuration file for Alembic (database migration tool).
439440
├── poetry.lock # Poetry lock file specifying exact versions of dependencies.
440-
├── pyproject.toml # Poetry configuration file with project metadata and dependencies.
441441
442442
├── app # Main application directory.
443443
│ ├── __init__.py # Initialization file for the app package.
File renamed without changes.

src/app/core/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import os
12
from enum import Enum
23

34
from starlette.config import Config
45
from pydantic_settings import BaseSettings
56

6-
config = Config(".env")
7+
current_file_dir = os.path.dirname(os.path.realpath(__file__))
8+
env_path = os.path.join(current_file_dir, "..", "..", ".env")
9+
config = Config(env_path)
710

811
class AppSettings(BaseSettings):
912
APP_NAME: str = config("APP_NAME", default="FastAPI app")

0 commit comments

Comments
 (0)