<commit_before># -*- coding: utf-8 -*-
# Copyright (c) 2012-2017, <NAME>
#
# This module is part of anima-tools and is released under the BSD 2
# License: http://www.opensource.org/licenses/BSD-2-Clause

from stalker.config import Config as ConfigBase


class Config(ConfigBase):
    """configurator
    """

    default_config_values = dict(
        # stalker_server_internal_address=
        # defaults.stalker_server_internal_address
        # if 'stalker_server_internal_address' in defaults else None,
        # stalker_server_external_address=
        # defaults.stalker_server_external_address
        # if 'stalker_server_external_address' in defaults else None,

        stalker_dummy_user_login='anima',
        stalker_dummy_user_pass='<PASSWORD>',
        local_cache_folder='~/.cache/anima/',
        recent_file_name='recent_files',
        avid_media_file_path_storage='avid_media_file_path',

        normal_users_group_names=['Normal Users'],
        power_users_group_names=['Power Users', 'admins'],

        # environment variable template for repositories
        repo_env_template='REPO%(id)s',

        anima_env_var='ANIMAPATH',
        env_var_file_name='env.json',

        # some media
        ffmpeg_command_path='ffmpeg',
        ffprobe_command_path='ffprobe',

        max_recent_files=50,

        status_colors={
            'wfd': [171, 186, 195],
            'rts': [209, 91, 71],
            'wip': [255, 198, 87],
            'prev': [111, 179, 224],
            'hrev': [126, 110, 176],
            'drev': [126, 110, 176],
            'cmpl': [130, 175, 111],
            'oh': [213, 63, 64],
            'stop': [78, 89, 98],
        },

        _status_colors_by_id={},
        _user_names_lut={},  # a table for fast user name look up,

        task_template={
            
            "Asset": {
                "Character": {
                    "Default": {
                        "child_tasks": {
                            "Model": {
                                "type": "Model"
                            },
                            "LookDev": {
                                "type": "Look Development"
                            },
                            "Rig": {
                                "type": "Rig"
                            }
                        }
                    }
                },
                "Prop": {
                    "Default": {
                        "child_tasks": {
                            "Model": {
                                "type": "Model"
                            },
                            "LookDev": {
                                "type": "Look Development"
                            }
                        }
                    }
                },
                "Active Prop": {
                    "Default": {
                        "child_tasks": {
                            "Model": {
                                "type": "Model"
                            },
                            "LookDev": {
                                "type": "Look Development"
                            },
                            "Rig": {
                                "type": "Rig"
                            }
                        }
                    }
                }
            },
            "Sequence": {
                "Default": {
                    "child_tasks": {
                        "Edit": {
                            "type": "Edit"
                        },
                        "Shots": {}
                    }
                }
            },
            "Shot": {
                "Default": {
                    "child_tasks": {
                        "Animation": {
                            "type": "Animation"
                        },
                        "Lighting": {
                            "type": "Lighting",
                            "depends": ["Animation"]
                        },
                        "Comp": {
                            "type": "Comp",
                            "depends": ["Lighting"]
                        },
                        "Camera": {
                            "type": "Camera",
                            "schedule_model": "duration"
                        }
                    }
                },
                "AC": {
                    "child_tasks": {
                        "Animation": {
                            "type": "Animation"
                        },
                        "Camera": {
                            "type": "Camera",
                            "depends": ["Plate"]
                        },
                        "Lighting": {
                            "type": "Lighting",
                            "depends": ["Animation"]
                        },
                        "Comp": {
                            "type": "Comp",
                            "depends": ["Lighting"]
                        },
                        "Plate": {
                            "type": "Plate",
                            "schedule_model": "duration"
                        }
                    }
                },
                "CC": {
                    "child_tasks": {
                        "Comp": {
                            "type": "Comp"
                        },
                        "Plate": {
                            "type": "Plate",
                            "schedule_model": "duration"
                        }
                    }
                }
            }
        }
    )

    def __init__(self):
        super(Config, self).__init__()
        self.config_values.update(self.default_config_values.copy())
        self.user_config = {}

        # the priority order is
        # stalker.config
        # config.py under .stalker_rc directory
        # config.py under $STALKER_PATH

    @property
    def status_colors_by_id(self):
        """fills the _status_colors_by_id dictionary
        """
        if not self._status_colors_by_id:
            from anima.utils import do_db_setup
            do_db_setup()
            from stalker import StatusList
            task_status_list = \
                StatusList.query \
                    .filter(StatusList.target_entity_type == 'Task') \
                    .first()

            for status in task_status_list.statuses:
                self._status_colors_by_id[status.id] = \
                    self.status_colors[status.code.lower()]
        return self._status_colors_by_id<commit_msg>* **Fix:** The library is now Stalker v0.2.21 compatible.<commit_after># -*- coding: utf-8 -*-
