Browse Source

Add invoke task to start an IPython shell

merge-requests/126/merge
Deimos 4 years ago
parent
commit
9e7906c4a1
  1. 13
      tildes/tasks.py

13
tildes/tasks.py

@ -79,6 +79,19 @@ def test(context, quiet=False, webtests=False, html_validation=False):
context.run("pytest " + " ".join(pytest_args), pty=True) context.run("pytest " + " ".join(pytest_args), pty=True)
@task
def shell(context):
"""Start an IPython shell inside the app environment.
Will use the settings in production.ini if that file exists, otherwise will fall
back to using development.ini.
"""
if Path("production.ini").exists():
context.run("pshell production.ini", pty=True)
else:
context.run("pshell development.ini", pty=True)
@task @task
def type_checking(context): def type_checking(context):
"""Run static type checking on the Python code.""" """Run static type checking on the Python code."""

Loading…
Cancel
Save