예제 #1
0
 def as_dict(self):
     d = {
         to_camel_case(c.name): getattr(self, c.name)
         for c in self.__table__.columns
     }
     d["operators"] = self.operators
     return d
예제 #2
0
 def as_dict(self):
     d = {
         to_camel_case(c.name): getattr(self, c.name)
         for c in self.__table__.columns
     }
     d["experiments"] = self.experiments
     return d
예제 #3
0
 def as_dict(self):
     d = {
         to_camel_case(c.name): getattr(self, c.name)
         for c in self.__table__.columns
     }
     d["parameters"] = read_parameters(self.experiment_notebook_path)
     return d
예제 #4
0
 def as_dict(self):
     d = {
         to_camel_case(c.name): getattr(self, c.name)
         for c in self.__table__.columns
     }
     del d["tasks"]
     d["operators"] = [{"taskId": o} for i, o in enumerate(self.tasks)]
     return d
예제 #5
0
 def as_dict(self):
     d = {
         to_camel_case(c.name): getattr(self, c.name)
         for c in self.__table__.columns
     }
     status = getattr(self, 'status', None)
     if status:
         d["status"] = status
     return d
예제 #6
0
 def as_dict(self):
     d = {
         to_camel_case(c.name): getattr(self, c.name)
         for c in self.__table__.columns
     }
     return d
예제 #7
0
 def test_to_camel_case(self):
     snake = "test_to_camel_case"
     camel = "testToCamelCase"
     self.assertEqual(utils.to_camel_case(snake), camel)