Ejemplo n.º 1
0
 def __init__(self):
     Operation.__init__(self, {
         "req": Request,
         "username": str,
         "password": str
     },
                        accept_anonymous_user=True)
Ejemplo n.º 2
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review": Review,
             "new_upstream": Optional(str),
             "branch": Optional(str)
         })
Ejemplo n.º 3
0
 def __init__(self):
     Operation.__init__(self, { "review_id": int,
                                "filters": [{ "type": set(["reviewer", "watcher"]),
                                              "user_names": Optional([str]),
                                              "user_ids": Optional([int]),
                                              "paths": Optional([str]),
                                              "file_ids": Optional([int]) }] })
Ejemplo n.º 4
0
 def __init__(self):
     Operation.__init__(self, { "filter_type": set(["reviewer", "watcher", "ignored"]),
                                "path": str,
                                "delegates": [str],
                                "repository_id": Optional(int),
                                "repository_name": Optional(str),
                                "replaced_filter_id": Optional(int) })
Ejemplo n.º 5
0
 def __init__(self, perform):
     Operation.__init__(self, {
         "author_name": str,
         "extension_name": str,
         "version": Optional(str)
     })
     self.perform = perform
Ejemplo n.º 6
0
 def __init__(self):
     Operation.__init__(self, { "repository_id": int,
                                "source_location": str,
                                "source_name": str,
                                "target_name": str,
                                "users": [str],
                                "forced": Optional(bool) })
Ejemplo n.º 7
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review":
             Review,
             "chain_type":
             set(["issue", "note"]),
             "commit_context":
             Optional({
                 "commit": Commit,
                 "offset": NonNegativeInteger,
                 "count": PositiveInteger
             }),
             "file_context":
             Optional({
                 "origin": set(["old", "new"]),
                 "parent": Optional(Commit),
                 "child": Commit,
                 "file": File,
                 "offset": PositiveInteger,
                 "count": PositiveInteger
             }),
             "text":
             str
         })
Ejemplo n.º 8
0
    def __init__(self, param_dict):
        Operation.__init__(self)
        self.original = param_dict

        observation = param_dict['observation']
        x, y = observation.split("d")
        y = y.lstrip("0")
        self.observation_degree = int(x)
        self.observation_minute = float(y)

        if "height" in param_dict:
            self.height = float(param_dict['height'])
        else:
            self.height = self.DEFAULT_HEIGHT

        if "pressure" in param_dict:
            self.pressure = int(param_dict['pressure'])
        else:
            self.pressure = self.DEFAULT_PRESSURE

        if "temperature" in param_dict:
            self.temperature = int(param_dict['temperature'])
        else:
            self.temperature = self.DEFAULT_TEMP

        if "horizon" in param_dict:
            self.horizon = param_dict['horizon']
        else:
            self.horizon = self.DEFAULT_HORIZON
Ejemplo n.º 9
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review_id":
             int,
             "chain_type":
             set(["issue", "note"]),
             "commit_context":
             Optional({
                 "commit_id": int,
                 "offset": int,
                 "count": int
             }),
             "file_context":
             Optional({
                 "origin": set(["old", "new"]),
                 "parent_id": Optional(int),
                 "child_id": int,
                 "file_id": int,
                 "old_sha1": Optional(str),
                 "new_sha1": Optional(str),
                 "offset": int,
                 "count": int
             }),
             "text":
             str
         })
Ejemplo n.º 10
0
 def __init__(self):
     Operation.__init__(self, { "repository_id": int,
                                "path": str,
                                "sha1": str,
                                "ranges": [{ "offset": int,
                                             "count": int,
                                             "context": bool }],
                                "tabify": bool })
Ejemplo n.º 11
0
 def __init__(self):
     Operation.__init__(self, { "review": Review,
                                "origin": set(["old", "new"]),
                                "parent": Optional(Commit),
                                "child": Commit,
                                "file": File,
                                "offset": PositiveInteger,
                                "count": PositiveInteger })
Ejemplo n.º 12
0
 def __init__(self):
     Operation.__init__(self, { "repository_id": int,
                                "commit_ids": [int],
                                "reviewfilters": [{ "username": str,
                                                    "type": set(["reviewer", "watcher"]),
                                                    "path": str }],
                                "applyfilters": bool,
                                "applyparentfilters": bool })
Ejemplo n.º 13
0
 def __init__(self):
     Operation.__init__(self, {
         "repository_name": str,
         "remote": str,
         "branch": str,
         "upstream": Optional(str)
     },
                        accept_anonymous_user=True)
