From 3f7e17624aeda9ee1e1f0948f7dcc53f0ef8d180 Mon Sep 17 00:00:00 2001 From: MuellerSeb Date: Tue, 10 Nov 2020 12:29:06 +0100 Subject: [PATCH 1/5] CI: add py39 support; stop building py35 wheels --- .travis.yml | 24 ++++++++++++------------ setup.py | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index f4597719..56aad331 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ before_install: fi script: - - python3 -m pip install cibuildwheel==1.3.0 + - python3 -m pip install cibuildwheel==1.6.4 - python3 -m cibuildwheel --output-dir dist after_success: @@ -56,9 +56,6 @@ jobs: - python3 -m pytest --cov gstools --cov-report term-missing -v tests/ - python3 -m coveralls - - name: "Linux py35" - services: docker - env: CIBW_BUILD="cp35-*" - name: "Linux py36" services: docker env: CIBW_BUILD="cp36-*" @@ -68,11 +65,10 @@ jobs: - name: "Linux py38" services: docker env: CIBW_BUILD="cp38-*" + - name: "Linux py39" + services: docker + env: CIBW_BUILD="cp39-*" - - name: "MacOS py35" - os: osx - language: shell - env: CIBW_BUILD="cp35-*" - name: "MacOS py36" os: osx language: shell @@ -85,11 +81,11 @@ jobs: os: osx language: shell env: CIBW_BUILD="cp38-*" - - - name: "Win py35" - os: windows + - name: "MacOS py39" + os: osx language: shell - env: CIBW_BUILD="cp35-*" + env: CIBW_BUILD="cp39-*" + - name: "Win py36" os: windows language: shell @@ -102,3 +98,7 @@ jobs: os: windows language: shell env: CIBW_BUILD="cp38-*" + - name: "Win py39" + os: windows + language: shell + env: CIBW_BUILD="cp39-*" diff --git a/setup.py b/setup.py index eadc302c..4213ddc5 100644 --- a/setup.py +++ b/setup.py @@ -220,6 +220,7 @@ class MPDistribution(Distribution): "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering", "Topic :: Utilities", From c47dcf27e5784baaa9a6fa0dc1042248e14b5223 Mon Sep 17 00:00:00 2001 From: MuellerSeb Date: Tue, 10 Nov 2020 12:59:36 +0100 Subject: [PATCH 2/5] fix numpy future warning for elementwise comparisson (should check for string there instead); blackened --- gstools/covmodel/base.py | 4 +--- gstools/krige/base.py | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gstools/covmodel/base.py b/gstools/covmodel/base.py index 16ff4845..cbaa1d30 100644 --- a/gstools/covmodel/base.py +++ b/gstools/covmodel/base.py @@ -1219,9 +1219,7 @@ def name(self): @property def do_rotation(self): """:any:`bool`: State if a rotation is performed.""" - return ( - not np.all(np.isclose(self.angles, 0.0)) - ) + return not np.all(np.isclose(self.angles, 0.0)) @property def is_isotropic(self): diff --git a/gstools/krige/base.py b/gstools/krige/base.py index 8f04d83b..9c3560bd 100755 --- a/gstools/krige/base.py +++ b/gstools/krige/base.py @@ -511,13 +511,13 @@ def cond_val(self): @property def cond_err(self): """:class:`list`: The measurement errors at the condition points.""" - if self._cond_err == "nugget": + if isinstance(self._cond_err, str) and self._cond_err == "nugget": return self.model.nugget return self._cond_err @cond_err.setter def cond_err(self, value): - if value == "nugget": + if isinstance(value, str) and value == "nugget": self._cond_err = value else: if self.exact: @@ -634,7 +634,9 @@ def __repr__(self): """Return String representation.""" return ( "{0}(model={1}, cond_no={2}".format( - self.name, self.model.name, self.cond_no, + self.name, + self.model.name, + self.cond_no, ) + ")" ) From fc27aa2e108859fcf999d4d78fe63975bf1ece36 Mon Sep 17 00:00:00 2001 From: MuellerSeb Date: Tue, 10 Nov 2020 13:00:44 +0100 Subject: [PATCH 3/5] CI: keep py35 for now (still in ubuntu16.04: LTS until Apr 2021, EOL 2024) --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index 56aad331..0a8bbc6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,6 +56,9 @@ jobs: - python3 -m pytest --cov gstools --cov-report term-missing -v tests/ - python3 -m coveralls + - name: "Linux py35" + services: docker + env: CIBW_BUILD="cp35-*" - name: "Linux py36" services: docker env: CIBW_BUILD="cp36-*" @@ -69,6 +72,10 @@ jobs: services: docker env: CIBW_BUILD="cp39-*" + - name: "MacOS py35" + os: osx + language: shell + env: CIBW_BUILD="cp35-*" - name: "MacOS py36" os: osx language: shell @@ -86,6 +93,10 @@ jobs: language: shell env: CIBW_BUILD="cp39-*" + - name: "Win py35" + os: windows + language: shell + env: CIBW_BUILD="cp35-*" - name: "Win py36" os: windows language: shell From 18731296532fc0c0d92ea9dc891cbd637aa03365 Mon Sep 17 00:00:00 2001 From: MuellerSeb Date: Tue, 10 Nov 2020 13:17:21 +0100 Subject: [PATCH 4/5] CI: only upload to test.pypi from master/develop branch --- .travis.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0a8bbc6a..54546bd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,10 +31,14 @@ script: after_success: - | - if [[ $TRAVIS_PULL_REQUEST == 'false' ]]; then + if [[ $TRAVIS_PULL_REQUEST == "false" -a \( $TRAVIS_BRANCH == "master" -o $TRAVIS_BRANCH == "develop" \)]]; then python3 -m pip install twine python3 -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/* - if [[ $TRAVIS_TAG ]]; then python3 -m twine upload --verbose --skip-existing dist/*; fi + fi + - | + if [[ $TRAVIS_TAG ]]; then + python3 -m pip install twine + python3 -m twine upload --verbose --skip-existing dist/* fi notifications: From 51985bbe47afd29a6914c0dc2f476ec526b9029d Mon Sep 17 00:00:00 2001 From: MuellerSeb Date: Tue, 10 Nov 2020 14:13:12 +0100 Subject: [PATCH 5/5] CI: fix bash logical operation in travis config --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 54546bd4..683004be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ script: after_success: - | - if [[ $TRAVIS_PULL_REQUEST == "false" -a \( $TRAVIS_BRANCH == "master" -o $TRAVIS_BRANCH == "develop" \)]]; then + if [[ $TRAVIS_PULL_REQUEST == "false" && ( $TRAVIS_BRANCH == "master" || $TRAVIS_BRANCH == "develop" ) ]]; then python3 -m pip install twine python3 -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/* fi