Prechádzať zdrojové kódy

Merge pull request #15 from vmarkovtsev/master

Test labours.py in Travis
Vadim Markovtsev 7 rokov pred
rodič
commit
c2dc940bf4
3 zmenil súbory, kde vykonal 10 pridanie a 3 odobranie
  1. 8 2
      .travis.yml
  2. 1 1
      labours.py
  3. 1 0
      requirements.txt

+ 8 - 2
.travis.yml

@@ -1,3 +1,5 @@
+dist: trusty
+
 language: go
 language: go
 
 
 go:
 go:
@@ -5,11 +7,15 @@ go:
   - master
   - master
 
 
 go_import_path: gopkg.in/src-d/hercules.v2
 go_import_path: gopkg.in/src-d/hercules.v2
+
+before_install:
+  - pip3 install -r requirements.txt
+  - pip3 install tensorflow
   
   
 script:
 script:
   - go test -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v2
   - go test -v -cpu=1,2 -coverprofile=coverage.txt -covermode=count gopkg.in/src-d/hercules.v2
-  - $GOPATH/bin/hercules -files -people -couples https://github.com/src-d/hercules > /dev/null
-  - $GOPATH/bin/hercules -files -people -couples -pb https://github.com/src-d/hercules > /dev/null
+  - $GOPATH/bin/hercules -files -people -couples https://github.com/src-d/hercules | python3 labours.py -m all -o out --backend Agg --disable-projector
+  - $GOPATH/bin/hercules -files -people -couples -pb https://github.com/src-d/hercules | python3 labours.py -f pb -m all -o out --backend Agg --disable-projector
 
 
 after_success:
 after_success:
   - bash <(curl -s https://codecov.io/bash)
   - bash <(curl -s https://codecov.io/bash)

+ 1 - 1
labours.py

@@ -723,7 +723,7 @@ def write_embeddings(name, output, run_server, index, embeddings):
   ]
   ]
 }
 }
 """ % (output, name, len(embeddings), len(embeddings[0]), dataf, metaf))
 """ % (output, name, len(embeddings), len(embeddings[0]), dataf, metaf))
-    print("Wrote %s", jsonf)
+    print("Wrote %s" % jsonf)
     if run_server and not web_server.running:
     if run_server and not web_server.running:
         web_server.start()
         web_server.start()
     url = "http://projector.tensorflow.org/?config=http://0.0.0.0:8000/" + jsonf
     url = "http://projector.tensorflow.org/?config=http://0.0.0.0:8000/" + jsonf

+ 1 - 0
requirements.txt

@@ -10,3 +10,4 @@ pytz==2017.2
 PyYAML==3.12
 PyYAML==3.12
 scipy==0.19.1
 scipy==0.19.1
 six==1.10.0
 six==1.10.0
+protobuf>=3.0.0