Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
hnthh committed Nov 29, 2023
1 parent 13ff22d commit 4a0ffbf
Show file tree
Hide file tree
Showing 100 changed files with 16 additions and 19 deletions.
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
test: bootstrap
cd testproject && poetry run src/manage.py makemigrations --check
cd testproject && poetry run src/manage.py startapp test_app

make coverage

bootstrap:
rm -Rf testproject

poetry run cookiecutter --no-input ./

cd testproject && poetry install

coverage:
cd testproject && poetry run python -m pytest --cov-report=xml --cov=core --cov=apps.a12n --cov=apps.users --cov=sepulkas
13 changes: 8 additions & 5 deletions cookiecutter.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"project_slug": "testproject",
"email": "",
"project_version": "0.0.0-dev",
"name": "testproject",
"_copy_without_render": [
"*.py-tpl",
".github/workflows/ci.yml"
".github/workflows/ci.yml",
".mypy_cache",
".pytest_cache",
".venv",
"**/__pycache__",
"db.sqlite",
"src/.django-app-template"
]
}
7 changes: 6 additions & 1 deletion hooks/post_gen_project.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#!/bin/bash -e

rm -rf .mypy_cache \
.pytest_cache \
.venv

cp src/core/.env.ci src/core/.env

poetry install

poetry run python src/manage.py collectstatic
poetry run python src/manage.py migrate
poetry run python src/manage.py startapp test_app

make fmt lint test
make lint test
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.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tool.poetry]
authors = ["you <[email protected]>"]
description = "your project description"
name = "{{cookiecutter.project_slug}}"
name = "your project name"
readme = "README.md"
version = "{{cookiecutter.project_version}}"
version = "0.0.0-dev"

[tool.poetry.dependencies]
python = "~3.11"
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4a0ffbf

Please sign in to comment.