Exemple #1
0
def sites(c):
    """
    Build both doc sites w/ maxed nitpicking.
    """
    # Turn warnings into errors, emit warnings about missing references.
    # This gives us a maximally noisy docs build.
    # Also enable tracebacks for easier debuggage.
    opts = "-W -n -T"
    # This is super lolzy but we haven't actually tackled nontrivial in-Python
    # task calling yet, so...
    docs_c = Context(config=c.config.clone())
    www_c = Context(config=c.config.clone())
    docs_c.update(**docs.configuration())
    www_c.update(**www.configuration())
    docs['build'](docs_c, opts=opts)
    www['build'](www_c, opts=opts)
Exemple #2
0
def sites(c):
    """
    Build both doc sites w/ maxed nitpicking.
    """
    # Turn warnings into errors, emit warnings about missing references.
    # This gives us a maximally noisy docs build.
    # Also enable tracebacks for easier debuggage.
    opts = "-W -n -T"
    # This is super lolzy but we haven't actually tackled nontrivial in-Python
    # task calling yet, so...
    docs_c = Context(config=c.config.clone())
    www_c = Context(config=c.config.clone())
    docs_c.update(**docs.configuration())
    www_c.update(**www.configuration())
    docs['build'](docs_c, opts=opts)
    www['build'](www_c, opts=opts)
Exemple #3
0
        "find_opts":
        "-and -not \( -path 'sites/*' -or -path './magicinvoke/vendor*' -or -path './invoke/vendor*' -or -path './alt_env*' -or -path './build*' -or -path './sites/magic_docs/examples/*' -or -path './tests/' \)"  # noqa
    },
    "tests": {
        "logformat": LOG_FORMAT,
        "package": "invoke"
    },
    "travis": {
        "sudo": {
            "user": "******",
            "password": "******"
        },
        "black": {
            "version": "18.6b4"
        },
    },
    "packaging": {
        "sign":
        True,
        "wheel":
        True,
        "check_desc":
        True,
        # Because of PyYAML's dual source nonsense =/
        "dual_wheels":
        True,
        "changelog_file":
        os.path.join(www.configuration()["sphinx"]["source"], "changelog.rst"),
    },
})
Exemple #4
0
    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, count_errors)
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',
        ),
    },
})
Exemple #5
0
    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, count_errors)
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',
        ),
    },
})
Exemple #6
0
    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": "******", "password": "******"},
            "black": {"version": "18.6b4"},
        },
        "packaging": {
            "sign": True,
            "wheel": True,
            "check_desc": True,
            # Because of PyYAML's dual source nonsense =/
            "dual_wheels": True,
            "changelog_file": os.path.join(
                www.configuration()["sphinx"]["source"], "changelog.rst"
            ),
        },
    }
)
Exemple #7
0
 def on_any_event(self, event):
     my_c = Context(config=c.config.clone())
     my_c.update(**www.configuration())
     www['build'](my_c)
Exemple #8
0
    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*' \)"  # noqa
        },
        "tests": {"logformat": LOG_FORMAT, "package": "invoke"},
        "travis": {
            "sudo": {"user": "******", "password": "******"},
            "black": {"version": "18.6b4"},
        },
        "packaging": {
            "sign": True,
            "wheel": True,
            "check_desc": True,
            # Because of PyYAML's dual source nonsense =/
            "dual_wheels": True,
            "changelog_file": os.path.join(
                www.configuration()["sphinx"]["source"], "changelog.rst"
            ),
        },
    }
)
Exemple #9
0
 def on_any_event(self, event):
     my_c = Context(config=c.config.clone())
     my_c.update(**www.configuration())
     www['build'](my_c)