<commit_before>#!/usr/bin/env python

import ConfigParser, os

def parse_docs():
    config = ConfigParser.RawConfigParser(allow_no_value=True)
    config.read('.sauce.ini')
    
    if not config.getboolean('Docs', 'enable'):
        return None
    
    branch = config.get('Docs', 'branch')
    
    deploy_docs = {
        "provider": "script",
        "script": "sh ./.sauce/travis/deploy_docs.sh",
        "skip_cleanup": "true",
        "on": {}
    }
    
    if branch:
        deploy_docs["on"]["branch"] = branch
    else:
        deploy_docs["on"]["all_branches"] = "true"
        
    return deploy_docs

def parse_docs_options():
    
    config = ConfigParser.RawConfigParser(allow_no_value=True)
    config.read('.sauce.ini')
    
    include_non_documented = config.getboolean('Docs', 'include_non_documented')
    include_privates = config.getboolean('Docs', 'include_privates')
    include_nav_panel = config.getboolean('Docs', 'include_nav_panel')
    include_search = config.getboolean('Docs', 'include_search')
    gen_diagrams = config.getboolean('Docs', 'gen_diagrams')
    
    options = [
        "include_non_documented=%s" % include_non_documented,
        "include_privates=%s" % include_privates,
        "include_nav_panel=%s" % include_nav_panel,
        "include_search=%s" % include_search,
        "gen_diagrams=%s" % gen_diagrams,
    ]
    
    projectname = config.get('Docs', 'projectname')
    description = config.get('Docs', 'description')
    logo = config.get('Docs', 'logo')
    
    if projectname:
        options.append("projectname=%s" % projectname)
    
    if description:
        options.append("description=%s" % description)
        
    if logo:
        options.append("logo=%s" % logo)
    
    return options

<commit_msg>Fixed docs options parsing.<commit_after>#!/usr/bin/env python

import ConfigParser, os

def parse_docs():
    config = ConfigParser.RawConfigParser(allow_no_value=True)
    config.read('.sauce.ini')
    
    if not config.getboolean('Docs', 'enable'):
        return None
    
    branch = config.get('Docs', 'branch')
    
    deploy_docs = {
        "provider": "script",
        "script": "sh ./.sauce/travis/deploy_docs.sh",
        "skip_cleanup": "true",
        "on": {}
    }
    
    if branch:
        deploy_docs["on"]["branch"] = branch
    else:
        deploy_docs["on"]["all_branches"] = "true"
        
    return deploy_docs

def parse_docs_options():
    
    config = ConfigParser.RawConfigParser(allow_no_value=True)
    config.read('.sauce.ini')
    
    options = []
    
    projectname = config.get('Docs', 'projectname')
    description = config.get('Docs', 'description')
    logo = config.get('Docs', 'logo')
    
    include_non_documented = config.getboolean('Docs', 'include_non_documented')
    include_privates = config.getboolean('Docs', 'include_privates')
    include_nav_panel = config.getboolean('Docs', 'include_nav_panel')
    include_search = config.getboolean('Docs', 'include_search')
    gen_diagrams = config.getboolean('Docs', 'gen_diagrams')
    
    if projectname:
        options.append("projectname=%s" % projectname)
    
    if description:
        options.append("description=%s" % description)
        
    if logo:
        options.append("logo=%s" % logo)
    
    if include_non_documented:
        options.append("include_non_documented=YES")
    else:
        options.append("include_non_documented=NO")
    
    if include_privates:
        options.append("include_privates=YES")
    else:
        options.append("include_privates=NO")
    
    if include_nav_panel:
        options.append("include_nav_panel=YES")
    else:
        options.append("include_nav_panel=NO")
    
    if include_search:
        options.append("include_search=YES")
    else:
        options.append("include_search=NO")
    
    if gen_diagrams:
        options.append("gen_diagrams=YES")
    else:
        options.append("gen_diagrams=NO")
    
    return options


{'fraction_non_alphanumeric': 0.13224592220828105, 'fraction_numerical': 0.0, 'mean_word_length': 2.91937069813176, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2984477', 'n_tokens_mistral': 1279, 'n_tokens_neox': 1258, 'n_words': 200}