data/file_level_transformation.py
def transform(self) -> None:
        """Transform the pull request level signals to file level.

        This function transforms the pull request level signals for each file by
        keeping an entry for each file. Each column is a kind of signal.
        For a certain signal of a file that is involved in multiple pull
        requests, multiple entries are maintained.

        Returns: None
        """
        print("Transforming pull request signals to file level")
        for idx in range(len(self._pr_level_data)):
            datum = self._pr_level_data.iloc[idx]
            repo_name = str(datum['repo name'])
            check_run_results = eval(datum['check run results'])
            pr_related_values, file_related_values = self._get_value_dict(datum)
            file_versions = file_related_values['file versions']
            file_names = file_versions.keys()

            file_data_dict = defaultdict(FileData)
            self._transform_pr_related_signals(
                pr_related_values, file_names, repo_name, check_run_results,
                file_data_dict)
            self._transform_file_related_signals(
                file_related_values, file_versions, file_data_dict)

            for file in file_data_dict:
                file_data = file_data_dict[file].data
                file_data['file name'] = file_data_dict[file].file_name
                file_data['repo name'] = file_data_dict[file].repo_name
                self._file_level_data.append(file_data)
Transform the pull request level signals to file level.

        This function transforms the pull request level signals for each file by
        keeping an entry for each file. Each column is a kind of signal.
        For a certain signal of a file that is involved in multiple pull
        requests, multiple entries are maintained.

        Returns: None
        
Transform the pull request level signals to file level.
This function transforms the pull request level signals for each file by
keeping an entry for each file. Each column is a kind of signal.
For a certain signal of a file that is involved in multiple pull
requests, multiple entries are maintained.

None
Transform the pull request level signals to file level . This function transforms the pull request level signals for each file by keeping an entry for each file . Each column is a kind of signal . For a certain signal of a file that is involved in multiple pull requests multiple entries are maintained . None
def transform(self) -> None:
        print("Transforming pull request signals to file level")
        for idx in range(len(self._pr_level_data)):
            datum = self._pr_level_data.iloc[idx]
            repo_name = str(datum['repo name'])
            check_run_results = eval(datum['check run results'])
            pr_related_values, file_related_values = self._get_value_dict(datum)
            file_versions = file_related_values['file versions']
            file_names = file_versions.keys()
            file_data_dict = defaultdict(FileData)
            self._transform_pr_related_signals(
                pr_related_values, file_names, repo_name, check_run_results,
                file_data_dict)
            self._transform_file_related_signals(
                file_related_values, file_versions, file_data_dict)
            for file in file_data_dict:
                file_data = file_data_dict[file].data
                file_data['file name'] = file_data_dict[file].file_name
                file_data['repo name'] = file_data_dict[file].repo_name
                self._file_level_data.append(file_data)
def transform ( self ) -> None : print ( "Transforming pull request signals to file level" ) for idx in range ( len ( self . _pr_level_data ) ) : datum = self . _pr_level_data . iloc [ idx ] repo_name = str ( datum [ 'repo name' ] ) check_run_results = eval ( datum [ 'check run results' ] ) pr_related_values , file_related_values = self . _get_value_dict ( datum ) file_versions = file_related_values [ 'file versions' ] file_names = file_versions . keys ( ) file_data_dict = defaultdict ( FileData ) self . _transform_pr_related_signals ( pr_related_values , file_names , repo_name , check_run_results , file_data_dict ) self . _transform_file_related_signals ( file_related_values , file_versions , file_data_dict ) for file in file_data_dict : file_data = file_data_dict [ file ] . data file_data [ 'file name' ] = file_data_dict [ file ] . file_name file_data [ 'repo name' ] = file_data_dict [ file ] . repo_name self . _file_level_data . append ( file_data )
Transform the pull request level signals to file level.
Transform the pull request level signals to file level .
"""Transform the pull request level signals to file level.

        This function transforms the pull request level signals for each file by
        keeping an entry for each file. Each column is a kind of signal.
        For a certain signal of a file that is involved in multiple pull
        requests, multiple entries are maintained.

        Returns: None
        """
self