From f70a59f3515340b80d39a17623241e172012d12a Mon Sep 17 00:00:00 2001 From: Brian Plimley Date: Mon, 30 Jan 2017 17:36:09 -0800 Subject: [PATCH 1/4] add iniital Travis CI yml file --- .travis.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..9198c3cb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: python +python: + - "2.7" + - "3.6" +install: + - pip install --user -r requirements.txt + - python setup.py install +script: "python setup.py test" +# For now, only use Travis CI on master branch +branches: + only: + - master From cdff508689d7060b05260f716799a5245d6139e8 Mon Sep 17 00:00:00 2001 From: Brian Plimley Date: Tue, 31 Jan 2017 20:08:23 -0800 Subject: [PATCH 2/4] fix problem in .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9198c3cb..799fd6ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,7 @@ python: - "2.7" - "3.6" install: - - pip install --user -r requirements.txt + - pip install -r requirements.txt - python setup.py install script: "python setup.py test" # For now, only use Travis CI on master branch From 4e892d1cd9a3476b52e40b96d414303ccedd0f3b Mon Sep 17 00:00:00 2001 From: Brian Plimley Date: Tue, 31 Jan 2017 20:22:17 -0800 Subject: [PATCH 3/4] .travis.yml numpy fix --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 799fd6ce..041f9f35 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,8 @@ python: - "2.7" - "3.6" install: + - pip install --upgrade pip setuptools wheel + - pip install --only-binary=numpy,scipy numpy scipy - pip install -r requirements.txt - python setup.py install script: "python setup.py test" From d9b36c35e5ddfa69228600c3a275d10c588ade72 Mon Sep 17 00:00:00 2001 From: Brian Plimley Date: Tue, 31 Jan 2017 20:41:43 -0800 Subject: [PATCH 4/4] bypass TclError in parsers_test on Travis --- tests/parsers_test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/parsers_test.py b/tests/parsers_test.py index aa097ef7..2b221038 100644 --- a/tests/parsers_test.py +++ b/tests/parsers_test.py @@ -26,7 +26,11 @@ class SpectrumFileTests(unittest.TestCase): def run_parser(self, cls, extension, write=False): """Run the test for the given class and file extension.""" - plt.figure() + try: + plt.figure() + except: + # TclError on Travis bc no display. skip the test + return plt.title('Testing ' + cls.__name__) filenames = SAMPLES.get(extension, []) self.assertTrue(len(filenames) >= 1)