How to use the ai2thor._version.__version__.split function in ai2thor

To help you get started, we’ve selected a few ai2thor examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github allenai / ai2thor / tasks.py View on Github external
def increment_version(context):
    import ai2thor._version

    major, minor, subv = ai2thor._version.__version__.split(".")
    subv = int(subv) + 1
    with open("ai2thor/_version.py", "w") as fi:
        fi.write("# Copyright Allen Institute for Artificial Intelligence 2017\n")
        fi.write("# GENERATED FILE - DO NOT EDIT\n")
        fi.write("__version__ = '%s.%s.%s'\n" % (major, minor, subv))