Ejemplo n.º 14
0
 def __init__(self):
     Operation.__init__(self, { "review_id": int,
                                "origin": set(["old", "new"]),
                                "parent_id": int,
                                "child_id": int,
                                "file_id": int,
                                "offset": int,
                                "count": int })
Ejemplo n.º 15
0
 def __init__(self):
     Operation.__init__(self, { "repository_id": int,
                                "changeset_id": int,
                                "files": [{ "id": int,
                                            "blocks": [{ "first": int,
                                                         "last": int }]
                                            }]
                                })
Ejemplo n.º 16
0
 def __init__(self, parent, main_window, params={}):
     Operation.__init__(self, params)
     global main
     main = main_window
     self.set_as_path_only()
     self.__init_ctrls(parent)
     self.__init_sizer(parent)
     self.update_parameters(self.directoryToolsPanel.params)
Ejemplo n.º 17
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review_id": int,
             "reviewed": bool,
             "changeset_ids": [int],
             "file_ids": [int]
         })
Ejemplo n.º 18
0
 def __init__(self):
     Operation.__init__(self, {
         "req": Request,
         "fields": {
             str: str
         }
     },
                        accept_anonymous_user=True)
Ejemplo n.º 19
0
 def __init__(self, parent, main_window, params={}):
     Operation.__init__(self, params)
     global main
     main = main_window
     self.set_as_path_only()
     self.__init_ctrls(parent)
     self.__init_sizer(parent)
     self.update_parameters(self.directoryToolsPanel.params)
Ejemplo n.º 20
0
 def __init__(self):
     Operation.__init__(self, { "subject": typechecker.User,
                                "extension": typechecker.Extension,
                                "repository": typechecker.Repository,
                                "filterhook_name": str,
                                "path": str,
                                "data": Optional(str),
                                "replaced_filter_id": Optional(int) })
Ejemplo n.º 21
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review_id": int,
             "new_summary": Optional(str),
             "new_description": Optional(str),
             "new_owners": Optional([str])
         })
Ejemplo n.º 22
0
    def __init__(self,core,design,type):
        Operation.__init__(self,core)

        self.type = type

        self.design = self.core.session.query(Design).filter(Design.name==design).one_or_none()

        if self.design is None:
            raise ValueError("No design named %s"%design)
Ejemplo n.º 23
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review_id": int,
             "new_head_sha1": str,
             "new_upstream_sha1": Optional(str),
             "branch": Optional(str),
             "new_trackedbranch": Optional(str)
         })
Ejemplo n.º 24
0
 def __init__(self):
     Operation.__init__(
         self, {
             "repository_id": int,
             "source_location": str,
             "source_name": str,
             "target_name": str,
             "users": [str]
         })
Ejemplo n.º 25
0
    def __init__(self, param_dict):
        Operation.__init__(self)
        self.original = param_dict

        self.lat = param_dict['lat']
        self.longitude = param_dict['long']
        self.altitude = param_dict['altitude']
        self.assumed_lat = param_dict['assumedLat']
        self.assumed_long = param_dict['assumedLong']
Ejemplo n.º 26
0
 def __init__(self, parent, main_window, params={}):
     Operation.__init__(self, params)
     global main
     main = main_window
     self.__init_ctrls(parent)
     self.__init_sizer()
     self.activate_options(0)
     self.moveRE = False
     self.regExpPanel.activatedField = self.replMoveTextValue
Ejemplo n.º 27
0
 def __init__(self, parent, main_window, params={}):
     Operation.__init__(self, params)
     global main
     main = main_window
     self.__init_ctrls(parent)
     self.__init_sizer()
     self.activate_options(0)
     self.moveRE = False
     self.regExpPanel.activatedField = self.replMoveTextValue
Ejemplo n.º 28
0
 def __init__(self):
     Operation.__init__(
         self,
         {
             "single": Optional({"repository_name": str, "path": str}),
             "multiple": Optional([int]),
             "user_id": Optional(int),
         },
     )
Ejemplo n.º 29
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review_id": int,
             "file_id": int,
             "sha1": str,
             "offset": int,
             "count": int
         })
Ejemplo n.º 30
0
 def __init__(self):
     Operation.__init__(
         self, {
             "filter_type": set(["reviewer", "watcher", "ignored"]),
             "path": str,
             "delegates": [str],
             "repository_id": Optional(int),
             "repository_name": Optional(str),
             "replaced_filter_id": Optional(int)
         })
Ejemplo n.º 31
0
 def __init__(self):
     Operation.__init__(
         self, {
             "name": str,
             "path": str,
             "remote": Optional({
                 "url": str,
                 "branch": str
             })
         })
