• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Clinical-Genomics / cg / 10504067794

22 Aug 2024 07:54AM UTC coverage: 84.772%. First build
10504067794

Pull #3622

github

web-flow
Merge 9063fc86c into 44bbe281f
Pull Request #3622: feat(delivery file mover service)

49 of 51 new or added lines in 5 files covered. (96.08%)

21989 of 25939 relevant lines covered (84.77%)

0.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/cg/services/file_delivery/abstract_classes.py
1
from abc import abstractmethod, ABC
×
2

3
from cg.services.file_delivery.fetch_file_service.fetch_delivery_files_service import (
×
4
    FetchDeliveryFilesService,
5
)
NEW
6
from cg.services.file_delivery.move_files_service.move_delivery_files_service import (
×
7
    MoveDeliveryFilesService,
8
)
9

10

11
class FormatDeliveryFilesService(ABC):
×
12
    """
13
    Abstract class that encapsulates the logic required for formatting files to deliver.
14
    """
15

16
    @abstractmethod
×
17
    def format_files(self, case_id: str) -> None:
×
18
        """Format the files to deliver."""
19
        pass
×
20

21

22
class DeliverFilesService(ABC):
×
23
    """
24
    Abstract class that encapsulates the logic required for delivering files to the customer.
25

26
    1. Get the files to deliver from Housekeeper based on workflow and data delivery
27
    2. Create a delivery folder structure in the customer folder on Hasta and move the files there
28
    3. Reformatting of output / renaming of files
29
    4. Start a Rsync job to upload the files to Caesar
30
    5. Track the status of the Rsync job in Trailblazer
31
    """
32

33
    @abstractmethod
×
34
    def __init__(
×
35
        self,
36
        delivery_file_manager_service: FetchDeliveryFilesService,
37
        move_file_service: MoveDeliveryFilesService,
38
    ):
39
        self.file_manager = delivery_file_manager_service
×
40
        self.file_mover = move_file_service
×
41

42
    @abstractmethod
×
43
    def deliver_files_for_case(self, case_id: str) -> None:
×
44
        """Deliver the files to the customer folder."""
45
        pass
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc