Coverage for src/app/ports/split_file_port.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.7.0, created at 2025-04-02 22:46 +0200

1from abc import ABC, abstractmethod 

2 

3from models.file_chunk_model import FileChunkModel 

4from models.file_model import FileModel 

5 

6class SplitFilePort(ABC): 

7 

8 @abstractmethod 

9 def split_file(self, file: FileModel) -> list[FileChunkModel]: 

10 """ 

11 Splits the given file into chunks. 

12 

13 Args: 

14 file (FileModel): The file model containing the filename and file content. 

15 

16 Returns: 

17 list[FileChunkModel]: A list of file chunk models containing the chunk content and metadata. 

18 """