Ejemplo n.º 32
0
 def __init__(self):
     Operation.__init__(
         self, {
             "single": Optional({
                 "repository_name": str,
                 "path": str
             }),
             "multiple": Optional([int]),
             "user_id": Optional(int)
         })
Ejemplo n.º 33
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review_id": int,
             "what": {
                 "approval": bool,
                 "comments": bool,
                 "metacomments": bool
             }
         })
Ejemplo n.º 34
0
    def __init__(self,core, directory, data='data.csv', experimentalDesign='meta.csv',**kwargs):
        Operation.__init__(self, core)

        while directory[-1] == '/':
            directory = directory[:-1]
        self.directory = directory

        _,self.name = os.path.split(self.directory)

        self.datafile = data
        self.metafile = experimentalDesign
Ejemplo n.º 35
0
 def __init__(self):
     Operation.__init__(
         self, {
             "subject": typechecker.User,
             "extension": typechecker.Extension,
             "repository": typechecker.Repository,
             "filterhook_name": str,
             "path": str,
             "data": Optional(str),
             "replaced_filter_id": Optional(int)
         })
Ejemplo n.º 36
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review_id": int,
             "origin": set(["old", "new"]),
             "parent_id": int,
             "child_id": int,
             "file_id": int,
             "offset": int,
             "count": int
         })
Ejemplo n.º 37
0
 def __init__(self):
     Operation.__init__(self)#ירושה Operation
     Operation.__new__(self)
     
     while True:#בדיקת קלט yes or no 
       self.to_open = input("\n\nDo you want to overwrite the content or add characters to file ?\nyes = add characters\nno = overwrite\n\n").lower()
       if self.to_open == 'yes':
             self.run_yes()
       elif self.to_open == 'no':
             self.run_no()
       else:
             print(" Please enter only yes or no\n")
Ejemplo n.º 38
0
 def __init__(self):
     Operation.__init__(
         self,
         {
             "repository_id": int,
             "path": str,
             "sha1": str,
             "ranges": [{"offset": int, "count": int, "context": bool}],
             "tabify": bool,
         },
         accept_anonymous_user=True,
     )
Ejemplo n.º 39
0
 def __init__(self):
     Operation.__init__(
         self, {
             "review_id":
             int,
             "filters": [{
                 "type": set(["reviewer", "watcher"]),
                 "user_names": Optional([str]),
                 "user_ids": Optional([int]),
                 "paths": Optional([str]),
                 "file_ids": Optional([int])
             }]
         })
Ejemplo n.º 40
0
 def __init__(self):
     Operation.__init__(self, { "review": Review,
                                "chain_type": set(["issue", "note"]),
                                "commit_context": Optional({ "commit": Commit,
                                                             "offset": NonNegativeInteger,
                                                             "count": PositiveInteger }),
                                "file_context": Optional({ "origin": set(["old", "new"]),
                                                           "parent": Optional(Commit),
                                                           "child": Commit,
                                                           "file": File,
                                                           "offset": PositiveInteger,
                                                           "count": PositiveInteger }),
                                "text": str })
Ejemplo n.º 41
0
 def __init__(self):
     Operation.__init__(
         self, {
             "repository_id": int,
             "path": str,
             "sha1": str,
             "ranges": [{
                 "offset": int,
                 "count": int,
                 "context": bool
             }],
             "tabify": bool
         },
         accept_anonymous_user=True)
Ejemplo n.º 42
0
 def __init__(self):
     Operation.__init__(self, { "review_id": int,
                                "chain_type": set(["issue", "note"]),
                                "commit_context": Optional({ "commit_id": int,
                                                             "offset": int,
                                                             "count": int }),
                                "file_context": Optional({ "origin": set(["old", "new"]),
                                                           "parent_id": Optional(int),
                                                           "child_id": int,
                                                           "file_id": int,
                                                           "old_sha1": Optional(str),
                                                           "new_sha1": Optional(str),
                                                           "offset": int,
                                                           "count": int }),
                                "text": str })
Ejemplo n.º 43
0
    def __init__(self, parent, main_panel, params={}):
        Operation.__init__(self, params)
        global main
        main = main_panel
        self.__init_ctrls(parent)

        # place these here for boa compatibility
        self.case_operation_value.Bind(wx.EVT_CHOICE, self.create_operation,
                                       id=wxID_PANELCASE_OPERATION_VALUE)
        self.other_operation_value.Bind(wx.EVT_CHOICE, self.create_operation,
                                        id=wxID_PANELOTHER_OPERATION_VALUE)
        self.search = search.Panel(self, main, _(u"Search for what to modify, by:"))

        self.__init_sizer()
        self.on_config_load()
