rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
version=None, pdf=False, vt_tag='',parameters=''): | version=None, pdf=False, vt_tag='',parameters='', is_local=True): | def run_from_db(self, host, port, db_name, vt_id, path_to_figures, version=None, pdf=False, vt_tag='',parameters=''): self.server_logger.info("Request: run_vistrail_from_db(%s,%s,%s,%s,%s,%s,%s,%s,%s)" % \ (host, port, db_name, vt_id, path_to_figures, version, pdf, vt_tag, parameters)) |
def get_wf_graph_pdf(self, host, port, db_name, vt_id, version): | def get_wf_graph_pdf(self, host, port, db_name, vt_id, version, is_local=True): | def get_wf_graph_pdf(self, host, port, db_name, vt_id, version): """get_wf_graph_pdf(host:str, port:int, db_name:str, vt_id:int, version:int) -> str Returns the relative url to the generated PDF """ self.server_logger.info("get_wf_graph_pdf(%s,%s,%s,%s,%s) request received" % \ (host, port, db_name, vt_id, version)) tr... |
def get_wf_graph_png(self, host, port, db_name, vt_id, version): | def get_wf_graph_png(self, host, port, db_name, vt_id, version, is_local=True): | def get_wf_graph_png(self, host, port, db_name, vt_id, version): """get_wf_graph_png(host:str, port:int, db_name:str, vt_id:int, version:int) -> str Returns the relative url to the generated image """ self.server_logger.info("get_wf_graph_png(%s,%s,%s,%s,%s) request received" % \ (host, port, db_name, vt_id, version)) ... |
def get_vt_graph_png(self, host, port, db_name, vt_id): | def get_vt_graph_png(self, host, port, db_name, vt_id, is_local=True): | def get_vt_graph_png(self, host, port, db_name, vt_id): """get_vt_graph_png(host:str, port: str, db_name: str, vt_id:str) -> str Returns the relative url of the generated image """ |
result = proxy.get_vt_graph_png(host, port, db_name, vt_id) | result = proxy.get_vt_graph_png(host, port, db_name, vt_id, is_local) | def get_vt_graph_png(self, host, port, db_name, vt_id): """get_vt_graph_png(host:str, port: str, db_name: str, vt_id:str) -> str Returns the relative url of the generated image """ |
def getPDFWorkflowMedley(self, m_id): | def getPDFWorkflowMedley(self, m_id, is_local=True): | def getPDFWorkflowMedley(self, m_id): """getPDFWorkflowMedley(m_id:int) -> str Returns the relative url to the generated image """ self.server_logger.info("getPDFWorkflowMedley(%s) request received" % m_id) try: m_id = int(m_id) medley = self.medley_objs[m_id] except Exception, e: self.server_logger.error(str(e)) |
def getPNGWorkflowMedley(self, m_id): | def getPNGWorkflowMedley(self, m_id, is_local=True): | def getPNGWorkflowMedley(self, m_id): self.server_logger.info("getPNGWorkflowMedley(%s) request received" % m_id) try: m_id = int(m_id) medley = self.medley_objs[m_id] except Exception, e: self.server_logger.error(str(e)) |
def get_vt_tagged_versions(self, host, port, db_name, vt_id): | def get_vt_tagged_versions(self, host, port, db_name, vt_id, is_local=True): | def get_vt_tagged_versions(self, host, port, db_name, vt_id): self.server_logger.info("Request: get_vt_tagged_versions(%s,%s,%s,%s)" % \ (host, port, db_name, vt_id)) try: locator = DBLocator(host=host, port=int(port), database=db_name, user=db_read_user, passwd=db_read_pass, obj_id=int(vt_id), obj_type=None, connectio... |
methodBox = self.parent().parent().parent() | methodBox = self.parent().parent().parent().parent() | def updateMethod(self): """ updateMethod() -> None Update the method values to vistrail. We only keep a monotonic version tree of the query pipeline, we can skip the actions here. """ methodBox = self.parent().parent().parent() if methodBox.controller: paramList = [] pipeline = methodBox.controller.current_pipeline f ... |
for module in self.pipeline.module_list: | for module in p.module_list: | def get_wf_vt_zip(self, host, port, db_name, vt_id, version): """get_wf_vt_zip(host:str, port:str, db_name:str, vt_id:str, version:str) -> str Returns a vt file containing the single workflow defined by version encoded as base64 string """ self.server_logger.info("Request: get_wf_vt_zip(%s,%s,%s,%s,%s)"%(host, port, d... |
for connection in self.pipeline.connection_list: | for connection in p.connection_list: | def get_wf_vt_zip(self, host, port, db_name, vt_id, version): """get_wf_vt_zip(host:str, port:str, db_name:str, vt_id:str, version:str) -> str Returns a vt file containing the single workflow defined by version encoded as base64 string """ self.server_logger.info("Request: get_wf_vt_zip(%s,%s,%s,%s,%s)"%(host, port, d... |
if tm_item.center != nm.center: | if tm_item.scenePos().x() != nm.center.x or \ -tm_item.scenePos().y() != nm.center.y: | def setupScene(self, pipeline): """ setupScene(pipeline: Pipeline) -> None Construct the scene to view a pipeline """ old_pipeline = self.pipeline self.pipeline = pipeline |
type(subworkflow[0]) == type and | type(subworkflow[0]) == str and | def auto_add_subworkflow(self, subworkflow): if type(subworkflow) == str: return self.add_subworkflow(subworkflow) elif (type(subworkflow) == tuple and len(subworkflow) == 2 and type(subworkflow[0]) == type and type(subworkflow[1]) == dict): descriptor = self.add_subworkflow(subworkflow[0], **subworkflow[1]) return des... |
s = d.get_port_spec(port.name, PortSpec.port_type_map.inverse[port.type]) | port_type = PortSpec.port_type_map.inverse[port.type] s = reg.get_port_spec_from_descriptor(d, port.name, port_type) | def check_connection_port(port): try: s = d.get_port_spec(port.name, PortSpec.port_type_map.inverse[port.type]) # the old port spec doesn't actually exist for # the invalid module so we cannot compare! # if s <> port.spec: # msg = ("%s connection to port %s has mismatched type" % # (PortSpec.port_type_ma... |
msg = ("%s connection to port %s does not exist." % (PortSpec.port_type_map.inverse[port.type], port.name)) | msg = ("%s connection to port %s of module %s " "does not exist." % \ (PortSpec.port_type_map.inverse[port.type], port.name, invalid_module.name)) | def check_connection_port(port): try: s = d.get_port_spec(port.name, PortSpec.port_type_map.inverse[port.type]) # the old port spec doesn't actually exist for # the invalid module so we cannot compare! # if s <> port.spec: # msg = ("%s connection to port %s has mismatched type" % # (PortSpec.port_type_ma... |
reg_spec = d.get_port_spec(function.name, 'input') | reg_spec = reg.get_port_spec_from_descriptor(d, function.name, 'input') | def check_connection_port(port): try: s = d.get_port_spec(port.name, PortSpec.port_type_map.inverse[port.type]) # the old port spec doesn't actually exist for # the invalid module so we cannot compare! # if s <> port.spec: # msg = ("%s connection to port %s has mismatched type" % # (PortSpec.port_type_ma... |
GIT_REVISION_CMD = '%s log --pretty=format:"%%H" HEAD^..' % GIT_BASE_CMD | GIT_REVISION_CMD = "%s rev-parse HEAD" % GIT_BASE_CMD | pattern = re.compile(r"(^\s*?def vistrails_revision\(\):.*?release = ['\"])([a-fA-F0-9]+?)(['\"].*?return release)", re.DOTALL | re.MULTILINE) |
REVISION = revision_proc.communicate()[0] | REVISION = (revision_proc.communicate()[0]).strip() | def errexit(errcodeobj, showtrace=True, *args): errcode = errcodeobj[0] errmsg = errcodeobj[1] if args: errmsg = errmsg % args if showtrace: errio = StringIO() errio.write(errmsg + "\n") traceio = StringIO() traceback.print_exc(file=traceio) traceio.seek(0) errio.writelines([INDENT + line for line in traceio.readlines(... |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_wf_modules(self, host, port, db_name, vt_id, version): """get_wf_modules(host:str, port:int, db_name:str, vt_id:int, version:int) -> list of dict Returns a list of information about the modules used in a workflow in a list of dictionaries. The dictionary has the following keys: name, package, documentation. """... |
name=filename, user=user, passwd='r3P0:4uTH') | name=filename, user=db_write_user, passwd=db_write_pass) | def add_vt_to_db(self, host, port, db_name, user, vt_filepath, filename, repository_vt_id, repository_creator): """add_vt_to_db(host:str, port:int, db_name:str, user:str, vt_filepath:str, filename:str, repository_vt_id:int, repository_creator:str) -> int This will add a vistrail in vt_filepath to the the database. Befo... |
config['user'] = user config['passwd'] = 'pass' | config['user'] = db_write_user config['passwd'] = db_write_pass | def remove_vt_from_db(self, host, port, db_name, user, vt_id): """remove_vt_from_db(host:str, port:int, db_name:str, user:str, vt_id:int) -> 0 or 1 Remove a vistrail from the repository """ config = {} config['host'] = host config['port'] = int(port) config['db'] = db_name config['user'] = user config['passwd'] = 'pass... |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_runnable_workflows(self, host, port, db_name, vt_id): print "get_runnable_workflows" try: locator = DBLocator(host=host, port=int(port), database=db_name, user='vtserver', passwd='', obj_id=int(vt_id), obj_type=None, connection_id=None) |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_wf_datasets(self, host, port, db_name, vt_id, version): print 'get workflow datasets' self.server_logger.info("Request: get_wf_datasets(%s,%s,%s,%s,%s)"%(host, port, db_name, vt_id, version)) try: locator = DBLocator(host=host, port=int(port), database=db_name, user='vtserver', passwd='', obj_id=int(vt_id), obj... |
user='repository', passwd='r3P0:4uTH', | user=db_write_user, passwd=db_write_pass, | def run_from_db(self, host, port, db_name, vt_id, path_to_figures, version=None, vt_tag='', parameters=''): |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_tag_version(self, host, port, db_name, vt_id, vt_tag): self.server_logger.info("Request: get_tag_version(%s,%s,%s,%s,%s)"%(host, port, db_name, vt_id, vt_tag)) version = -1 try: locator = DBLocator(host=host, port=int(port), database=db_name, user='vtserver', passwd='', obj_id=int(vt_id), obj_type=None, connect... |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_vt_xml(self, host, port, db_name, vt_id): self.server_logger.info("Request: get_vt_xml(%s,%s,%s,%s)"%(host, port, db_name, vt_id)) try: locator = DBLocator(host=host, port=int(port), database=db_name, user='vtserver', passwd='', obj_id=int(vt_id), obj_type=None, connection_id=None) |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_wf_xml(self, host, port, db_name, vt_id, version): self.server_logger.info("Request: get_wf_xml(%s,%s,%s,%s,%s)"%(host, port, db_name, vt_id, version)) try: locator = DBLocator(host=host, port=int(port), database=db_name, user='vtserver', passwd='', obj_id=int(vt_id), obj_type=None, connection_id=None) |
def getPDFWorkflow(self, m_id): self.server_logger.info( "getPDFWorkflow(%s) request received"%m_id) print "getPDFWorkflow(%s) request received"%m_id try: m_id = int(m_id) medley = self.medley_objs[m_id] except Exception, e: print str(e) try: locator = DBLocator(host=db_host, port=3306, database='vistrails', user='vts... | def get_wf_xml(self, host, port, db_name, vt_id, version): self.server_logger.info("Request: get_wf_xml(%s,%s,%s,%s,%s)"%(host, port, db_name, vt_id, version)) try: locator = DBLocator(host=host, port=int(port), database=db_name, user='vtserver', passwd='', obj_id=int(vt_id), obj_type=None, connection_id=None) | |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_vt_zip(self, host, port, db_name, vt_id): """get_vt_zip(host:str, port: str, db_name: str, vt_id:str) -> str Returns a .vt file encoded as base64 string """ self.server_logger.info("Request: get_vt_zip(%s,%s,%s,%s)"%(host, port, db_name, vt_id)) try: locator = DBLocator(host=host, port=int(port), database=db_n... |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_wf_vt_zip(self, host, port, db_name, vt_id, version): """get_wf_vt_zip(host:str, port:str, db_name:str, vt_id:str, version:str) -> str Returns a vt file containing the single workflow defined by version encoded as base64 string """ self.server_logger.info("Request: get_wf_vt_zip(%s,%s,%s,%s,%s)"%(host, port, d... |
config['user'] = 'vtserver' config['passwd'] = '' | config['user'] = db_read_user config['passwd'] = db_read_pass | def get_db_vt_list(self, host, port, db_name): self.server_logger.info("Request: get_db_vistrail_list(%s,%s,%s)"%(host, port, db_name)) config = {} config['host'] = host config['port'] = int(port) config['db'] = db_name config['user'] = 'vtserver' config['passwd'] = '' try: rows = io.get_db_vistrail_list(config) return... |
config['user'] = 'vtserver' config['passwd'] = '' | config['user'] = db_read_user config['passwd'] = db_read_pass | def get_db_vt_list_xml(self, host, port, db_name): self.server_logger.info("Request: get_db_vistrail_list(%s,%s,%s)"%(host, port, db_name)) config = {} config['host'] = host config['port'] = int(port) config['db'] = db_name config['user'] = 'vtserver' config['passwd'] = '' try: rows = io.get_db_vistrail_list(config) re... |
user='vtserver', passwd='', | user=db_read_user, passwd=db_read_pass, | def get_vt_tagged_versions(self, host, port, db_name, vt_id): self.server_logger.info("Request: get_vt_tagged_versions(%s,%s,%s,%s)"%(host, port, db_name, vt_id)) try: locator = DBLocator(host=host, port=int(port), database=db_name, user='vtserver', passwd='', obj_id=int(vt_id), obj_type=None, connection_id=None) |
self.perm_view.setEnabled(False) self.perm_edit.setEnabled(False) self.perm_download.setEnabled(False) | self._default_perm_label.setText("Default Global Permissions " "(only applicable to branching):") | def check_dependencies(self): """ determines if current VisTrail will be supported by the repository's VisTrail server """ |
def push_vistrail_to_repository(self): | def push_vistrail_to_repository(self, branching=False): | def push_vistrail_to_repository(self): """ uploads current VisTrail to web repository """ |
'repository_vt_id': repository_vt_id, | 'repository_vt_id': repository_vt_id if not branching else -1, | def push_vistrail_to_repository(self): """ uploads current VisTrail to web repository """ |
""" | controller.recompute_terse_graph() controller.invalidate_version_tree() | def push_vistrail_to_repository(self): """ uploads current VisTrail to web repository """ |
""" | def push_vistrail_to_repository(self): """ uploads current VisTrail to web repository """ | |
self.dialog.cookiejar = cookielib.CookieJar() | self.dialog.cookiejar = cookielib.CookieJar() self.dialog.cookie_url = self.config.webRepositoryURL | def clicked_on_login(self): """ Attempts to log into web repository stores auth cookie for session """ from gui.application import VistrailsApplication |
self._push_tab = self.create_push_tab() | def __init__(self, parent): QtGui.QDialog.__init__(self, parent) self._status_bar = QtGui.QStatusBar(self) self.setWindowTitle('Web Repository Options') layout = QtGui.QHBoxLayout(self) layout.setMargin(0) layout.setSpacing(0) self.setLayout(layout) | |
def handle_missing_module(m_name, m_namespace): | def handle_missing_module(*args, **kwargs): | def handle_missing_module(m_name, m_namespace): global webServicesmodulesDict def get_wsdl_from_namespace(m_namespace): try: wsdl = m_namespace.split("|") return wsdl[0] except: print "invalid namespace" return None wsdl = get_wsdl_from_namespace(m_namespace) if wsdl: outdated_list = [] updated_list = [] error_list = ... |
m = pipeline.modules[m_id] m_namespace = m.namespace | def get_wsdl_from_namespace(m_namespace): try: wsdl = m_namespace.split("|") return wsdl[0] except: print "invalid namespace" return None | |
if not cellWidget.label.hasScaledContents(): | if (not cellWidget.label.hasScaledContents() and not cellWidget._playing): | def updateStatus(self, info): """ updateStatus(info: tuple) -> None Updates the status of the button based on the input info """ (sheet, row, col, cellWidget) = info if cellWidget: if not cellWidget.label.hasScaledContents(): self.setEnabled(True) originalWidth = cellWidget.originalPix.width() self.setValue(cellWidget... |
self.flush_move_actions() | self.flush_delayed_actions() | def create_group(self, module_ids, connection_ids): self.flush_move_actions() (group, connections) = \ BaseController.create_group(self, self.current_pipeline, module_ids, connection_ids) op_list = [] op_list.extend(('delete', self.current_pipeline.connections[c_id]) for c_id in connection_ids) op_list.extend(('delete'... |
self.flush_move_actions() | self.flush_delayed_actions() | def create_abstraction(self, module_ids, connection_ids, name): self.flush_move_actions() (abstraction, connections) = \ BaseController.create_abstraction(self, self.current_pipeline, module_ids, connection_ids, name) op_list = [] op_list.extend(('delete', self.current_pipeline.connections[c_id]) for c_id in connection... |
self.flush_move_actions() | self.flush_delayed_actions() | def create_abstraction_from_group(self, group_id, name=""): self.flush_move_actions() name = self.get_abstraction_name(name) (abstraction, connections) = \ BaseController.create_abstraction_from_group(self, self.current_pipeline, group_id, name) |
self.flush_move_actions() | self.flush_delayed_actions() | def ungroup_set(self, module_ids): self.flush_move_actions() for m_id in module_ids: self.create_ungroup(m_id) |
self.flush_move_actions() | self.flush_delayed_actions() | def update_notes(self, notes): """ Parameters ---------- |
self.flush_move_actions() | self.flush_delayed_actions() | def execute_current_workflow(self, custom_aliases=None): """ execute_current_workflow() -> None Execute the current workflow (if exists) """ self.flush_move_actions() if self.current_pipeline: locator = self.get_locator() if locator: locator.clean_temporaries() locator.save_temporary(self.vistrail) self.execute_workfl... |
self.flush_move_actions() | self.flush_delayed_actions() | def update_current_tag(self,tag): """ update_current_tag(tag: str) -> Bool Update the current vistrail tag and return success predicate """ self.flush_move_actions() try: if self.vistrail.hasTag(self.current_version): self.vistrail.changeTag(tag, self.current_version) else: self.vistrail.addTag(tag, self.current_versi... |
self.flush_move_actions() | self.flush_delayed_actions() | def copy_modules_and_connections(self, module_ids, connection_ids): """copy_modules_and_connections(module_ids: [long], connection_ids: [long]) -> str Serializes a list of modules and connections """ self.flush_move_actions() |
self.flush_move_actions() | self.flush_delayed_actions() | def paste_modules_and_connections(self, str, center): """ paste_modules_and_connections(str, center: (float, float)) -> [id list] Paste a list of modules and connections into the current pipeline. |
if op.vtType == 'add': f(op.data, op.parentObjId, op.parentObjType) elif op.vtType == 'delete': f(op.objectId, op.parentObjId, op.parentObjType) elif op.vtType == 'change': f(op.oldObjId, op.data, op.parentObjId, op.parentObjType) | def perform_operation(self, op): # print "doing %s %s %s" % (op.id, op.vtType, op.what) if op.db_what == 'abstraction' or op.db_what == 'group': what = 'module' else: what = op.db_what funname = '%s_%s' % (op.vtType, what) | |
if op.vtType == 'add': f(op.data, op.parentObjType, op.parentObjId) elif op.vtType == 'delete': f(op.objectId, op.what, op.parentObjType, op.parentObjId) elif op.vtType == 'change': f(op.oldObjId, op.data, op.parentObjType, op.parentObjId) | def perform_operation(self, op): # print "doing %s %s %s" % (op.id, op.vtType, op.what) if op.db_what == 'abstraction' or op.db_what == 'group': what = 'module' else: what = op.db_what funname = '%s_%s' % (op.vtType, what) | |
msg = "Pipeline cannot execute '%s' operation" % op.vtType | msg = "Pipeline cannot execute '%s %s' operation" % \ (op.vtType, op.what) | def perform_operation(self, op): # print "doing %s %s %s" % (op.id, op.vtType, op.what) if op.db_what == 'abstraction' or op.db_what == 'group': what = 'module' else: what = op.db_what funname = '%s_%s' % (op.vtType, what) |
raise VistrailsInternalError("duplicate module id") | raise VistrailsInternalError("duplicate module id: %d" % m.id ) | def add_module(self, m, *args): """add_module(m: Module) -> None Add new module to pipeline """ if self.has_module_with_id(m.id): raise VistrailsInternalError("duplicate module id") |
def add_parameter(self, param, parent_id, parent_type=ModuleFunction.vtType): | def add_parameter(self, param, parent_type, parent_id): | def add_parameter(self, param, parent_id, parent_type=ModuleFunction.vtType): self.db_add_object(param, parent_type, parent_id) if not self.has_alias(param.alias): self.change_alias(param.alias, param.vtType, param.real_id, parent_type, parent_id, None) |
def delete_parameter(self, param_id, parent_id, parent_type=ModuleFunction.vtType): | def delete_parameter(self, param_id, param_type, parent_type, parent_id): | def delete_parameter(self, param_id, parent_id, parent_type=ModuleFunction.vtType): self.db_delete_object(param_id, ModuleParam.vtType, parent_type, parent_id) self.remove_alias(ModuleParam.vtType, param_id, parent_type, parent_id, None) |
self.remove_alias(ModuleParam.vtType, param_id, parent_type, parent_id, None) def change_parameter(self, old_param_id, param, parent_id, parent_type=ModuleFunction.vtType): | self.remove_alias(ModuleParam.vtType, param_id, parent_type, parent_id, None) def change_parameter(self, old_param_id, param, parent_type, parent_id): | def delete_parameter(self, param_id, parent_id, parent_type=ModuleFunction.vtType): self.db_delete_object(param_id, ModuleParam.vtType, parent_type, parent_id) self.remove_alias(ModuleParam.vtType, param_id, parent_type, parent_id, None) |
def add_port(self, port, parent_id, parent_type=Connection.vtType): | def add_port(self, port, parent_type, parent_id): | def add_port(self, port, parent_id, parent_type=Connection.vtType): self.db_add_object(port, parent_type, parent_id) connection = self.connections[parent_id] if connection.source is not None and \ connection.destination is not None: self.graph.add_edge(connection.sourceId, connection.destinationId, connection.id) |
def delete_port(self, port_id, parent_id, parent_type=Connection.vtType): | def delete_port(self, port_id, port_type, parent_type, parent_id): | def delete_port(self, port_id, parent_id, parent_type=Connection.vtType): connection = self.connections[parent_id] if len(connection.ports) >= 2: self.graph.delete_edge(connection.sourceId, connection.destinationId, connection.id) self.db_delete_object(port_id, Port.vtType, parent_type, parent_id) |
def change_port(self, old_port_id, port, parent_id, parent_type=Connection.vtType): | def change_port(self, old_port_id, port, parent_type, parent_id): | def change_port(self, old_port_id, port, parent_id, parent_type=Connection.vtType): connection = self.connections[parent_id] if len(connection.ports) >= 2: source_list = self.graph.adjacency_list[connection.sourceId] source_list.remove((connection.destinationId, connection.id)) dest_list = \ self.graph.inverse_adjacenc... |
def add_portSpec(self, port_spec, parent_id, parent_type=Module.vtType): | def add_portSpec(self, port_spec, parent_type, parent_id): | def add_portSpec(self, port_spec, parent_id, parent_type=Module.vtType): # self.db_add_object(port_spec, parent_type, parent_id) self.add_port_to_registry(port_spec, parent_id) |
def delete_portSpec(self, spec_id, parent_id, parent_type=Module.vtType): | def delete_portSpec(self, spec_id, portSpec_type, parent_type, parent_id): | def delete_portSpec(self, spec_id, parent_id, parent_type=Module.vtType): self.delete_port_from_registry(spec_id, parent_id) # self.db_delete_object(spec_id, PortSpec.vtType, parent_type, parent_id) |
def change_portSpec(self, old_spec_id, port_spec, parent_id, parent_type=Module.vtType): | def change_portSpec(self, old_spec_id, port_spec, parent_type, parent_id): | def change_portSpec(self, old_spec_id, port_spec, parent_id, parent_type=Module.vtType): self.delete_port_from_registry(old_spec_id, parent_id) # self.db_change_object(old_spec_id, port_spec, parent_type, parent_id) self.add_port_to_registry(port_spec, parent_id) |
striplen = len("<paramexps>") xmlString = xmlString[striplen:-(striplen+1)].strip() self.setParameterExploration(xmlString) | if xmlString is not None: striplen = len("<paramexps>") xmlString = xmlString[striplen:-(striplen+1)].strip() self.setParameterExploration(xmlString) | def showEvent(self, event): """ showEvent(event: QShowEvent) -> None Update the tab when it is shown """ if self.currentVersion!=self.controller.current_version: self.currentVersion = self.controller.current_version # Update the virtual cell pipeline = self.controller.current_pipeline self.virtualCell.updateVirtualCel... |
cmdline = ['unzip', '-q','-o','-d', vt_save_dir, shell_quote(filename)] | cmdline = ['unzip', '-q','-o','-d', vt_save_dir, mkarg(filename).strip()] | def open_vistrail_bundle_from_zip_xml(filename): """open_vistrail_bundle_from_zip_xml(filename) -> SaveBundle Open a vistrail from a zip compressed format. It expects that the vistrail file inside archive has name 'vistrail', the log inside archive has name 'log', abstractions inside archive have prefix 'abstraction_',... |
def create_action_from_ops(ops): | def create_action_from_ops(ops, simplify=False): | def create_action_from_ops(ops): if len(ops) > 0: from core.vistrail.action import Action action = db.services.action.create_action_from_ops(ops) Action.convert(action) return action return None |
action = db.services.action.create_action_from_ops(ops) | action = db.services.action.create_action_from_ops(ops, simplify) | def create_action_from_ops(ops): if len(ops) > 0: from core.vistrail.action import Action action = db.services.action.create_action_from_ops(ops) Action.convert(action) return action return None |
self.server_logger.debug(4) | def get_vt_graph_png(self, host, port, db_name, vt_id): """get_vt_graph_png(host:str, port: str, db_name: str, vt_id:str) -> str Returns the relative url of the generated image """ | |
except ImportError, e: self._init_module = self._module | def initialize(self, existing_paths=None): self._override_import(existing_paths) try: try: name = self.prefix + self.codepath + '.init' __import__(name, globals(), locals(), []) self._init_module = sys.modules[name] self._imported_paths.add(name) # Copy attributes (shallow) from _module into _init_module's namespace an... | |
self.display(RichTextCellWidget, (fileValue,)) | self.cellWidget = self.displayAndWait(RichTextCellWidget, (fileValue,)) | def compute(self): """ compute() -> None Dispatch the HTML contents to the spreadsheet """ if self.hasInputFromPort("File"): fileValue = self.getInputFromPort("File") else: fileValue = None self.display(RichTextCellWidget, (fileValue,)) |
if m1.db_tag != m2.db_tag: return True | def module_text_has_changed(self, m1, m2): # 2008-06-25 cscheid # This is a hot-path for QPipelineView.setupScene, so we cut # some corners # # 2008-07-08 cscheid # Can't use direct __dict__ lookup because both groups and # modules end up here. if m1.db_tag != m2.db_tag: return True m1_has = '__desc__' in m1.db_annotat... | |
if (m1_has != '__desc__' in m2.db_annotations_key_index): | if m1_has != ('__desc__' in m2.db_annotations_key_index): | def module_text_has_changed(self, m1, m2): # 2008-06-25 cscheid # This is a hot-path for QPipelineView.setupScene, so we cut # some corners # # 2008-07-08 cscheid # Can't use direct __dict__ lookup because both groups and # modules end up here. if m1.db_tag != m2.db_tag: return True m1_has = '__desc__' in m1.db_annotat... |
print str(e) | debug.critical(str(e)) | def check_user_projects(self): # are we logged in? if not self.dialog.cookiejar: self._repository_status['support_status'] = "Please login" self._repository_status['details'] = "" self.update_push_information() self._push_button.setEnabled(False) self._branch_button.hide() else: server_url = "%s/projects/get_user_proje... |
self.serverCombo.addItem("%s (%s)" % (prj, srvr), srvr) | self.serverCombo.addItem("%s (%s)" % (prj, srvr), [prj, srvr]) | def check_user_projects(self): # are we logged in? if not self.dialog.cookiejar: self._repository_status['support_status'] = "Please login" self._repository_status['details'] = "" self.update_push_information() self._push_button.setEnabled(False) self._branch_button.hide() else: server_url = "%s/projects/get_user_proje... |
server = self.serverCombo.itemData(index).toString() | server = self.serverCombo.itemData(index).toList()[1].toString() | def check_dependencies(self, index): """ determines if current VisTrail will be supported by the repository's VisTrail server """ |
print str(e) | debug.critical(str(e)) | def check_dependencies(self, index): """ determines if current VisTrail will be supported by the repository's VisTrail server """ |
server_packages = get_supported_packages.read().split("||") | server_packages = json.loads(get_supported_packages.read()) | def check_dependencies(self, index): """ determines if current VisTrail will be supported by the repository's VisTrail server """ |
print "the vistrail has been deleted or doesn't exist" | def check_dependencies(self, index): """ determines if current VisTrail will be supported by the repository's VisTrail server """ | |
project = self.serverCombo.itemData(self.serverCombo.currentIndex()).toList()[0].toString() if project == "Default": project = "" | def push_vistrail_to_repository(self, branching=False): """ uploads current VisTrail to web repository """ | |
print "before check" | def push_vistrail_to_repository(self, branching=False): """ uploads current VisTrail to web repository """ | |
print "getting version from web" | debug.log("getting version from web") | def push_vistrail_to_repository(self, branching=False): """ uploads current VisTrail to web repository """ |
print e | debug.critical(str(e)) | def push_vistrail_to_repository(self, branching=False): """ uploads current VisTrail to web repository """ |
print "repo login is %s" % self.config.webRepositoryLogin | def __init__(self, parent, status_bar, dialog): QtGui.QWidget.__init__(self, parent) self._status_bar = status_bar self.dialog = dialog | |
print self.saveLogin.checkState() | print "save login state: ", self.saveLogin.checkState() | def clicked_on_login(self): """ Attempts to log into web repository stores auth cookie for session """ from gui.application import VistrailsApplication |
print "settings repo login" | print "setting repo login" | def clicked_on_login(self): """ Attempts to log into web repository stores auth cookie for session """ from gui.application import VistrailsApplication |
debug.critical("Couldn't start the instance on display: %s port: %s" % (virtual_display, port) | debug.critical("Couldn't start the instance on display: %s port: %s" % (virtual_display, port)) | def start_other_instances(self, number): self.others = [] host = self.temp_xml_rpc_options.server port = self.temp_xml_rpc_options.port virtual_display = 5 script = '/server/vistrails/trunk/scripts/start_vistrails_xvfb.sh' for x in xrange(number): port += 1 virtual_display += 1 args = [script,":%s"%virtual_display,host... |
try: self.updateFunctionPort() except ModuleError, e: raise ModuleErrors([e, ModuleError(self, "Error inside map: " + e.msg)]) | self.updateFunctionPort() | def compute(self): """The compute method for the Fold.""" |
'int' : core.modules.basic_modules.Integer, 'short' : core.modules.basic_modules.Integer, 'byte' : core.modules.basic_modules.Integer, 'nonNegativeInteger' : core.modules.basic_modules.Integer, 'long' : core.modules.basic_modules.Integer, 'unsignedLong' : core.modules.basic_modules.Integer, | def addPortsToMethods(w): """ Add input and output ports to the VisTrails complex type modules. """ reg = core.modules.module_registry.get_module_registry() dictkey = w + "|Methods" complexsdict = webServicesmodulesDict[dictkey] keys = complexsdict.keys() for dictkey in keys: obj = complexsdict[dictkey] objtype = reg.... | |
'IDREFS': core.modules.basic_modules.String, 'ID': core.modules.basic_modules.String, | def addPortsToMethods(w): """ Add input and output ports to the VisTrails complex type modules. """ reg = core.modules.module_registry.get_module_registry() dictkey = w + "|Methods" complexsdict = webServicesmodulesDict[dictkey] keys = complexsdict.keys() for dictkey in keys: obj = complexsdict[dictkey] objtype = reg.... | |
'DBAction': {'annotations': update_annotations}} | 'DBAction': {'annotations': update_annotations}, 'DBParameter': {'type': update_type}, } | def update_workflow(old_obj, translate_dict): return DBWorkflow.update_version(old_obj.db_workflow, translate_dict) |
module_version = module.version.split('.') | def find_descriptors(pipeline, module_ids=None): registry = get_module_registry() conf = get_vistrails_configuration() if module_ids == None: module_ids = pipeline.modules.iterkeys() exceptions = set() for mid in module_ids: module = pipeline.modules[mid] try: descriptor = registry.get_similar_descriptor( module.packag... | |
if pkg_version < module_version: | if versions_increasing(pkg_version, module_version): | def find_descriptors(pipeline, module_ids=None): registry = get_module_registry() conf = get_vistrails_configuration() if module_ids == None: module_ids = pipeline.modules.iterkeys() exceptions = set() for mid in module_ids: module = pipeline.modules[mid] try: descriptor = registry.get_similar_descriptor( module.packag... |
if pkg_version > module_version: | elif versions_increasing(module_version, pkg_version): | def find_descriptors(pipeline, module_ids=None): registry = get_module_registry() conf = get_vistrails_configuration() if module_ids == None: module_ids = pipeline.modules.iterkeys() exceptions = set() for mid in module_ids: module = pipeline.modules[mid] try: descriptor = registry.get_similar_descriptor( module.packag... |
new_version = \ | (new_version, new_pipeline) = \ | def add_abstraction_to_registry(self, abs_vistrail, abs_fname, name, namespace=None, module_version=None, is_global=True, avail_fnames=[]): reg = core.modules.module_registry.get_module_registry() if namespace is None: namespace = \ abs_vistrail.get_annotation('__abstraction_uuid__').value |
new_version) | new_version, new_pipeline) | def add_abstraction_to_registry(self, abs_vistrail, abs_fname, name, namespace=None, module_version=None, is_global=True, avail_fnames=[]): reg = core.modules.module_registry.get_module_registry() if namespace is None: namespace = \ abs_vistrail.get_annotation('__abstraction_uuid__').value |
migrate_tags = get_vistrails_configuration().check("migrateTags") | should_migrate_tags = get_vistrails_configuration().check("migrateTags") | def flush_delayed_actions(self): start_version = self.current_version desc_key = Action.ANNOTATION_DESCRIPTION added_upgrade = False migrate_tags = get_vistrails_configuration().check("migrateTags") for action in self._delayed_actions: self.vistrail.add_action(action, start_version, self.current_session) # HACK to popu... |
if migrate_tags: tag = self.vistrail.get_tag(start_version) if tag: self.vistrail.set_tag(start_version, "") self.vistrail.set_tag(action.id, tag) notes = self.vistrail.get_notes(start_version) if notes: self.vistrail.set_notes(start_version, "") self.vistrail.set_notes(action.id, notes) | if should_migrate_tags: self.migrate_tags(start_version, action.id) | def flush_delayed_actions(self): start_version = self.current_version desc_key = Action.ANNOTATION_DESCRIPTION added_upgrade = False migrate_tags = get_vistrails_configuration().check("migrateTags") for action in self._delayed_actions: self.vistrail.add_action(action, start_version, self.current_session) # HACK to popu... |
ops.append(('add', new_module)) | def replace_generic(controller, pipeline, old_module, new_module, function_remap={}, src_port_remap={}, dst_port_remap={}, annotation_remap={}): ops = [] ops.extend(controller.delete_module_list_ops(pipeline, [old_module.id])) ops.append(('add', new_module)) for annotation in old_module.annotations: if annotation.key ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.