data/feature_extraction.py
def compute_avg_check_runs(lst: str, index: int) -> float:
        """Computes the average number of check run results in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count passed or failed.
                0 for passed, 1 for failed.

        Returns: A integer indicating the average number of check run results in
            the list.
        """
        if pd.isna(lst):
            return 0.0
        check_run_results = eval(lst)
        if len(check_run_results) == 0:
            return 0.0
        total = 0
        for t in check_run_results:
            total += eval(t)[index]
        return total / len(check_run_results)
Computes the average number of check run results in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count passed or failed.
                0 for passed, 1 for failed.

        Returns: A integer indicating the average number of check run results in
            the list.
        
Computes the average number of check run results in the list.
Computes the average number of check run results in the list .
def compute_avg_check_runs(lst: str, index: int) -> float:
        if pd.isna(lst):
            return 0.0
        check_run_results = eval(lst)
        if len(check_run_results) == 0:
            return 0.0
        total = 0
        for t in check_run_results:
            total += eval(t)[index]
        return total / len(check_run_results)
def compute_avg_check_runs ( lst : str , index : int ) -> float : if pd . isna ( lst ) : return 0.0 check_run_results = eval ( lst ) if len ( check_run_results ) == 0 : return 0.0 total = 0 for t in check_run_results : total += eval ( t ) [ index ] return total / len ( check_run_results )
Computes the average number of check run results in the list.
Computes the average number of check run results in the list .
"""Computes the average number of check run results in the list.

        Args:
            lst: A str of list representation.
            index: A integer indicating whether to count passed or failed.
                0 for passed, 1 for failed.

        Returns: A integer indicating the average number of check run results in
            the list.
        """
lst
str
A str of list representation.
A str of list representation .
index
int
A integer indicating whether to count passed or failed.
0 for passed, 1 for failed.
A integer indicating whether to count passed or failed . 0 for passed 1 for failed .