Ejemplo n.º 44
0
    def __init__(self,
                 core,
                 directory,
                 data='data.csv',
                 experimentalDesign='meta.csv',
                 **kwargs):
        Operation.__init__(self, core)

        while directory[-1] == '/':
            directory = directory[:-1]
        self.directory = directory

        _, self.name = os.path.split(self.directory)

        self.datafile = data
        self.metafile = experimentalDesign
Ejemplo n.º 45
0
 def __init__(self, param_dict):
     Operation.__init__(self)
     self.original = param_dict
     
     self.body = param_dict['body'].lower().capitalize()
     if 'date' in param_dict:
         self.date = param_dict['date']
     else:
         self.date = self.DEFAULT_DATE
     
     if 'time' in param_dict:
         self.time = param_dict['time']
     else:
         self.time = self.DEFAULT_TIME
     self.sidereal = STARS[self.body]['sidereal']
     self.declination = STARS[self.body]['declination']
Ejemplo n.º 46
0
 def __init__(self):
     Operation.__init__(
         self, {
             "repository_id":
             int,
             "commit_ids": [int],
             "reviewfilters": [{
                 "username": str,
                 "type": set(["reviewer", "watcher"]),
                 "path": str
             }],
             "applyfilters":
             bool,
             "applyparentfilters":
             bool
         })
Ejemplo n.º 47
0
 def __init__(self):
     Operation.__init__(self, { "repository_id": int,
                                "commit_ids": [int],
                                "branch": str,
                                "summary": str,
                                "applyfilters": bool,
                                "applyparentfilters": bool,
                                "reviewfilters": [{ "username": str,
                                                    "type": set(["reviewer", "watcher"]),
                                                    "path": str }],
                                "recipientfilters": { "mode": set(["opt-in", "opt-out"]),
                                                      "included": Optional([str]),
                                                      "excluded": Optional([str]) },
                                "description": Optional(str),
                                "frombranch": Optional(str),
                                "trackedbranch": Optional({ "remote": str,
                                                            "name": str }) })
Ejemplo n.º 48
0
    def __init__(self, core, designs, values):

        Operation.__init__(self,core)

        self.values = [v.split(",") for v in values]

        self.experimentalDesigns = {}

        self.combinations = itertools.product(*self.values)

        if len(designs) > 0:
            for d, v in zip(designs, self.values):

                design = self.core.session.query(Design).filter(Design.name==d).one_or_none()

                if not design is None and len(v)>0:
                    self.experimentalDesigns[d] = self.core.session.query(ExperimentalDesign)
                    self.experimentalDesigns[d] = \
                        self.experimentalDesigns[d].filter(ExperimentalDesign.design_id==design.id)
                    self.experimentalDesigns[d] = self.experimentalDesigns[d].filter(ExperimentalDesign.value.in_(v))
                else:
                    self.experimentalDesigns[d] = []

        self.wells = {}
        for c in self.combinations:

            self.wells[c] = self.core.session.query(Well)

            for d,v in zip(designs, c):

                ed = self.experimentalDesigns[d].filter(ExperimentalDesign.value==v).one_or_none()

                if not ed is None:
                    self.wells[c] = self.wells[c].filter(Well.experimentalDesigns.contains(ed))
                else:
                    self.wells[c] = None
                    break

        for k in self.wells.keys():
            if self.wells[k] is None:
                del self.wells[k]
                continue
Ejemplo n.º 49
0
 def __init__(self):
     Operation.__init__(self, { "review_id": int })
Ejemplo n.º 50
0
 def __init__(self):
     Operation.__init__(self, { "review_id": int,
                                "sha1": str,
                                "branch": str })
Ejemplo n.º 51
0
 def __init__(self):
     Operation.__init__(self, { "review_id": int,
                                "new_upstream": Optional(str),
                                "branch": Optional(str) })
Ejemplo n.º 52
0
 def __init__(self):
     Operation.__init__(self, {"filter_id": int})
Ejemplo n.º 53
0
 def __init__(self):
     Operation.__init__(self, {"repository_name": str, "path": str, "user_id": Optional(int)})
Ejemplo n.º 54
0
 def __init__(self):
     Operation.__init__(self, { "name": str })
Ejemplo n.º 55
0
 def __init__(self, perform):
     Operation.__init__(self, { "author_name": str,
                                "extension_name": str,
                                "version": Optional(str) })
     self.perform = perform
Ejemplo n.º 56
0
 def __init__(self):
     Operation.__init__(self, { "review": Review })
Ejemplo n.º 57
0
 def __init__(self):
     Operation.__init__(self, { "review": Review,
                                "delay": int })
Ejemplo n.º 58
0
 def __init__(self):
     Operation.__init__(self, {"repository_id": Optional(int), "filter_id": Optional(int)})