From 43fe73d412446076bf15b258f7e8f6e3e9bede2d Mon Sep 17 00:00:00 2001 From: Lucie Date: Tue, 11 Sep 2018 21:28:47 +0200 Subject: [PATCH] Remove extra semicolon + add tasks file to lint check + move tox.ini to top-level dir (#1799) --- .travis.yml | 2 +- appveyor.yml | 2 +- tasks.py | 7 ++++--- network-api/tox.ini => tox.ini | 0 4 files changed, 6 insertions(+), 5 deletions(-) rename network-api/tox.ini => tox.ini (100%) diff --git a/.travis.yml b/.travis.yml index 11cc63b8884..8e78e9e7d6c 100755 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ before_script: - psql -c 'create database network;' -U postgres script: - npm test -- pipenv run flake8 network-api/ +- pipenv run flake8 tasks.py network-api/ - pipenv run coverage run --source './network-api/networkapi' network-api/manage.py test networkapi after_success: - coveralls diff --git a/appveyor.yml b/appveyor.yml index c74abc0d696..7a3912dab0f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -52,7 +52,7 @@ test_script: - node --version - npm --version - npm test - - "python -m pipenv run flake8 network-api/" + - "python -m pipenv run flake8 tasks.py network-api/" - "python -m pipenv run python network-api/manage.py test" cache: diff --git a/tasks.py b/tasks.py index 5cba899f774..0541f61a9dc 100644 --- a/tasks.py +++ b/tasks.py @@ -64,7 +64,7 @@ def l10n_update(ctx): def test(ctx): """Run tests""" print("Running flake8") - ctx.run(f"pipenv run flake8 network-api", **PLATFORM_ARG) + ctx.run(f"pipenv run flake8 tasks.py network-api", **PLATFORM_ARG) print("Running tests") manage(ctx, "test") @@ -81,7 +81,7 @@ def setup(ctx): ctx.run("pipenv install --dev") print("Applying database migrations.") ctx.run("inv migrate") - print("Updating localizable fields"); + print("Updating localizable fields") ctx.run("inv l10n-sync") ctx.run("inv l10n-update") print("Creating fake data") @@ -99,6 +99,7 @@ def setup(ctx): ctx.run("pipenv run python network-api/manage.py createsuperuser", pty=True) print("All done! To start your dev server, run the following:\n inv runserver") + @task def catch_up(ctx): """Install dependencies and apply migrations""" @@ -108,7 +109,7 @@ def catch_up(ctx): ctx.run("pipenv install --dev") print("Applying database migrations.") ctx.run("inv migrate") - print("Updating localizable fields"); + print("Updating localizable fields") ctx.run("inv l10n-sync") ctx.run("inv l10n-update") print("Updating block information") diff --git a/network-api/tox.ini b/tox.ini similarity index 100% rename from network-api/tox.ini rename to tox.ini