From 252f09325a9b3622cfade6acb8db44fdb951b7f1 Mon Sep 17 00:00:00 2001 From: Jim Fingal Date: Sun, 21 Feb 2021 23:07:58 -0800 Subject: [PATCH 1/2] Add black command --- Makefile | 5 +++++ requirements.txt | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..44abad0b --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +.PHONY: itblack + +itblack: + docker-compose run --rm web black celerywyrm + docker-compose run --rm web black bookwyrm \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index e5d7798d..f354fd43 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ celery==4.4.2 -coverage==5.1 Django==3.0.7 django-model-utils==4.0.0 environs==7.2.0 @@ -8,11 +7,15 @@ Markdown==3.3.3 Pillow>=7.1.0 psycopg2==2.8.4 pycryptodome==3.9.4 -pytest-django==4.1.0 -pytest==6.1.2 -pytest-cov==2.10.1 python-dateutil==2.8.1 redis==3.4.1 requests==2.22.0 responses==0.10.14 django-rename-app==0.1.2 + +# Dev +black==20.8b1 +coverage==5.1 +pytest-django==4.1.0 +pytest==6.1.2 +pytest-cov==2.10.1 From 33cf03df74409b7450304f1b455b9a1ed5b63164 Mon Sep 17 00:00:00 2001 From: Jim Fingal Date: Sun, 7 Mar 2021 19:43:36 -0800 Subject: [PATCH 2/2] Add black command to bw-dev --- Makefile | 5 ----- bw-dev | 9 ++++++++- 2 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 Makefile diff --git a/Makefile b/Makefile deleted file mode 100644 index 44abad0b..00000000 --- a/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -.PHONY: itblack - -itblack: - docker-compose run --rm web black celerywyrm - docker-compose run --rm web black bookwyrm \ No newline at end of file diff --git a/bw-dev b/bw-dev index f3162bd3..2aa46942 100755 --- a/bw-dev +++ b/bw-dev @@ -35,6 +35,10 @@ function initdb { execweb python manage.py initdb } +function makeitblack { + runweb black celerywyrm bookwyrm +} + CMD=$1 shift @@ -96,7 +100,10 @@ case "$CMD" in clean) clean ;; + black) + makeitblack + ;; *) - echo "Unrecognised command. Try: build, clean, up, initdb, resetdb, makemigrations, migrate, bash, shell, dbshell, restart_celery, test, pytest, test_report" + echo "Unrecognised command. Try: build, clean, up, initdb, resetdb, makemigrations, migrate, bash, shell, dbshell, restart_celery, test, pytest, test_report, black" ;; esac