diff --git a/Makefile b/Makefile index 1fb3d0f..ad2b448 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,9 @@ +# loading and exporting all env vars from .env file automatically +ifneq (,$(wildcard ./.env)) + include .env + export +endif + APP_NAME="python-boilerplate-project" IMAGE_NAME="python-boilerplate-project" VERSION="latest" diff --git a/README.md b/README.md index 63ac5e5..d444827 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,8 @@ A python boilerplate project using poetry Variable | Description | Available Values | Default Value | Required --- | --- | --- | --- | --- -ENV | The application enviroment | `dev / test / qa / prod` | `dev` | Yes +ENV | The application enviroment | `dev / test / qa / prod` | `dev` | Yes +PYTHONPATH | Provides guidance to the Python interpreter about where to find libraries and applications | [ref](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH) | `.` | Yes *Note: When you run the install command (using docker or locally), a .env file will be created automatically based on [env.template](env.template)* diff --git a/env.template b/env.template index d8f5281..b7bb1cb 100644 --- a/env.template +++ b/env.template @@ -1 +1,2 @@ -ENV=dev \ No newline at end of file +ENV=dev +PYTHONPATH=. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ba5fabb..3ded99e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ license = "MIT" python = "^3.11" [tool.poetry.dev-dependencies] -pytest = "7.4.4" +pytest = "^8.0.0" pytest-cov = "^4.1.0" ruff = "^0.1.6"