mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-05 04:30:16 +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 os import path, system, chdir
|
||||
from os import path
|
||||
from subprocess import call, PIPE
|
||||
import hitchpostgres
|
||||
import hitchselenium
|
||||
|
@ -7,15 +7,15 @@ import hitchpython
|
|||
import hitchredis
|
||||
import hitchtest
|
||||
import hitchsmtp
|
||||
import hitchcron
|
||||
import IPython
|
||||
import sys
|
||||
|
||||
|
||||
# Get directory above this file
|
||||
PROJECT_DIRECTORY = path.abspath(path.join(path.dirname(__file__), '..'))
|
||||
|
||||
|
||||
class ExecutionEngine(hitchtest.ExecutionEngine):
|
||||
"""Engine for orchestating and interacting with the app."""
|
||||
|
||||
def set_up(self):
|
||||
"""Ensure virtualenv present, then run all services."""
|
||||
python_package = hitchpython.PythonPackage(
|
||||
|
@ -35,11 +35,9 @@ class ExecutionEngine(hitchtest.ExecutionEngine):
|
|||
postgres_package.build()
|
||||
postgres_package.verify()
|
||||
|
||||
{% if cookiecutter.celery_support == "y" %}
|
||||
redis_package = hitchredis.RedisPackage(version="2.8.4")
|
||||
redis_package.build()
|
||||
redis_package.verify()
|
||||
{% endif %}
|
||||
|
||||
self.services = ServiceBundle(
|
||||
project_directory=PROJECT_DIRECTORY,
|
||||
|
@ -66,12 +64,11 @@ class ExecutionEngine(hitchtest.ExecutionEngine):
|
|||
env_vars=self.settings['environment_variables'],
|
||||
)
|
||||
|
||||
{% if cookiecutter.celery_support == "y" %}
|
||||
self.services['Redis'] = hitchredis.RedisService(
|
||||
redis_package=redis_package,
|
||||
port=16379,
|
||||
)
|
||||
|
||||
{% if cookiecutter.celery_support == "y" %}
|
||||
self.services['Celery'] = hitchpython.CeleryService(
|
||||
python=python_package.python,
|
||||
version="3.1.18",
|
||||
|
@ -82,11 +79,11 @@ class ExecutionEngine(hitchtest.ExecutionEngine):
|
|||
env_vars=self.settings['environment_variables'],
|
||||
)
|
||||
{% endif %}
|
||||
|
||||
self.services['Firefox'] = hitchselenium.SeleniumService(
|
||||
xvfb=self.settings.get("quiet", False)
|
||||
)
|
||||
|
||||
# import hitchcron
|
||||
# self.services['Cron'] = hitchcron.CronService(
|
||||
# run=self.services['Django'].manage("trigger").command,
|
||||
# every=1,
|
||||
|
|
|
@ -28,6 +28,32 @@ environment:
|
|||
- automake
|
||||
- node
|
||||
- debs:
|
||||
- python-setuptools
|
||||
- python3-dev
|
||||
- python-virtualenv
|
||||
- python-pip
|
||||
- firefox
|
||||
- automake
|
||||
- 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