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

# Copyright 2016 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from invoke import task, run

@task
def create():
    run("vagrant up", pty=True)


@task
def reload():
    run("vagrant destroy -f", pty=True)
    create()


@task
def enter():
    import os
    os.system("vagrant ssh -- -Yt 'cd /vagrant/; /bin/bash'")


@task
def genui():
    from PyQt5 import uic
    from os.path import join

    uic.compileUiDir(join("fomod", "gui", "templates"))


@task
def clean():
    from shutil import rmtree

    rmtree("dist", ignore_errors=True)
    rmtree("build", ignore_errors=True)


@task(clean)
def build():
    from platform import system, architecture
    from shutil import make_archive, move
    from os import path, curdir, environ
    from configparser import ConfigParser

    try:
        build_number = environ["APPVEYOR_BUILD_NUMBER"]
    except KeyError:
        build_number = 0

    config = ConfigParser()
    config.read("setup.cfg")

    config.set("bumpversion", "current_build", build_number)

    with open('setup.cfg', 'wb') as configfile:
        config.write(configfile)

    version = config.get('bumpversion', 'current_version') + "." + build_number<commit_msg>Appveyor build should be fixed.<commit_after>#!/usr/bin/env python

# Copyright 2016 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from invoke import task, run

@task
def create():
    run("vagrant up", pty=True)


@task
def reload():
    run("vagrant destroy -f", pty=True)
    create()


@task
def enter():
    import os
    os.system("vagrant ssh -- -Yt 'cd /vagrant/; /bin/bash'")


@task
def genui():
    from PyQt5 import uic
    from os.path import join

    uic.compileUiDir(join("fomod", "gui", "templates"))


@task
def clean():
    from shutil import rmtree

    rmtree("dist", ignore_errors=True)
    rmtree("build", ignore_errors=True)


@task(clean)
def build():
    from platform import system, architecture
    from shutil import make_archive, move
    from os import path, curdir, environ
    from configparser import ConfigParser

    try:
        build_number = environ["APPVEYOR_BUILD_NUMBER"]
    except KeyError:
        build_number = 0

    config = ConfigParser()
    config.read("setup.cfg")

    config.set("bumpversion", "current_build", str(build_number))

    with open('setup.cfg', 'w') as configfile:
        config.write(configfile)

    version = config.get('bumpversion', 'current_version') + "." + build_number
{'fraction_non_alphanumeric': 0.10763490241102182, 'fraction_numerical': 0.0057405281285878304, 'mean_word_length': 3.6466666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3150304', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1032, 'n_words': 371}