data/file_level_transformation.py
def _transform_pr_related_signals(
            self, pr_related_values: dict,
            file_names: List[str], repo_name: str,
            check_run_results: List[str],
            file_data_dict: dict
    ) -> None:
        """Transform the signals of pull request level columns.

        This function takes the pull request level values dict, a list of
        file names, repository name, and a list of check run results.
        It transforms the signals that are pull request related.

        Args:
            pr_related_values: A dict that holds the pull request related signal
                values. The keys are the pull request related signals columns,
                and the values are the pull request related signals values.
            file_names: A list of file names.
            repo_name: A str of repository name.
            check_run_results: A list of check run result status.
                Example: ['none', 'passed', 'failed'].
            file_data_dict: A dict of file data to fill in.

        Returns: None
        """
        for file_name in file_names:
            if not file_data_dict[file_name].file_name:
                file_data_dict[file_name].file_name = file_name

            if not file_data_dict[file_name].repo_name:
                file_data_dict[file_name].repo_name = repo_name

            for column in self._pr_related_columns:
                value = pr_related_values[column]
                file_data_dict[file_name].data[column] = value

            num_passed, num_failed = \
                self._count_check_run_status(check_run_results)
            file_data_dict[file_name].data['check run results'] = \
                (num_passed, num_failed)
Transform the signals of pull request level columns.

        This function takes the pull request level values dict, a list of
        file names, repository name, and a list of check run results.
        It transforms the signals that are pull request related.

        Args:
            pr_related_values: A dict that holds the pull request related signal
                values. The keys are the pull request related signals columns,
                and the values are the pull request related signals values.
            file_names: A list of file names.
            repo_name: A str of repository name.
            check_run_results: A list of check run result status.
                Example: ['none', 'passed', 'failed'].
            file_data_dict: A dict of file data to fill in.

        Returns: None
        
Transform the signals of pull request level columns.
This function takes the pull request level values dict, a list of
file names, repository name, and a list of check run results.
It transforms the signals that are pull request related.
Transform the signals of pull request level columns . This function takes the pull request level values dict a list of file names repository name and a list of check run results . It transforms the signals that are pull request related .
def _transform_pr_related_signals(
            self, pr_related_values: dict,
            file_names: List[str], repo_name: str,
            check_run_results: List[str],
            file_data_dict: dict
    ) -> None:
        for file_name in file_names:
            if not file_data_dict[file_name].file_name:
                file_data_dict[file_name].file_name = file_name
            if not file_data_dict[file_name].repo_name:
                file_data_dict[file_name].repo_name = repo_name
            for column in self._pr_related_columns:
                value = pr_related_values[column]
                file_data_dict[file_name].data[column] = value
            num_passed, num_failed = \
                self._count_check_run_status(check_run_results)
            file_data_dict[file_name].data['check run results'] = \
                (num_passed, num_failed)
def _transform_pr_related_signals ( self , pr_related_values : dict , file_names : List [ str ] , repo_name : str , check_run_results : List [ str ] , file_data_dict : dict ) -> None : for file_name in file_names : if not file_data_dict [ file_name ] . file_name : file_data_dict [ file_name ] . file_name = file_name if not file_data_dict [ file_name ] . repo_name : file_data_dict [ file_name ] . repo_name = repo_name for column in self . _pr_related_columns : value = pr_related_values [ column ] file_data_dict [ file_name ] . data [ column ] = value num_passed , num_failed = self . _count_check_run_status ( check_run_results ) file_data_dict [ file_name ] . data [ 'check run results' ] = ( num_passed , num_failed )
Transform the signals of pull request level columns.
Transform the signals of pull request level columns .
"""Transform the signals of pull request level columns.

        This function takes the pull request level values dict, a list of
        file names, repository name, and a list of check run results.
        It transforms the signals that are pull request related.

        Args:
            pr_related_values: A dict that holds the pull request related signal
                values. The keys are the pull request related signals columns,
                and the values are the pull request related signals values.
            file_names: A list of file names.
            repo_name: A str of repository name.
            check_run_results: A list of check run result status.
                Example: ['none', 'passed', 'failed'].
            file_data_dict: A dict of file data to fill in.

        Returns: None
        """
self
pr_related_values
dict
A dict that holds the pull request related signal
values. The keys are the pull request related signals columns,
and the values are the pull request related signals values.
A dict that holds the pull request related signal values . The keys are the pull request related signals columns and the values are the pull request related signals values .
file_names
List[str]
A list of file names.
A list of file names .
repo_name
str
A str of repository name.
A str of repository name .
check_run_results
List[str]
A list of check run result status.
Example: ['none', 'passed', 'failed'].
A list of check run result status . Example : [ ' none ' ' passed ' ' failed ' ] .
file_data_dict
dict
A dict of file data to fill in.
A dict of file data to fill in .