Ejemplo n.º 1
    def analyze(self,  ignore_regex="^$", max_commits=None, method_granularity=True, parallel=True):
        """ Analyze commits.

        Extracts commits and call an analyzer to output analytics.

            ignore_regex: An optional string that is a regex pattern to ignore unnecessary files.
            max_commits: An optional int that is the maximum number of commits to extract since the last one.
            method_granularity: An optional boolean that enables extraction until the method granularity.

            A RepositoryAnalytics instance.
        configs = self.get_yaml_configs()
        max_commits = self.configure_yaml(configs, max_commits)
        extractor = GitExtractor(self.repo_path)
        repo = extractor.extract(ignore_regex, max_commits, method_granularity, parallel)
        analysis = SchwaAnalysis(repo)
        analytics = analysis.analyze()
        return analytics