def load(self): config = Config(self.app.log, self.app.pargs.path_config) LogConfig(self.app.log, self.app.config, config.config_path + 'load.log') load = Load(self.app.log, self.app.config) load.refresh_jira_cache()
def clear(self): config = Config(self.app.log, self.app.pargs.path_config) LogConfig(self.app.log, self.app.config, config.config_path + 'clear.log') clear = Clear(self.app.log, config) clear.main()
def run(self): config = Config(self.app.log, self.app.pargs.path_config) LogConfig(self.app.log, self.app.config, config.config_path + 'run.log') # Load data from Jira load = Load(self.app.log, self.app.config) daily_data, remaining_work = load.refresh_jira_cache() # Crunch numbers crunch = Crunch(self.app.log, config) stats_days, stats_weeks, stats_remaining = crunch.crunch_stats( daily_data, remaining_work) # Build Chart BuildChart(self.app.log, config).main(stats_days, stats_weeks, stats_remaining) # Publish Chart PublishGithubPage(self.app.log, config).main() #Get previously crunched number from cache file, to avoid the issue with json index key conversion # Issue, there is no numerical indexes in json, only strings. stats_days, stats_weeks, stats_remaining = crunch.load_stats_cache() # Message Team Msg(self.app.log, config, self.app.pargs.send).publish(stats_days, stats_weeks, stats_remaining)
def crunch(self): config = Config(self.app.log, self.app.pargs.path_config) LogConfig(self.app.log, self.app.config, config.config_path + 'crunch.log') # Loading saved files into memory to be used by the component crunching numbers load = Load(self.app.log, self.app.config) daily_data, remaining_work = load.load_jira_cache() crunch = Crunch(self.app.log, config) crunch.crunch_stats(daily_data, remaining_work)
def msg(self): config = Config(self.app.log, self.app.pargs.path_config) LogConfig(self.app.log, self.app.config, config.config_path + 'msg.log') #Get previously crunched number from cache file crunch = Crunch(self.app.log, config) stats_days, stats_weeks, stats_remaining = crunch.load_stats_cache() Msg(self.app.log, config, self.app.pargs.send).publish(stats_days, stats_weeks, stats_remaining)
def chart(self): config = Config(self.app.log, self.app.pargs.path_config) LogConfig(self.app.log, self.app.config, config.config_path + 'chart.log') #Get previously crunched number from cache file crunch = Crunch(self.app.log, config) stats_days, stats_weeks, stats_remaining = crunch.load_stats_cache() #Build charts BuildChart(self.app.log, config).main(stats_days, stats_weeks, stats_remaining)
def __init__(self, log, app_config): mypath = expanduser('~') + '/.jav/' onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] only_ymls = [ f for f in onlyfiles if f.startswith('config_') and f.endswith('.yml') ] for single_config in only_ymls: self.log = log self.config = Config(self.log, config_filename=single_config) self.log_config = LogConfig(self.log, app_config, self.config.config_path + 'setup.log')
def publish(self): config = Config(self.app.log, self.app.pargs.path_config) LogConfig(self.app.log, self.app.config, config.config_path + 'publish.log') PublishGithubPage(self.app.log, config).main()
def __init__(self, log, app_config): self.log = log self.config = Config(self.log) self.time = Time(self.log, self.config) self.log_config = LogConfig(self.log, app_config, self.config.config_path + 'load.log')
def __init__(self, log, app_config, single_config='config.yml'): self.log = log self.config = Config(self.log, config_filename=single_config) self.time = Time(self.log, self.config) self.log_config = LogConfig(self.log, app_config, self.config.config_path + 'load.log')
def __init__(self, log, app_config): self.log = log self.config = Config(self.log) self.log_config = LogConfig(self.log, app_config, self.config.config_path + 'setup.log')