Пример #1
0
    def __init__(self):
        args = self._parse_args(args=sys.argv[1:])
        self.platform = self.check_platform()
        self.installation_directory = self.set_installation_directory(
            args.installation_directory, "default"
        )

        self.logger = setup_custom_logger("directory_creator")

        # MANAGEMENT module
        self.kanban_directory = os.path.join(self.installation_directory, "kanbans")
        self.config_directory = os.path.join(self.installation_directory, "config")
        self.log_directory = os.path.join(self.installation_directory, "logs")

        # AUTOMATION module
        self.jobs_directory = os.path.join(self.installation_directory, "jobs")

        if args.debug == "enable":
            self.debug = True
        else:
            self.debug = False

        if args.validate_directory == "enable":
            self.validate_directory = True
        else:
            self.validate_directory = False
Пример #2
0
 def __init__(self, dir_db, dir_fids, dir_pid):
     self.dir_db = dir_db
     self.dir_fid = dir_fids
     self.dir_pid = dir_pid
     self.file_pid_master = glob.glob(dir_pid + "/*.csv")
     self.logger = log.setup_custom_logger(__name__,
                                           f_log=self.fn_log,
                                           level=log.INFO)
     self.logger.info("FIW-DB")
Пример #3
0
 def __init__(
     self,
     installation_directory: str,
     config_directory: str,
     kanbans_directory: str,
     log_directory: str,
 ):
     self.installation_directory = installation_directory
     self.config_directory = config_directory
     self.log_directory = log_directory
     self.kanbans_directory = kanbans_directory
     self.logger = setup_custom_logger("config_creator")
Пример #4
0
    def __init__(self):
        self.logger = setup_custom_logger("config_reader")

        try:
            self.config_directory = os.environ["RABBITCONFIG"]
        except KeyError:
            self.logger.info(
                "Unable to get RABBITCONFIG environmental variable! Exiting")
            sys.exit(1)

        self.installation_directory, self.kanbans_directory, self.jobs_directory = self.read(
        )
        self.move_log()
Пример #5
0
import numpy as np
import pandas as pd

# import pyfiw.helpers as helpers
# import utils.log as log
# from pyfiw import io
from src.configs import CONFIGS
from tools import log

# from tools import image as image_tools

# from utils.pairwise import nchoosek

logger = log.setup_custom_logger(__name__,
                                 f_log=CONFIGS.path.dbroot + "fiw-db.log",
                                 level=log.INFO)


def parse_relationship_matrix(data):
    """
    :param
    """


def parse_siblings(data, my_log=logger):
    """
    Parse sibling pairs by referencing member ID LUT and relationship matrix.

    Siblings RID is 2 and sister, of course, are Females. Thus, these are the factors we use to identify pairs.
Пример #6
0
from flask_restplus import Api
from tools.log import setup_custom_logger
from tools.config_reader import ConfigReader
import os

api = Api(
    version="0.35",
    title="Rabbit-CI API",
    description="This is a REST API for Rabbit-CI",
)
config = ConfigReader()
log_directory = os.path.join(config.installation_directory, "logs")
logger = setup_custom_logger(os.path.join(log_directory, "api_server"))