<commit_before>"""Utilities for interacting with database through the Inventory API

Until assets are created entirely in the database, this script
provides a bridge between the file-based project inventory and configuration.

Usage:
    $ # Create new project:
    $ python -m avalon.inventory --init
    $ python -m avalon.inventory --save

    $ # Manage existing project
    $ python -m avalon.inventory --load
    $ # Update the .inventory.toml or .config.toml
    $ python -m avalon.inventory --save

"""

import os
import sys
import copy
import json

from avalon import schema, io, api
from avalon.vendor import toml

self = sys.modules[__name__]
self.collection = None

__all__ = [
    "init",
    "save",
    "load",
]


DEFAULTS = {
    "config": {
        "schema": "avalon-core:config-1.0",
        "apps": [
            {
                "name": "maya2016",
                "label": "Autodesk Maya 2016"
            },
            {
                "name": "nuke10",
                "label": "The Foundry Nuke 10.0"
            },
        ],
        "tasks": [
            {"name": "model"},
            {"name": "render"},<commit_msg>Clean up unused imports.<commit_after>"""Utilities for interacting with database through the Inventory API

Until assets are created entirely in the database, this script
provides a bridge between the file-based project inventory and configuration.

Usage:
    $ # Create new project:
    $ python -m avalon.inventory --init
    $ python -m avalon.inventory --save

    $ # Manage existing project
    $ python -m avalon.inventory --load
    $ # Update the .inventory.toml or .config.toml
    $ python -m avalon.inventory --save

"""

import os
import sys
import copy
import json

from avalon import schema, io
from avalon.vendor import toml

self = sys.modules[__name__]
self.collection = None

__all__ = [
    "init",
    "save",
    "load",
]


DEFAULTS = {
    "config": {
        "schema": "avalon-core:config-1.0",
        "apps": [
            {
                "name": "maya2016",
                "label": "Autodesk Maya 2016"
            },
            {
                "name": "nuke10",
                "label": "The Foundry Nuke 10.0"
            },
        ],
        "tasks": [
            {"name": "model"},
            {"name": "render"},
{'fraction_non_alphanumeric': 0.11815812337098175, 'fraction_numerical': 0.013032145960034752, 'mean_word_length': 1.9986979166666667, 'pattern_counts': {'":': 20, '<': 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': '1158637', 'n_tokens_mistral': 718, 'n_tokens_neox': 671, 'n_words': 213}