# Copyright (c) 2012-2017, <NAME>
#
# This module is part of anima-tools and is released under the BSD 2
# License: http://www.opensource.org/licenses/BSD-2-Clause

from stalker.config import Config as ConfigBase


class Config(ConfigBase):
    """configurator
    """

    extra_config_values = dict(
        # stalker_server_internal_address=
        # defaults.stalker_server_internal_address
        # if 'stalker_server_internal_address' in defaults else None,
        # stalker_server_external_address=
        # defaults.stalker_server_external_address
        # if 'stalker_server_external_address' in defaults else None,

        stalker_dummy_user_login='anima',
        stalker_dummy_user_pass='<PASSWORD>',
        local_cache_folder='~/.cache/anima/',
        recent_file_name='recent_files',
        avid_media_file_path_storage='avid_media_file_path',

        normal_users_group_names=['Normal Users'],
        power_users_group_names=['Power Users', 'admins'],

        # environment variable template for repositories
        repo_env_template='REPO%(id)s',

        anima_env_var='ANIMAPATH',
        env_var_file_name='env.json',

        # some media
        ffmpeg_command_path='ffmpeg',
        ffprobe_command_path='ffprobe',

        max_recent_files=50,

        status_colors={
            'wfd': [171, 186, 195],
            'rts': [209, 91, 71],
            'wip': [255, 198, 87],
            'prev': [111, 179, 224],
            'hrev': [126, 110, 176],
            'drev': [126, 110, 176],
            'cmpl': [130, 175, 111],
            'oh': [213, 63, 64],
            'stop': [78, 89, 98],
        },

        _status_colors_by_id={},
        _user_names_lut={},  # a table for fast user name look up,

        task_template={
            
            "Asset": {
                "Character": {
                    "Default": {
                        "child_tasks": {
                            "Model": {
                                "type": "Model"
                            },
                            "LookDev": {
                                "type": "Look Development"
                            },
                            "Rig": {
                                "type": "Rig"
                            }
                        }
                    }
                },
                "Prop": {
                    "Default": {
                        "child_tasks": {
                            "Model": {
                                "type": "Model"
                            },
                            "LookDev": {
                                "type": "Look Development"
                            }
                        }
                    }
                },
                "Active Prop": {
                    "Default": {
                        "child_tasks": {
                            "Model": {
                                "type": "Model"
                            },
                            "LookDev": {
                                "type": "Look Development"
                            },
                            "Rig": {
                                "type": "Rig"
                            }
                        }
                    }
                }
            },
            "Sequence": {
                "Default": {
                    "child_tasks": {
                        "Edit": {
                            "type": "Edit"
                        },
                        "Shots": {}
                    }
                }
            },
            "Shot": {
                "Default": {
                    "child_tasks": {
                        "Animation": {
                            "type": "Animation"
                        },
                        "Lighting": {
                            "type": "Lighting",
                            "depends": ["Animation"]
                        },
                        "Comp": {
                            "type": "Comp",
                            "depends": ["Lighting"]
                        },
                        "Camera": {
                            "type": "Camera",
                            "schedule_model": "duration"
                        }
                    }
                },
                "AC": {
                    "child_tasks": {
                        "Animation": {
                            "type": "Animation"
                        },
                        "Camera": {
                            "type": "Camera",
                            "depends": ["Plate"]
                        },
                        "Lighting": {
                            "type": "Lighting",
                            "depends": ["Animation"]
                        },
                        "Comp": {
                            "type": "Comp",
                            "depends": ["Lighting"]
                        },
                        "Plate": {
                            "type": "Plate",
                            "schedule_model": "duration"
                        }
                    }
                },
                "CC": {
                    "child_tasks": {
                        "Comp": {
                            "type": "Comp"
                        },
                        "Plate": {
                            "type": "Plate",
                            "schedule_model": "duration"
                        }
                    }
                }
            }
        }
    )

    def __init__(self):
        super(Config, self).__init__()
        self.config_values.update(self.extra_config_values.copy())
        self.user_config = {}

        # the priority order is
        # stalker.config
        # config.py under .stalker_rc directory
        # config.py under $STALKER_PATH

    @property
    def status_colors_by_id(self):
        """fills the _status_colors_by_id dictionary
        """
        if not self._status_colors_by_id:
            from anima.utils import do_db_setup
            do_db_setup()
            from stalker import StatusList
            task_status_list = \
                StatusList.query \
                    .filter(StatusList.target_entity_type == 'Task') \
                    .first()

            for status in task_status_list.statuses:
                self._status_colors_by_id[status.id] = \
                    self.status_colors[status.code.lower()]
        return self._status_colors_by_id
{'fraction_non_alphanumeric': 0.10373789346246973, 'fraction_numerical': 0.013317191283292978, 'mean_word_length': 0.8115405701754386, 'pattern_counts': {'":': 138, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2432683', 'n_tokens_mistral': 3399, 'n_tokens_neox': 3051, 'n_words': 549}