From ee823788fb3c79f76f855ed0a3c0d5ff72d5e50b Mon Sep 17 00:00:00 2001 From: sandy9999 Date: Fri, 13 Sep 2019 22:53:09 +0530 Subject: [PATCH 1/2] Added pep8 pre commit hook --- README.md | 2 +- git-hook.sh | 4 ++++ requirements.txt | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100755 git-hook.sh diff --git a/README.md b/README.md index 58fa375..4c08eb8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ 3. Create a database called workgen in MySQL 4. Set environment variables ```WORKGEN_USER``` and ```WORKGEN_PASSWORD``` as your MySql username and password 5. ```python3 manage.py migrate``` - +6. Run ```./git-hook.sh``` ## Running the Web Server 1. First run ```redis-server``` on a separate terminal diff --git a/git-hook.sh b/git-hook.sh new file mode 100755 index 0000000..1423260 --- /dev/null +++ b/git-hook.sh @@ -0,0 +1,4 @@ +echo "#!/bin/sh +flake8 ." >> .git/hooks/pre-commit + +chmod 777 .git/hooks/pre-commit diff --git a/requirements.txt b/requirements.txt index 25e029a..c186ef5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ amqp==2.3.2 +autopep8==1.3.3 billiard==3.5.0.4 celery==4.2.1 click==6.7 @@ -9,6 +10,7 @@ django-excel-response2==2.0.8 django-extensions==2.1.2 django-six==1.0.4 et-xmlfile==1.0.1 +flake8==3.5.0 jdcal==1.4 kombu==4.2.1 lxml==4.2.4 From 6189c519360a311864c5742cd4d8093d31735e23 Mon Sep 17 00:00:00 2001 From: sandy9999 Date: Tue, 22 Oct 2019 23:25:13 +0530 Subject: [PATCH 2/2] Modified requirements --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c186ef5..2583457 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,12 +10,13 @@ django-excel-response2==2.0.8 django-extensions==2.1.2 django-six==1.0.4 et-xmlfile==1.0.1 -flake8==3.5.0 +flake8==3.7.8 jdcal==1.4 kombu==4.2.1 lxml==4.2.4 mysqlclient==1.3.13 openpyxl==2.5.5 +pycodestyle==2.5.0 python-docx==0.8.7 pytz==2018.5 redis==2.10.6