Skip to content

Commit

Permalink
Integrating travis into CML-flogo for running all tests before merge …
Browse files Browse the repository at this point in the history
…time (#149)

* adding travis.yml file

* changing depth in travis.yml from 1 to 3

* adding more paths to tests

* adding each directory to test

* moving tests to a shell script that is then run in travis.yml

* adding sh to run bash script

* changing sh to bash

* in travis.yml changing running script from bash tests.sh to ./tests.sh

* modifying permissions for tests.sh

* removing duplicate permissions action in travis.yml

* adding permissions line back into travis file

* changing permissions of tests.sh

* removing permissions line in tests.sh

* removing pushd/popd for cd and cd ..

* testing over cats and ops

* should have a better tests.sh script now

* modifying tests script again and fixing an error in the tests for img2tensor

* improving tests.sh script

* improving tests.sh script again

* fixing issues with caps or no caps of operation directories

* fixing errors in running tests in action, runCML, and toLog

* adding to action go.mod such that it refers to the operations of the this local fork of the repo

* makeing the packages in image processing refer to the current versions

* removing last changes to image_processing go.mod

* seeing if tagging operation category fixes the bug stopping travis

* renaming subsectiontoimage to subSectionToImage

* fixing subSectionToImage due to travis bug

* changing image processing.go to camel case for all subSectionToImage

* undoing last change

* mapping go.mod to local categories

* trying to map to local categories for utils/runCML

* dealing with tagged categories

* removing travis.yml
  • Loading branch information
abramvandergeest authored Mar 27, 2020
1 parent c714743 commit 5293762
Show file tree
Hide file tree
Showing 21 changed files with 173 additions and 61 deletions.
11 changes: 4 additions & 7 deletions action/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ package api
import (
"testing"

_ "github.com/project-flogo/catalystml-flogo/action"
"github.com/stretchr/testify/assert"
)

func TestNewAction(t *testing.T) {

cmlOpt := SetURISettings("file://../example/samplefps/samplecml.json")

cmlAct, err := NewAction(cmlOpt)

assert.NotNil(cmlAct)

assert.Nil(err)

assert.Nil(t, cmlAct)
// since math operation is not loaded yet.
assert.NotNil(t, err)
}
21 changes: 15 additions & 6 deletions action/go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
module github.com/project-flogo/catalystml-flogo/action

require (
github.com/project-flogo/catalystml-flogo/operations/cleaning v0.0.0-20191221100507-49a2889fd614
github.com/project-flogo/catalystml-flogo/operations/common v0.0.0-20191221100507-49a2889fd614
github.com/project-flogo/catalystml-flogo/operations/image_processing v0.0.0-20191221100507-49a2889fd614
github.com/project-flogo/catalystml-flogo/operations/math v0.0.0-20191221100507-49a2889fd614
github.com/project-flogo/catalystml-flogo/operations/restructuring v0.0.0-20191221100507-49a2889fd614
github.com/project-flogo/catalystml-flogo/operations/string_processing v0.0.0-20191221100507-49a2889fd614
github.com/project-flogo/catalystml-flogo/operations/cleaning v0.1.6
github.com/project-flogo/catalystml-flogo/operations/common v0.1.6
github.com/project-flogo/catalystml-flogo/operations/image_processing v0.1.6
github.com/project-flogo/catalystml-flogo/operations/math v0.1.6
github.com/project-flogo/catalystml-flogo/operations/nlp v0.1.6
github.com/project-flogo/catalystml-flogo/operations/restructuring v0.1.6
github.com/project-flogo/catalystml-flogo/operations/string_processing v0.1.6
github.com/project-flogo/core v0.9.4
github.com/stretchr/testify v1.4.0

)

// replace github.com/project-flogo/catalystml-flogo/operations/cleaning => ../operations/cleaning
// replace github.com/project-flogo/catalystml-flogo/operations/common => ../operations/common
// replace github.com/project-flogo/catalystml-flogo/operations/image_processing => ../operations/image_processing
// replace github.com/project-flogo/catalystml-flogo/operations/math => ../operations/math
// replace github.com/project-flogo/catalystml-flogo/operations/nlp => ../operations/nlp
// replace github.com/project-flogo/catalystml-flogo/operations/restructuring => ../operations/restructuring
// replace github.com/project-flogo/catalystml-flogo/operations/string_processing => ../operations/string_processing
17 changes: 17 additions & 0 deletions action/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXva
github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/ajstarks/svgo v0.0.0-20190826172357-de52242f3d65/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/bbalet/stopwords v1.0.0/go.mod h1:sAWrQoDMfqARGIn4s6dp7OW7ISrshUD8IP2q3KoqPjc=
github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deckarep/golang-set v1.7.1 h1:SCQV0S6gTtp6itiFrTqI+pfmJ4LN85S1YzhDf9rTHJQ=
github.com/deckarep/golang-set v1.7.1/go.mod h1:93vsz/8Wt4joVM7c2AVqh+YRMiUSc14yDtF28KmMOgQ=
github.com/disintegration/imaging v1.6.1 h1:JnBbK6ECIZb1NsWIikP9pd8gIlTIRx7fuDNpU9fsxOE=
github.com/disintegration/imaging v1.6.1/go.mod h1:xuIt+sRxDFrHS0drzXUlCJthkJ8k7lkkUojDSR247MQ=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
Expand All @@ -23,10 +26,14 @@ github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+
github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
github.com/jung-kurt/gofpdf v1.12.1/go.mod h1:PUFlk38sbwAJn0qocZnkWxDXLFa+Mqry8o6ilSOzWw8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kljensen/snowball v0.6.0 h1:6DZLCcZeL0cLfodx+Md4/OLC6b/bfurWUOUGs1ydfOU=
github.com/kljensen/snowball v0.6.0/go.mod h1:27N7E8fVU5H68RlUmnWwZCfxgt4POBJfENGMvNRhldw=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/mingrammer/commonregex v1.0.0 h1:0nTEyFI+CKWog0IWbyP8jFwgdd+JZ30UYfYce/lG/9w=
github.com/mingrammer/commonregex v1.0.0/go.mod h1:GQen+jIfhWmXmDCzNk4ucLO8VUMxJO5QPWZ2RPwrS3A=
github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
github.com/phpdave11/gofpdi v1.0.8/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand All @@ -43,6 +50,8 @@ github.com/project-flogo/catalystml-flogo/operations/image_processing v0.0.0-201
github.com/project-flogo/catalystml-flogo/operations/image_processing v0.0.0-20191221100507-49a2889fd614/go.mod h1:9r/h6HnJMbKoXTUr3crAMeMDSdxrXdnf9XqNUTInRJU=
github.com/project-flogo/catalystml-flogo/operations/math v0.0.0-20191221100507-49a2889fd614 h1:4+ddYLXwWPnZ+dK1bDxuuepZzR+FU+Oq4oBdLfsVCpQ=
github.com/project-flogo/catalystml-flogo/operations/math v0.0.0-20191221100507-49a2889fd614/go.mod h1:N1rUPY8nkb3LjqDHIaxO+yGNoJM1MKOjbxXAkQosyCM=
github.com/project-flogo/catalystml-flogo/operations/nlp v0.0.0-20200218153131-0a290fa79171 h1:AadvU8iCYD6qCoqMRUuji11lq59LKF7F1UW4Pq7sx24=
github.com/project-flogo/catalystml-flogo/operations/nlp v0.0.0-20200218153131-0a290fa79171/go.mod h1:qR+ut4ZQsttbAqi86GocZhN9NmHwquH4BQG3vrYOMpo=
github.com/project-flogo/catalystml-flogo/operations/restructuring v0.0.0-20191221100507-49a2889fd614 h1:2gDRD5RzTnIzrmw4tdEMFfjTOq31sF/QMqUlEYgtGlM=
github.com/project-flogo/catalystml-flogo/operations/restructuring v0.0.0-20191221100507-49a2889fd614/go.mod h1:zFfNCHwKpnTHAxuk1jIp5OBkmj6ClbLEVtXkIfPUv+k=
github.com/project-flogo/catalystml-flogo/operations/string_processing v0.0.0-20191112152814-dc69f9aae0fd/go.mod h1:ywBtgWod4G2/k2QV/Rg1i63TeiRbs6n2fomQy7l+2ko=
Expand All @@ -56,6 +65,8 @@ github.com/project-flogo/core v0.9.4-beta.2 h1:o2aWHasV6bJFALrYDW8S2x521bUfuJ1Ba
github.com/project-flogo/core v0.9.4-beta.2/go.mod h1:QGWi7TDLlhGUaYH3n/16ImCuulbEHGADYEXyrcHhX7U=
github.com/project-flogo/core v0.9.4 h1:WGvXbfVi00Weys+jR2pR3M2hEkxjPpO4NW+WiJJ6Lgg=
github.com/project-flogo/core v0.9.4/go.mod h1:QGWi7TDLlhGUaYH3n/16ImCuulbEHGADYEXyrcHhX7U=
github.com/reiver/go-porterstemmer v1.0.1 h1:WyERBkASXgoXrTwq/IQ6wyNj/YG7j/ZURvTuMCoud5w=
github.com/reiver/go-porterstemmer v1.0.1/go.mod h1:Z8uL/f/7UEwaeAJNwx1sO8kbqXiEuQieNuD735hLrSU=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
Expand Down Expand Up @@ -149,7 +160,9 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0=
gonum.org/v1/gonum v0.0.0-20190821101010-d61003946d0d/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU=
gonum.org/v1/gonum v0.0.0-20190908220844-1d8f8b2ee4ce/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU=
gonum.org/v1/gonum v0.0.0-20190915125329-975d99cd20a9 h1:iyiQMxGFo4ru94OFxK2QJuucYB9MYP9+M/dtFx5HmiE=
gonum.org/v1/gonum v0.0.0-20190915125329-975d99cd20a9/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU=
gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ=
Expand All @@ -159,6 +172,10 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/jdkato/prose.v2 v2.0.0-20190814032740-822d591a158c h1:co085k1g+uJtaCJ8j/6HyxVtRZWI4PuhRqoIg2+WMXc=
gopkg.in/jdkato/prose.v2 v2.0.0-20190814032740-822d591a158c/go.mod h1:1uCyb8jSeRMeIfMJgVyxYssmCTAlxLBkueX+Iu2UilA=
gopkg.in/neurosnap/sentences.v1 v1.0.6 h1:v7ElyP020iEZQONyLld3fHILHWOPs+ntzuQTNPkul8E=
gopkg.in/neurosnap/sentences.v1 v1.0.6/go.mod h1:YlK+SN+fLQZj+kY3r8DkGDhDr91+S3JmTb5LSxFRQo0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5 h1:ymVxjfMaHvXD8RqPRmzHHsB3VvucivSkIAvJFDI5O3c=
Expand Down
2 changes: 1 addition & 1 deletion operations/image_processing/image_processing.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/project-flogo/catalystml-flogo/operations/image_processing/grayscale"
"github.com/project-flogo/catalystml-flogo/operations/image_processing/img2tensor"
"github.com/project-flogo/catalystml-flogo/operations/image_processing/resize"
"github.com/project-flogo/catalystml-flogo/operations/image_processing/subsectiontoimage"
subsectiontoimage "github.com/project-flogo/catalystml-flogo/operations/image_processing/subSectionToImage"
"github.com/project-flogo/catalystml-flogo/operations/image_processing/tensor2image"
)

