utils/file-tester/lms_file_tester/validators/directory_validation.py
def validate_section_directory_structure(
    input_directory: str, section_id: Union[str, int]
) -> List[str]:
    """
    Validates that a Section directory contains the section associations,
    section activities, assignments, and grades directories. Ignores
    attendance events, which are only for Schoology.

    Parameters
    ----------
    input_directory: str
        Base / parent directory containing files created by an LMS extractor.
    section_id: int
        Section identifier.

    Returns
    -------
    List[str]
        List containing detailed error messages, if any.
    """
    is_missing = _check_for_directory(input_directory)
    if is_missing:
        return [is_missing]

    errors: List[str] = list()

    for d in [
        dr.get_section_associations_directory(input_directory, section_id),
        dr.get_section_activities_directory(input_directory, section_id),
        dr.get_assignments_directory(input_directory, section_id),
        dr.get_grades_directory(input_directory, section_id),
        # Ignoring attendance events, since only the Schoology extractor exports this
    ]:
        is_missing = _check_for_directory(d)
        if is_missing:
            errors.append(is_missing)

    return errors

    Validates that a Section directory contains the section associations,
    section activities, assignments, and grades directories. Ignores
    attendance events, which are only for Schoology.

    Parameters
    ----------
    input_directory: str
        Base / parent directory containing files created by an LMS extractor.
    section_id: int
        Section identifier.

    Returns
    -------
    List[str]
        List containing detailed error messages, if any.
    
Validates that a Section directory contains the section associations,
section activities, assignments, and grades directories. Ignores
attendance events, which are only for Schoology.

Parameters

str
Base / parent directory containing files created by an LMS extractor.
section_id: int
Section identifier.

Returns

List[str]
List containing detailed error messages, if any.
Validates that a Section directory contains the section associations section activities assignments and grades directories . Ignores attendance events which are only for Schoology . Parameters str Base / parent directory containing files created by an LMS extractor . section_id : int Section identifier . Returns List [ str ] List containing detailed error messages if any .
def validate_section_directory_structure(
    input_directory: str, section_id: Union[str, int]
) -> List[str]:
    is_missing = _check_for_directory(input_directory)
    if is_missing:
        return [is_missing]
    errors: List[str] = list()
    for d in [
        dr.get_section_associations_directory(input_directory, section_id),
        dr.get_section_activities_directory(input_directory, section_id),
        dr.get_assignments_directory(input_directory, section_id),
        dr.get_grades_directory(input_directory, section_id),
    ]:
        is_missing = _check_for_directory(d)
        if is_missing:
            errors.append(is_missing)
    return errors
def validate_section_directory_structure ( input_directory : str , section_id : Union [ str , int ] ) -> List [ str ] : is_missing = _check_for_directory ( input_directory ) if is_missing : return [ is_missing ] errors : List [ str ] = list ( ) for d in [ dr . get_section_associations_directory ( input_directory , section_id ) , dr . get_section_activities_directory ( input_directory , section_id ) , dr . get_assignments_directory ( input_directory , section_id ) , dr . get_grades_directory ( input_directory , section_id ) , ] : is_missing = _check_for_directory ( d ) if is_missing : errors . append ( is_missing ) return errors
Validates that a Section directory contains the section associations,
section activities, assignments, and grades directories.
Validates that a Section directory contains the section associations section activities assignments and grades directories .
"""
    Validates that a Section directory contains the section associations,
    section activities, assignments, and grades directories. Ignores
    attendance events, which are only for Schoology.

    Parameters
    ----------
    input_directory: str
        Base / parent directory containing files created by an LMS extractor.
    section_id: int
        Section identifier.

    Returns
    -------
    List[str]
        List containing detailed error messages, if any.
    """ # Ignoring attendance events, since only the Schoology extractor exports this
input_directory
str
section_id
Union[str, int]