merge with upstream master
This commit is contained in:
24
tasks.py
24
tasks.py
@@ -1,4 +1,5 @@
|
||||
from invoke import run, task
|
||||
import os
|
||||
|
||||
|
||||
@task
|
||||
@@ -34,9 +35,10 @@ def test_js(ctx):
|
||||
def update_version(ctx):
|
||||
run('echo "import os\n\n\ndef version():\n if os.getenv(\'VERSION\'):\n return os.getenv(\'VERSION\')\n return \'$(git describe --tags)\'" > helix/constants/version.py')
|
||||
|
||||
|
||||
@task
|
||||
def serve(ctx):
|
||||
run('PYTHONPATH=. SP_DOCGEN_API_KEY=DC97-20AF-567E python helix/main.py')
|
||||
run('SP_DOCGEN_API_KEY=DC97-20AF-567E gunicorn -c gunicorn_config.py --pythonpath helix main:app')
|
||||
|
||||
|
||||
@task
|
||||
@@ -52,3 +54,23 @@ def db_migrate(ctx):
|
||||
@task
|
||||
def serve_debug(ctx):
|
||||
run('PYTHONPATH=. FLASK_DEBUG=1 SP_DOCGEN_API_KEY=DC97-20AF-567E python helix/main.py')
|
||||
|
||||
|
||||
@task
|
||||
def db_diagram(ctx):
|
||||
db_uri = os.getenv('DATABASE_URL', 'postgres://pivotal:@localhost:5432/pivotal')
|
||||
run('eralchemy -i "{}" -o documentation/db_schema.png -x temp audit'.format(db_uri))
|
||||
|
||||
@task
|
||||
def classes_diagrams(ctx):
|
||||
run('pyreverse -k -o calculators-diagram.png helix/calculators')
|
||||
run('pyreverse -k -o constants-diagram.png helix/constants')
|
||||
run('pyreverse -k -o forms-diagram.png helix/forms')
|
||||
run('pyreverse -k -o models-diagram.png helix/models')
|
||||
run('pyreverse -k -o validators-diagram.png helix/validators')
|
||||
run('rm -rf packages*.png ; mv classes.*-diagram.png documentation/')
|
||||
|
||||
|
||||
@task
|
||||
def serve_ssl(ctx):
|
||||
run('FLASK_DEBUG_SSL=true PORT=8443 PYTHONPATH=. FLASK_DEBUG=1 SP_DOCGEN_API_KEY=DC97-20AF-567E python helix/main.py')
|
||||
|
||||
Reference in New Issue
Block a user