Skip to content

Commit

Permalink
fix for #166 (#167)
Browse files Browse the repository at this point in the history
* fix: missing new in valToArray, wrong package during registration

* fixed incorrect registration for math and string operations

* fixed incorrect registration for cleaning and utils operations
  • Loading branch information
balamg authored Jun 5, 2020
1 parent ba6501d commit 6071035
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 20 deletions.
8 changes: 4 additions & 4 deletions operations/cleaning/cleaning.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ func init() {
_ = operation.Register(&ifnotin.Operation{}, ifnotin.New)
_ = operation.Register(&ifin.Operation{}, ifin.New)
_ = operation.Register(&oneHotEncoding.Operation{}, oneHotEncoding.New)
_ = operation.Register(&set.Operation{}, binning.New)
_ = operation.Register(&set.Operation{}, filter.New)
_ = operation.Register(&set.Operation{}, sort.New)
_ = operation.Register(&set.Operation{}, interpolateMissing.New)
_ = operation.Register(&binning.Operation{}, binning.New)
_ = operation.Register(&filter.Operation{}, filter.New)
_ = operation.Register(&sort.Operation{}, sort.New)
_ = operation.Register(&interpolateMissing.Operation{}, interpolateMissing.New)

}
8 changes: 4 additions & 4 deletions operations/math/math.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func init() {
_ = operation.Register(&scale.Operation{}, scale.New)
_ = operation.Register(&multPairWise.Operation{}, multPairWise.New)
_ = operation.Register(&divPairWise.Operation{}, divPairWise.New)
_ = operation.Register(&divPairWise.Operation{}, addPairWise.New)
_ = operation.Register(&divPairWise.Operation{}, multi.New)
_ = operation.Register(&divPairWise.Operation{}, add.New)
_ = operation.Register(&divPairWise.Operation{}, divide.New)
_ = operation.Register(&addPairWise.Operation{}, addPairWise.New)
_ = operation.Register(&multi.Operation{}, multi.New)
_ = operation.Register(&add.Operation{}, add.New)
_ = operation.Register(&divide.Operation{}, divide.New)
}
2 changes: 1 addition & 1 deletion operations/restructuring/restructuring.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ func init() {
_ = operation.Register(&reshape.Operation{}, reshape.New)
_ = operation.Register(&table2map.Operation{}, table2map.New)
_ = operation.Register(&transpose.Operation{}, transpose.New)
_ = operation.Register(&transpose.Operation{}, valToArray.New)
_ = operation.Register(&valToArray.Operation{}, valToArray.New)
}
4 changes: 4 additions & 0 deletions operations/restructuring/valToArray/operation.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package valToArray

import (
"github.com/project-flogo/catalystml-flogo/action/operation"
"github.com/project-flogo/core/support/log"
)

type Operation struct {
logger log.Logger
}

func New(ctx operation.InitContext) (operation.Operation, error) {
return &Operation{logger: ctx.Logger()}, nil
}
func (a *Operation) Eval(inputs map[string]interface{}) (interface{}, error) {

in := &Input{}
Expand Down
20 changes: 10 additions & 10 deletions operations/string_processing/string-processing.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ func init() {
_ = operation.Register(&index.Operation{}, index.New)
_ = operation.Register(&lastindex.Operation{}, lastindex.New)
_ = operation.Register(&matchregex.Operation{}, matchregex.New)
_ = operation.Register(&index.Operation{}, encodestring.New)
_ = operation.Register(&lastindex.Operation{}, decodestring.New)
_ = operation.Register(&matchregex.Operation{}, date.New)
_ = operation.Register(&matchregex.Operation{}, replaceall.New)
_ = operation.Register(&matchregex.Operation{}, replaceregex.New)
_ = operation.Register(&matchregex.Operation{}, trim.New)
_ = operation.Register(&matchregex.Operation{}, trimleft.New)
_ = operation.Register(&matchregex.Operation{}, trimright.New)
_ = operation.Register(&matchregex.Operation{}, trimprefix.New)
_ = operation.Register(&matchregex.Operation{}, trimsuffix.New)
_ = operation.Register(&encodestring.Operation{}, encodestring.New)
_ = operation.Register(&decodestring.Operation{}, decodestring.New)
_ = operation.Register(&date.Operation{}, date.New)
_ = operation.Register(&replaceall.Operation{}, replaceall.New)
_ = operation.Register(&replaceregex.Operation{}, replaceregex.New)
_ = operation.Register(&trim.Operation{}, trim.New)
_ = operation.Register(&trimleft.Operation{}, trimleft.New)
_ = operation.Register(&trimright.Operation{}, trimright.New)
_ = operation.Register(&trimprefix.Operation{}, trimprefix.New)
_ = operation.Register(&trimsuffix.Operation{}, trimsuffix.New)
}
2 changes: 1 addition & 1 deletion operations/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ import (

func init() {
_ = operation.Register(&runcml.Operation{}, runcml.New)
_ = operation.Register(&runcml.Operation{}, toLog.New)
_ = operation.Register(&toLog.Operation{}, toLog.New)
}

0 comments on commit 6071035

Please sign in to comment.