From 7400ce4fd80fc6c0cfc1b3d96900ee2fb87f9ebe Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Wed, 29 Apr 2015 19:25:25 -0700 Subject: Packaging updates --- tasks.py | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index 1afce514..20ded03d 100644 --- a/tasks.py +++ b/tasks.py @@ -3,28 +3,10 @@ from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task -from invocations import docs as _docs +from invocations.docs import docs, www from invocations.packaging import publish -d = 'sites' - -# Usage doc/API site (published as docs.paramiko.org) -docs_path = join(d, 'docs') -docs_build = join(docs_path, '_build') -docs = Collection.from_module(_docs, name='docs', config={ - 'sphinx.source': docs_path, - 'sphinx.target': docs_build, -}) - -# Main/about/changelog site ((www.)?paramiko.org) -www_path = join(d, 'www') -www = Collection.from_module(_docs, name='www', config={ - 'sphinx.source': www_path, - 'sphinx.target': join(www_path, '_build'), -}) - - # Until we move to spec-based testing @task def test(ctx): @@ -45,9 +27,9 @@ def release(ctx): rmtree(target, ignore_errors=True) copytree(docs_build, target) # Publish - publish(ctx, wheel=True) + publish(ctx) # Remind print("\n\nDon't forget to update RTD's versions page for new minor releases!") -ns = Collection(test, coverage, release, docs=docs, www=www) +ns = Collection(test, coverage, release, docs, www) -- cgit v1.2.3 From 663e4ca4a0363670d6dd72a512e936d0c47457c0 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Fri, 2 Oct 2015 16:20:27 -0700 Subject: Fix dumb bug in release task --- tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index 20ded03d..2aeea0da 100644 --- a/tasks.py +++ b/tasks.py @@ -25,7 +25,8 @@ def release(ctx): # Move the built docs into where Epydocs used to live target = 'docs' rmtree(target, ignore_errors=True) - copytree(docs_build, target) + # TODO: make it easier to yank out this config val from the docs coll + copytree('sites/docs/_build', target) # Publish publish(ctx) # Remind -- cgit v1.2.3 From ce2df91a790aedcd0ec08f3526141cd01c63560d Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Sun, 1 Nov 2015 15:09:12 -0800 Subject: Allow specifying test.py flags in 'inv test' --- tasks.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index 2aeea0da..05654d3b 100644 --- a/tasks.py +++ b/tasks.py @@ -9,8 +9,14 @@ from invocations.packaging import publish # Until we move to spec-based testing @task -def test(ctx): - ctx.run("python test.py --verbose", pty=True) +def test(ctx, coverage=False, flags=""): + if "--verbose" not in flags.split(): + flags += " --verbose" + runner = "python" + if coverage: + runner = "coverage run --source=paramiko" + ctx.run("{0} test.py {1}".format(runner, flags), pty=True) + @task def coverage(ctx): -- cgit v1.2.3 From 545dedba3c3074e8ceacf0a4b639e515c85df671 Mon Sep 17 00:00:00 2001 From: Jeff Forcier Date: Mon, 2 Nov 2015 13:51:26 -0800 Subject: Add 'sites' task for rigorous doc error discovery --- tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tasks.py') diff --git a/tasks.py b/tasks.py index 05654d3b..3d55a778 100644 --- a/tasks.py +++ b/tasks.py @@ -3,7 +3,7 @@ from os.path import join from shutil import rmtree, copytree from invoke import Collection, ctask as task -from invocations.docs import docs, www +from invocations.docs import docs, www, sites from invocations.packaging import publish @@ -39,4 +39,4 @@ def release(ctx): print("\n\nDon't forget to update RTD's versions page for new minor releases!") -ns = Collection(test, coverage, release, docs, www) +ns = Collection(test, coverage, release, docs, www, sites) -- cgit v1.2.3