Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# Use our own test() instead of theirs.
# TODO: allow coverage() to just look up the nearby-by-namespace-attachment
# test() instead of hardcoding its own test or doing it this way with an
# arg.
return coverage_(c, report=report, opts=opts, tester=test)
ns = Collection(
test,
coverage,
integration,
vendorize,
release,
www,
docs,
sites,
watch_docs,
travis,
checks.blacken,
)
ns.configure(
{
"blacken": {
# Skip the vendor directory and the (Travis-only) alt venv when
# blackening.
# TODO: this is making it seem like I really do want an explicit
# arg/conf-opt in the blacken task for "excluded paths"...ha
"find_opts": "-and -not \( -path './invoke/vendor*' -or -path './alt_env*' -or -path './build*' \)" # noqa
},
"tests": {"logformat": LOG_FORMAT, "package": "invoke"},
"travis": {
"sudo": {"user": "sudouser", "password": "mypass"},
# Move the built docs into where Epydocs used to live
target = 'docs'
rmtree(target, ignore_errors=True)
# TODO: make it easier to yank out this config val from the docs coll
copytree('sites/docs/_build', target)
# Publish
publish(ctx, sdist=sdist, wheel=wheel, sign=sign, dry_run=dry_run)
# Remind
print("\n\nDon't forget to update RTD's versions page for new minor releases!")
# TODO: "replace one task with another" needs a better public API, this is
# using unpublished internals & skips all the stuff add_task() does re:
# aliasing, defaults etc.
release_coll.tasks['publish'] = release
ns = Collection(test, coverage, release_coll, docs, www, sites)
ns.configure({
'packaging': {
# NOTE: many of these are also set in kwarg defaults above; but having
# them here too means once we get rid of our custom release(), the
# behavior stays.
'sign': True,
'wheel': True,
'changelog_file': join(
www.configuration()['sphinx']['source'],
'changelog.rst',
),
rmtree(target, ignore_errors=True)
# TODO: make it easier to yank out this config val from the docs coll
copytree('sites/docs/_build', target)
# Publish
publish(ctx, sdist=sdist, wheel=wheel, sign=sign, dry_run=dry_run)
# Remind
print("\n\nDon't forget to update RTD's versions page for new minor "
"releases!")
# TODO: "replace one task with another" needs a better public API, this is
# using unpublished internals & skips all the stuff add_task() does re:
# aliasing, defaults etc.
release_coll.tasks['publish'] = release
ns = Collection(test, coverage, release_coll, docs, www, sites)
ns.configure({
'packaging': {
# NOTE: many of these are also set in kwarg defaults above; but having
# them here too means once we get rid of our custom release(), the
# behavior stays.
'sign': True,
'wheel': True,
'changelog_file': join(
www.configuration()['sphinx']['source'],
'changelog.rst',
),
Wraps invocations.packaging.release to add baked-in docs folder.
"""
# Build docs first. Use terribad workaround pending invoke #146
ctx.run("inv docs")
# Move the built docs into where Epydocs used to live
target = 'docs'
rmtree(target, ignore_errors=True)
# TODO: make it easier to yank out this config val from the docs coll
copytree('sites/docs/_build', target)
# Publish
publish(ctx, sdist=sdist, wheel=wheel, sign=sign, dry_run=dry_run)
# Remind
print("\n\nDon't forget to update RTD's versions page for new minor releases!")
ns = Collection(test, coverage, release, docs, www, sites)
# Better than nothing, since we haven't solved "pretend I have some other
# task's signature" yet...
publish.__doc__ = release.publish.__doc__
my_release = Collection(
"release", release.build, release.status, publish, release.prepare
)
ns = Collection(
blacken,
coverage,
docs,
integration,
my_release,
sites,
test,
travis,
watch_docs,
www,
)
ns.configure(
{
"tests": {
# TODO: have pytest tasks honor these?
"package": "fabric",
"logformat": LOG_FORMAT,
},
"packaging": {
# NOTE: this is currently for identifying the source directory.
# Should it get used for actual releasing, needs changing.
"package": "fabric",