Exemple #1
0
        def pdf():
            """Generate PDF API documents"""

            venvs = VirtualenvInfo("doc_python_version")
            if not venvs.in_virtualenv and venvs.defined:
                for venv_info in venvs.infos():
                    venv_info.run("{herring} doc::pdf_generate".format(herring=Project.herring))
            else:
                info("Generating documentation using the current python environment")
                task_execute("doc::pdf_generate")
    def build():
        """Build the project both sdist and wheels"""

        # Note, you must disable universal in setup.cfg::
        #     [wheel]
        #     universal=0

        if Project.version == '0.0.0':
            bump()
        task_execute('build::sdist')
        task_execute('build::wheels')
Exemple #3
0
def watch():
    """generate project documentation"""
    venvs = VirtualenvInfo('doc_python_version')
    info("venvs: {venvs}".format(venvs=repr(venvs.__dict__)))
    if not venvs.in_virtualenv and venvs.defined:
        for venv_info in venvs.infos():
            venv_info.run('{herring} doc::watcher --python-tag py{ver}'.format(herring=Project.herring,
                                                                               ver=venv_info.ver))
    else:
        info('Watching documentation using the current python environment')
        task_execute('doc::watcher')
Exemple #4
0
def slides():
    """generate project slides"""
    venvs = VirtualenvInfo('docs_venv')
    info("venvs: {venvs}".format(venvs=repr(venvs.__dict__)))
    if not venvs.in_virtualenv and venvs.defined:
        for venv_info in venvs.infos():
            venv_info.run('{herring} doc::hieroglyph_slides --python-tag py{ver}'.format(herring=Project.herring,
                                                                                         ver=venv_info.ver))
    else:
        info('Generating slides using the current python environment')
        task_execute('doc::hieroglyph_slides')
Exemple #5
0
def doc_no_api():
    """generate project documentation without the api"""
    venvs = VirtualenvInfo('docs_venv')
    info("venvs: {venvs}".format(venvs=repr(venvs.__dict__)))
    if not venvs.in_virtualenv and venvs.defined:
        for venv_info in venvs.infos():
            venv_info.run('{herring} doc::generate_no_api --python-tag py{ver}'.format(herring=Project.herring,
                                                                                       ver=venv_info.ver))
    else:
        info('Generating documentation using the current python environment')
        task_execute('doc::generate_no_api')
Exemple #6
0
 def doc():
     """generate project documentation"""
     venvs = VirtualenvInfo("doc_python_version")
     info("venvs: {venvs}".format(venvs=repr(venvs.__dict__)))
     if not venvs.in_virtualenv and venvs.defined:
         for venv_info in venvs.infos():
             venv_info.run(
                 "{herring} doc::generate --python-tag py{ver}".format(herring=Project.herring, ver=venv_info.ver)
             )
     else:
         info("Generating documentation using the current python environment")
         task_execute("doc::generate")
Exemple #7
0
def metrics():
    """ Quality metrics """

    # Run the metrics in each of the virtual environments defined in Project.metrics_python_versions
    # or if not defined, then in Project.wheel_python_versions.  If neither are defined, then
    # run the test in the current environment.

    venvs = VirtualenvInfo('metrics_python_versions', 'wheel_python_versions')

    if not venvs.in_virtualenv and venvs.defined:
        for venv_info in venvs.infos():
            info('Running metrics using the {venv} virtual environment.'.format(venv=venv_info.venv))
            venv_info.run('herring metrics::all_metrics')
    else:
        info('Running metrics using the current python environment')
        task_execute('metrics::all_metrics')
Exemple #8
0
 def all_metrics():
     """ Quality metrics """
     task_execute('metrics::violations_report')
Exemple #9
0
def publish():
    """ copy latest docs to a linux base web server """
    task_execute('doc::publish')