mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-05 12:40:17 +03:00
Flake 8 compliance for hitch engine.py.
This commit is contained in:
parent
8cae683070
commit
f644220401
|
@ -1,5 +1,5 @@
|
||||||
from hitchserve import ServiceBundle
|
from hitchserve import ServiceBundle
|
||||||
from os import path, system, chdir
|
from os import path
|
||||||
from subprocess import call, PIPE
|
from subprocess import call, PIPE
|
||||||
import hitchpostgres
|
import hitchpostgres
|
||||||
import hitchselenium
|
import hitchselenium
|
||||||
|
@ -7,15 +7,15 @@ import hitchpython
|
||||||
import hitchredis
|
import hitchredis
|
||||||
import hitchtest
|
import hitchtest
|
||||||
import hitchsmtp
|
import hitchsmtp
|
||||||
import hitchcron
|
|
||||||
import IPython
|
|
||||||
import sys
|
|
||||||
|
|
||||||
# Get directory above this file
|
# Get directory above this file
|
||||||
PROJECT_DIRECTORY = path.abspath(path.join(path.dirname(__file__), '..'))
|
PROJECT_DIRECTORY = path.abspath(path.join(path.dirname(__file__), '..'))
|
||||||
|
|
||||||
|
|
||||||
class ExecutionEngine(hitchtest.ExecutionEngine):
|
class ExecutionEngine(hitchtest.ExecutionEngine):
|
||||||
"""Engine for orchestating and interacting with the app."""
|
"""Engine for orchestating and interacting with the app."""
|
||||||
|
|
||||||
def set_up(self):
|
def set_up(self):
|
||||||
"""Ensure virtualenv present, then run all services."""
|
"""Ensure virtualenv present, then run all services."""
|
||||||
python_package = hitchpython.PythonPackage(
|
python_package = hitchpython.PythonPackage(
|
||||||
|
@ -35,11 +35,9 @@ class ExecutionEngine(hitchtest.ExecutionEngine):
|
||||||
postgres_package.build()
|
postgres_package.build()
|
||||||
postgres_package.verify()
|
postgres_package.verify()
|
||||||
|
|
||||||
{% if cookiecutter.celery_support == "y" %}
|
|
||||||
redis_package = hitchredis.RedisPackage(version="2.8.4")
|
redis_package = hitchredis.RedisPackage(version="2.8.4")
|
||||||
redis_package.build()
|
redis_package.build()
|
||||||
redis_package.verify()
|
redis_package.verify()
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
self.services = ServiceBundle(
|
self.services = ServiceBundle(
|
||||||
project_directory=PROJECT_DIRECTORY,
|
project_directory=PROJECT_DIRECTORY,
|
||||||
|
@ -66,12 +64,11 @@ class ExecutionEngine(hitchtest.ExecutionEngine):
|
||||||
env_vars=self.settings['environment_variables'],
|
env_vars=self.settings['environment_variables'],
|
||||||
)
|
)
|
||||||
|
|
||||||
{% if cookiecutter.celery_support == "y" %}
|
|
||||||
self.services['Redis'] = hitchredis.RedisService(
|
self.services['Redis'] = hitchredis.RedisService(
|
||||||
redis_package=redis_package,
|
redis_package=redis_package,
|
||||||
port=16379,
|
port=16379,
|
||||||
)
|
)
|
||||||
|
{% if cookiecutter.celery_support == "y" %}
|
||||||
self.services['Celery'] = hitchpython.CeleryService(
|
self.services['Celery'] = hitchpython.CeleryService(
|
||||||
python=python_package.python,
|
python=python_package.python,
|
||||||
version="3.1.18",
|
version="3.1.18",
|
||||||
|
@ -81,17 +78,17 @@ class ExecutionEngine(hitchtest.ExecutionEngine):
|
||||||
],
|
],
|
||||||
env_vars=self.settings['environment_variables'],
|
env_vars=self.settings['environment_variables'],
|
||||||
)
|
)
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
self.services['Firefox'] = hitchselenium.SeleniumService(
|
self.services['Firefox'] = hitchselenium.SeleniumService(
|
||||||
xvfb=self.settings.get("quiet", False)
|
xvfb=self.settings.get("quiet", False)
|
||||||
)
|
)
|
||||||
|
|
||||||
#self.services['Cron'] = hitchcron.CronService(
|
# import hitchcron
|
||||||
#run=self.services['Django'].manage("trigger").command,
|
# self.services['Cron'] = hitchcron.CronService(
|
||||||
#every=1,
|
# run=self.services['Django'].manage("trigger").command,
|
||||||
#needs=[ self.services['Django'], ],
|
# every=1,
|
||||||
#)
|
# needs=[ self.services['Django'], ],
|
||||||
|
# )
|
||||||
|
|
||||||
self.services.startup(interactive=False)
|
self.services.startup(interactive=False)
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,32 @@ environment:
|
||||||
- automake
|
- automake
|
||||||
- node
|
- node
|
||||||
- debs:
|
- debs:
|
||||||
|
- python-setuptools
|
||||||
|
- python3-dev
|
||||||
|
- python-virtualenv
|
||||||
|
- python-pip
|
||||||
- firefox
|
- firefox
|
||||||
- automake
|
- automake
|
||||||
- libtool
|
- libtool
|
||||||
|
- libreadline6
|
||||||
|
- libreadline6-dev
|
||||||
|
- libreadline-dev
|
||||||
|
- libsqlite3-dev
|
||||||
|
- libpq-dev
|
||||||
|
- libxml2
|
||||||
|
- libxml2-dev
|
||||||
|
- libssl-dev
|
||||||
|
- libbz2-dev
|
||||||
|
- wget
|
||||||
|
- curl
|
||||||
|
- llvm
|
||||||
|
- graphviz-dev
|
||||||
|
- libtiff4-dev
|
||||||
|
- libjpeg8-dev
|
||||||
|
- libfreetype6-dev
|
||||||
|
- liblcms1-dev
|
||||||
|
- libwebp-dev
|
||||||
|
- zlib1g-dev
|
||||||
|
- gettext
|
||||||
|
- python-dev
|
||||||
|
- build-essential
|
||||||
|
|
Loading…
Reference in New Issue
Block a user