def __init__( self, project_root, cache, csv_path, s3_sample_frame, s3_ignore_fullsize_color, verbose, ): """Project class to interact with S3 Args: project_root (str): Path of the project. cache (str): Path of the local cache. csv_path (str): Path to AWS credentials .csv file s3_sample_frame (str): Sample frame to donwload (empty = first found) s3_ignore_fullsize_color (bool): Boolean to ignore full-size colors verbose (bool): Verbose output """ project_address = Address(project_root) self.is_aws = project_address.protocol == "s3" self.is_lan = project_address.protocol == "smb" self.project_root = project_root self.path_project = os.path.join(cache, project_address.path) self.s3_sample_frame = s3_sample_frame self.s3_ignore_fullsize_color = s3_ignore_fullsize_color self.verbose = verbose if self.is_aws: self.aws_util = AWSUtil(csv_path, s3_url=self.project_root) self.aws_util.configure_shell(run_silently=not verbose) verify_data.set_default_top_level_paths(self)
def set_default_top_level_paths(self, mkdirs=False): """Defines class referenceable attributes for paths. See common for full set of definitions. Args: mkdirs (bool, optional): Whether or not to make the defined directories. """ verify_data.set_default_top_level_paths(self, mkdirs)
def __init__(self): """Creates the main UI dialog box and sets up the sections in the desired layout.""" QDialog.__init__(self) self.font_type = "Courier" self.font_size = 10 font = QFont(self.font_type, self.font_size) font.setFixedPitch(True) QApplication.setFont(font, "QPlainTextEdit") self.ts_start = datetime.datetime.now() self.ui_flags = FLAGS self.dlg = uic.loadUi("dep.ui", self) has_pickled_project = self.unpickle_project() self.verbose = FLAGS.verbose self.s3_ignore_fullsize_color = FLAGS.s3_ignore_fullsize_color self.s3_sample_frame = FLAGS.s3_sample_frame self.project_root = FLAGS.project_root self.path_project = config.DOCKER_INPUT_ROOT self.configure_farm() self.full_size = self.dlg.frameSize() verify_data.set_default_top_level_paths(self) if not has_pickled_project: verify_data.verify(self) dep_util.set_full_size_widths(self) self.calibrate = Calibration(self) self.background = Background(self) self.depth = DepthEstimation(self) self.export = Export(self) self.sections = [ self.calibrate, self.background, self.depth, self.export ] global sections sections = self.sections self.setup_sections_layout() self.setup_sections_signals() self.setup_project() self.setup_clock() self.dlg.show()