Esempio n. 1
0
    def run_project_calculations(self):
        self.timer.start()

        if dt.datetime(
                2018, 7,
                1).date() <= self.data_provider.visit_date <= dt.datetime(
                    2018, 7, 31).date():
            TEMPLATE_PATH = os.path.join(
                os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
                'BIMY', 'Data', 'Template_Jul_2018.xlsx')
        elif dt.datetime(
                2018, 8,
                1).date() <= self.data_provider.visit_date <= dt.datetime(
                    2018, 8, 31).date():
            TEMPLATE_PATH = os.path.join(
                os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
                'BIMY', 'Data', 'Template_Aug_2018.xlsx')
        else:
            TEMPLATE_PATH = os.path.join(
                os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
                'BIMY', 'Data', 'Template.xlsx')

        SANOFIGenerator(self.data_provider, self.output,
                        TEMPLATE_PATH).main_function()
        self.timer.stop('KPIGenerator.run_project_calculations')
 def run_project_calculations(self):
     self.timer.start()
     TEMPLATE_PATH = os.path.join(
         os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
         'SANOFIKZ', 'Data', 'Template.xlsx')
     SANOFIGenerator(self.data_provider, self.output,
                     TEMPLATE_PATH).main_function()
     self.timer.stop('KPIGenerator.run_project_calculations')
 def run_project_calculations(self):
     """
     run_project_calculations function is the entry point function to run the calculation
     """
     self.timer.start()
     template_path = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'SANOFIAU', 'Data', 'Template.xlsx')
     SANOFIGenerator(self.data_provider, self.output, template_path).main_function()
     self.timer.stop('KPIGenerator.run_project_calculations')
    def run_project_calculations(self):
        self.timer.start()
        template_path = os.path.join(
            os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
            'SANOFIUA', 'Data', 'Template.xlsx')
        # TEMPLATE_PATH2 = TEMPLATE_PATH.replace("/Template.xlsx", "/template_jan.xlsx")
        # SANOFIGenerator(self.data_provider, self.output, TEMPLATE_PATH, template=TEMPLATE_PATH2).main_function()
        SANOFIGenerator(self.data_provider, self.output,
                        template_path).main_function()

        self.timer.stop('KPIGenerator.run_project_calculations')
 def run_project_calculations(self):
     self.timer.start()
     if str(self.data_provider.visit_date) >= '2018-02-01' and str(
             self.data_provider.visit_date) <= '2018-02-28':
         TEMPLATE_PATH = os.path.join(
             os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
             'BIPH', 'Data', 'Template_old.xlsx')
     else:
         TEMPLATE_PATH = os.path.join(
             os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
             'BIPH', 'Data', 'Template.xlsx')
     SANOFIGenerator(self.data_provider, self.output,
                     TEMPLATE_PATH).main_function()
     self.timer.stop('KPIGenerator.run_project_calculations')