diff --git a/apps/core/scripts/poetry_scripts.py b/apps/core/scripts/poetry_scripts.py deleted file mode 100644 index ea4e2d2..0000000 --- a/apps/core/scripts/poetry_scripts.py +++ /dev/null @@ -1,9 +0,0 @@ -import os - - -def coverage_report(): - os.system("coverage run -m py.test") - - -def coverage_xml(): - os.system("coverage xml") diff --git a/pyproject.toml b/pyproject.toml index f12dd1f..7901639 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,9 @@ name = "django-saas-boilerplate" version = "0.1.0" description = "A Django + django-rest-framework + Heroku + SaaS application boilerplate" authors = ["Pixelpassion"] +packages = [ + { include="scripts", from="." }, +] [tool.poetry.dependencies] python = ">=3.7,<3.8" @@ -53,8 +56,10 @@ pytest-env = "^0.6.2" [tool.poetry.scripts] -create-coverage = "apps.core.scripts:coverage_report" -codecov-report = "apps.core.scripts:coverage_xml" +go-docker = "scripts.poetry_scripts:go_docker" +create-coverage = "scripts.poetry_scripts:coverage_report" +check-coverage = "scripts.poetry_scripts:check_coverage" +codecov-report = "scripts.poetry_scripts:coverage_xml" [build-system] requires = ["poetry>=0.12"] diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/scripts/poetry_scripts.py b/scripts/poetry_scripts.py new file mode 100644 index 0000000..25fba72 --- /dev/null +++ b/scripts/poetry_scripts.py @@ -0,0 +1,17 @@ +import os + + +def go_docker(): + os.system("docker-compose up -d") + + +def coverage_report(): + os.system("coverage run -m py.test") + + +def coverage_xml(): + os.system("coverage xml") + + +def check_coverage(): + os.system("coverage report --fail-under=95")