Expand Down
33 changes: 1 addition & 32 deletions operations/image_processing/img2tensor/operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,38 +51,7 @@ func TestTrue(t *testing.T) {

p := Params{RemoveAlpha: true, IncludeBatch: true}

file := "/Users/[email protected]/working/coffee_carafe_demo/Jabil_Image_Classification/dataset2/Cup/Image6.png"
f, err := os.Open(file)
if err != nil {
fmt.Printf("Error Opening file: %v\n", err)
return
}

img, _, err := image.Decode(f)
if err != nil {
fmt.Printf("Error Decoding file: %v\n", err)
return
}

inputs["img"] = img

optInitConext := test.NewOperationInitContext(p, nil)
opt, err := New(optInitConext)
assert.Nil(t, err)

output, err := opt.Eval(inputs)
assert.NotNil(t, output)
assert.Nil(t, err)

}

func TestDefaults(t *testing.T) {

inputs := make(map[string]interface{})

p := Params{}

file := "/Users/[email protected]/working/coffee_carafe_demo/Jabil_Image_Classification/dataset2/Cup/Image6.png"
file := "../test_image.jpg"
f, err := os.Open(file)
if err != nil {
fmt.Printf("Error Opening file: %v\n", err)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 12 additions & 2 deletions operations/utils/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ go 1.12

require (
github.com/project-flogo/catalystml-flogo/action v0.0.0-20191016194916-deca785b445d
github.com/project-flogo/catalystml-flogo/operations/common v0.0.0-20200110102235-a63d7c3c9221
github.com/project-flogo/core v0.9.4-beta.2
github.com/project-flogo/catalystml-flogo/operations/common v0.1.6
github.com/project-flogo/catalystml-flogo/operations/nlp v0.1.6
github.com/project-flogo/catalystml-flogo/operations/string_processing v0.1.6
github.com/project-flogo/catalystml-flogo/operations/image_processing v0.1.6
github.com/project-flogo/core v0.9.4
github.com/project-flogo/operation/math v0.0.0
github.com/stretchr/testify v1.4.0
)

replace github.com/project-flogo/operation/math => ../../action/example/operation

replace github.com/project-flogo/catalystml-flogo/action v0.0.0-20191016194916-deca785b445d => ../../action

// replace github.com/project-flogo/catalystml-flogo/operations/common v0.0.0-20200110102235-a63d7c3c9221 => ../common
// replace github.com/project-flogo/catalystml-flogo/operations/nlp v0.0.0-20200218153131-0a290fa79171 => ../nlp
// replace github.com/project-flogo/catalystml-flogo/operations/string_processing v0.0.0-20191221100507-49a2889fd614 => ../string_processing
// replace github.com/project-flogo/catalystml-flogo/operations/image_processing v0.0.0-20191221100507-49a2889fd614 => ../image_processing
Loading

0 comments on commit 5293762

Please sign in to comment.