Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# 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"},
"black": {"version": "18.6b4"},
},
from os.path import join
from invocations import docs, checks, travis
from invocations.pytest import test, integration
from invocations.packaging import release
from invoke import Collection
ns = Collection(test, integration, release, docs, travis, checks.blacken)
ns.configure(
{
"travis": {"black": {"version": "18.6b4"}},
"packaging": {
"sign": True,
"wheel": True,
"changelog_file": join(
docs.ns.configuration()["sphinx"]["source"], "changelog.rst"
),
from invoke import Collection, task
@task
def sanity(c):
"""
Quick sanity check to ensure we're installed successfully. Mostly for CI.
"""
# Doesn't need to literally import everything, but "a handful" will do.
for name in ("environment", "files", "transfers"):
mod = "patchwork.{}".format(name)
import_module(mod)
print("Imported {} successfully".format(mod))
ns = Collection(docs, release, travis, test, coverage, sanity, blacken)
ns.configure(
{
"packaging": {
"sign": True,
"wheel": True,
"check_desc": True,
"changelog_file": "docs/changelog.rst",
}
from invoke import Collection
from invocations import docs, travis
from invocations.packaging import release
from invocations.pytest import test, coverage
ns = Collection(release, test, coverage, docs, travis)
ns.configure(
{
"packaging": {"sign": True, "wheel": True},
"run": {
"env": {
# Our ANSI color tests test against hardcoded codes appropriate
# for this terminal, for now.
"TERM": "xterm-256color"
}
# 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",
"sign": True,
"wheel": True,