From 8ce493ffd8f686a74e6e44ab61c2cb085b5ccd37 Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 10:42:18 +0200 Subject: [PATCH 1/9] try travis-CI with Windows --- .travis.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 92714116..076505dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,26 @@ python: - "3.7" - "3.8" - "3.9" -before_install: - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get update -qq - - sudo apt-get install -qq gcc-4.8 g++-4.8 - - CC=g++-4.8 pip install ufal.udpipe +#before_install: +# - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test +# - sudo apt-get update -qq +# - sudo apt-get install -qq gcc-4.8 g++-4.8 +# - CC=g++-4.8 pip install ufal.udpipe +#install: +# - python setup.py install install: - - python setup.py install + - pip install ".[test]" script: - python -m pytest - cd udapi/core/tests && ./external_tests.sh +matrix: + include: + - name: "Python 3.7.4 on Windows" + os: windows # Windows 10.0.17134 N/A Build 17134 + language: shell # 'language: python' is an error on Travis CI Windows + before_install: + - choco install python --version 3.7.4 + - python --version + - python -m pip install --upgrade pip + - pip3 install --upgrade pytest + env: PATH=/c/Python37:/c/Python37/Scripts:$PATH From c5bd26815f0410d59697dcbe76fe671be374e854 Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 11:11:02 +0200 Subject: [PATCH 2/9] fix invalid indentation in yml --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 076505dc..c92b5100 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,18 +12,19 @@ python: #install: # - python setup.py install install: - - pip install ".[test]" + - pip3 install ".[test]" script: - python -m pytest - cd udapi/core/tests && ./external_tests.sh matrix: include: - - name: "Python 3.7.4 on Windows" - os: windows # Windows 10.0.17134 N/A Build 17134 - language: shell # 'language: python' is an error on Travis CI Windows + - name: "Python 3.7.4 on Windows" + os: windows + language: shell before_install: - choco install python --version 3.7.4 - python --version - python -m pip install --upgrade pip - pip3 install --upgrade pytest env: PATH=/c/Python37:/c/Python37/Scripts:$PATH + script: python -m pytest From ca3bd1bdb2055edd68b6c5b23b3430359749f08e Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 11:20:22 +0200 Subject: [PATCH 3/9] Python 3.7.4 not available in choco anymore, try color printing --- .travis.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index c92b5100..b117a801 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ language: python python: - - "3.6" +# - "3.6" - "3.7" - - "3.8" - - "3.9" +# - "3.8" +# - "3.9" #before_install: # - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test # - sudo apt-get update -qq @@ -15,6 +15,7 @@ install: - pip3 install ".[test]" script: - python -m pytest + - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - cd udapi/core/tests && ./external_tests.sh matrix: include: @@ -22,9 +23,11 @@ matrix: os: windows language: shell before_install: - - choco install python --version 3.7.4 + - choco install python - python --version - python -m pip install --upgrade pip - pip3 install --upgrade pytest env: PATH=/c/Python37:/c/Python37/Scripts:$PATH - script: python -m pytest + script: + - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 + - python -m pytest From c7af684c8dcd58e54b1fc9231e30f8a8333b07dc Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 11:28:56 +0200 Subject: [PATCH 4/9] https://status.chocolatey.org is now offline --- .travis.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.travis.yml b/.travis.yml index b117a801..da383e9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: -# - "3.6" + - "3.6" - "3.7" # - "3.8" # - "3.9" @@ -17,17 +17,17 @@ script: - python -m pytest - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - cd udapi/core/tests && ./external_tests.sh -matrix: - include: - - name: "Python 3.7.4 on Windows" - os: windows - language: shell - before_install: - - choco install python - - python --version - - python -m pip install --upgrade pip - - pip3 install --upgrade pytest - env: PATH=/c/Python37:/c/Python37/Scripts:$PATH - script: - - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - - python -m pytest +#matrix: + #include: + #- name: "Python 3.7.4 on Windows" + #os: windows + #language: shell + #before_install: + #- choco install python + #- python --version + #- python -m pip install --upgrade pip + #- pip3 install --upgrade pytest + #env: PATH=/c/Python37:/c/Python37/Scripts:$PATH + #script: + #- udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 + #- python -m pytest From ddf24766ff97c8a8b97581c974b65f3e559d51ec Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 14:18:18 +0200 Subject: [PATCH 5/9] try choco again --- .travis.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index da383e9b..a41741b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,17 +17,17 @@ script: - python -m pytest - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - cd udapi/core/tests && ./external_tests.sh -#matrix: - #include: - #- name: "Python 3.7.4 on Windows" - #os: windows - #language: shell - #before_install: - #- choco install python - #- python --version - #- python -m pip install --upgrade pip - #- pip3 install --upgrade pytest - #env: PATH=/c/Python37:/c/Python37/Scripts:$PATH - #script: - #- udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - #- python -m pytest +jobs: + include: + - name: "Python 3.7 on Windows" + os: windows + language: shell + before_install: + - choco install python + - python --version + - python -m pip install --upgrade pip + - pip3 install --upgrade pytest + env: PATH=/c/Python37:/c/Python37/Scripts:$PATH + script: + - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 + - python -m pytest From 195aaacb27a1869d6c836e35267648f0bc5052a2 Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 14:22:47 +0200 Subject: [PATCH 6/9] choco has python 3.9 now --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a41741b6..ccd1ce27 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ script: - cd udapi/core/tests && ./external_tests.sh jobs: include: - - name: "Python 3.7 on Windows" + - name: "Python 3.9 on Windows" os: windows language: shell before_install: @@ -27,7 +27,7 @@ jobs: - python --version - python -m pip install --upgrade pip - pip3 install --upgrade pytest - env: PATH=/c/Python37:/c/Python37/Scripts:$PATH + env: PATH=/c/Python39:/c/Python39/Scripts:$PATH script: - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - python -m pytest From 3249da9a2f396df307510f869e390dc3a432762c Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 14:56:51 +0200 Subject: [PATCH 7/9] 'python3' is a 'command not found' error on Windows but 'py' works on Windows only --- .travis.yml | 1 + bin/udapy | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ccd1ce27..40f2a212 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,5 +29,6 @@ jobs: - pip3 install --upgrade pytest env: PATH=/c/Python39:/c/Python39/Scripts:$PATH script: + - python -c 'import udapi;udapi.Document("udapi/core/tests/data/babinsky.conllu").draw(color=1)' - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - python -m pytest diff --git a/bin/udapy b/bin/udapy index 528e3577..635c1901 100755 --- a/bin/udapy +++ b/bin/udapy @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python import os import gc import sys From 43cf569bac780bee4a393b5016ed8c69e6d33d2e Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 15:11:56 +0200 Subject: [PATCH 8/9] try set PYTHONUTF8=1 for Windows --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 40f2a212..16b11d25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,8 @@ jobs: - pip3 install --upgrade pytest env: PATH=/c/Python39:/c/Python39/Scripts:$PATH script: - - python -c 'import udapi;udapi.Document("udapi/core/tests/data/babinsky.conllu").draw(color=1)' + - python -c 'import colorama;print("\033[31m some red text")' + - python -Xutf8 -c 'import udapi;udapi.Document("udapi/core/tests/data/babinsky.conllu").draw(color=1)' + - set PYTHONUTF8=1 - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - python -m pytest From 4dceb69347aca9d304f446262f5e64a5ae1b48e9 Mon Sep 17 00:00:00 2001 From: Martin Popel Date: Wed, 31 Mar 2021 15:23:40 +0200 Subject: [PATCH 9/9] travis-CI for Windows once again --- .travis.yml | 6 ++---- bin/udapy | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 16b11d25..417e39fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: python python: - "3.6" - "3.7" -# - "3.8" -# - "3.9" + - "3.8" + - "3.9" #before_install: # - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test # - sudo apt-get update -qq @@ -31,6 +31,4 @@ jobs: script: - python -c 'import colorama;print("\033[31m some red text")' - python -Xutf8 -c 'import udapi;udapi.Document("udapi/core/tests/data/babinsky.conllu").draw(color=1)' - - set PYTHONUTF8=1 - - udapy read.Conllu files=udapi/core/tests/data/babinsky.conllu write.TextModeTrees color=1 - python -m pytest diff --git a/bin/udapy b/bin/udapy index 635c1901..528e3577 100755 --- a/bin/udapy +++ b/bin/udapy @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import gc import sys