From 93d3659d386552a38b4e0e0b4aa2f18a14c3f0c5 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Wed, 5 Feb 2020 15:29:02 +0100 Subject: [PATCH 01/18] [version] new version --- tofu/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tofu/version.py b/tofu/version.py index fbadd4a44..02b780ab3 100644 --- a/tofu/version.py +++ b/tofu/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '1.4.2' +__version__ = '1.4.2beta3' From 5794d8674e35c1d7cac04c93dbde4478e0628350 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Wed, 5 Feb 2020 17:06:35 +0100 Subject: [PATCH 02/18] [Issue #340] deploying only in the right branch --- .travis.yml | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5cc833b73..99c210aaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: python -matrix: +jobs: include: - name: Bionic python 3.7 os: linux @@ -80,57 +80,58 @@ before_deploy: conda install anaconda-client conda-build conda build conda_recipe export PKG_REAL=$(conda build . --output | tail -1) + export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") + export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") echo "BEFORE DEPLOY END.........." fi deploy: - provider: pypi distributions: sdist - user: __token__ + username: __token__ skip_existing: true - skip_cleanup: true + cleanup: False on: - branch: deploy-test tags: true + condition: $IS_DEPLOY = deploy-test server: https://test.pypi.org/legacy/ password: secure: xfVFuoz9YYNChzmT8DC9y+8eH6zdFkfoy3B51uqy8b+vhJNzCzLay4F0uSHvhHy6iYorM6UQKr6soC4D7n3PhmnFOTX/cgLtd/p4gBWGYZF6yXacvw+UHKMshgbAhn2sEynxdSAqdAlNttMI8jsUu9RhbzGiv1l5zSNnFWF4Zsly02G68UnztxIGoz8AYTRW2N2oQhGrl/ryj/YG4mSRKjled6BzK7kNoJUqLGl12DqdMMTEmdJ9NHBXgK3Dv0ya17ReFz3TcxE/4+Yc38NwSR4Ia2EvVSMtyIaccQ1uSrXwW8JQOMn+9CmDWZVUMDD2bzKYbm2WGGM9Fh8WrHnwlWRujoLDofhYEK0Cus11gULFF+J88XucOJlyJNrHP6TWxdSVVoQfwWr2ABqZIvilsvHpF+sjDLqomTNHdi+BbzP2koRv0nJb9K1W24bjPLtSK8+plX7suv7gdBNwlsJ+dPLDM87v4+jGHGthQ6P4X2guTMHZm1PU0PSPB9LCbENCN1uktLLhkgx7gZ42Ag+Jwiu02ENkChLaEB4WpPb9mjLnomu5LDYXFGtPJ/uLMOi3VCXyda0LrzqDhXYT3Cg4hvXySwJcgMYSXalfTxnTm9oouePiEXDbK+XwjMP9mjC5CeMg3SaFFTywqaTH0WUqiOBUJ6H3Gsm0sB15Tj4lNKQ= - provider: pypi distributions: bdist_wheel - user: __token__ + username: __token__ skip_existing: true - skip_cleanup: true + cleanup: False on: - branch: deploy-test - condition: $OS = osx-64 tags: true + condition: $IS_DEPLOY = deploy-test + condition: $OS = osx-64 server: https://test.pypi.org/legacy/ password: secure: xfVFuoz9YYNChzmT8DC9y+8eH6zdFkfoy3B51uqy8b+vhJNzCzLay4F0uSHvhHy6iYorM6UQKr6soC4D7n3PhmnFOTX/cgLtd/p4gBWGYZF6yXacvw+UHKMshgbAhn2sEynxdSAqdAlNttMI8jsUu9RhbzGiv1l5zSNnFWF4Zsly02G68UnztxIGoz8AYTRW2N2oQhGrl/ryj/YG4mSRKjled6BzK7kNoJUqLGl12DqdMMTEmdJ9NHBXgK3Dv0ya17ReFz3TcxE/4+Yc38NwSR4Ia2EvVSMtyIaccQ1uSrXwW8JQOMn+9CmDWZVUMDD2bzKYbm2WGGM9Fh8WrHnwlWRujoLDofhYEK0Cus11gULFF+J88XucOJlyJNrHP6TWxdSVVoQfwWr2ABqZIvilsvHpF+sjDLqomTNHdi+BbzP2koRv0nJb9K1W24bjPLtSK8+plX7suv7gdBNwlsJ+dPLDM87v4+jGHGthQ6P4X2guTMHZm1PU0PSPB9LCbENCN1uktLLhkgx7gZ42Ag+Jwiu02ENkChLaEB4WpPb9mjLnomu5LDYXFGtPJ/uLMOi3VCXyda0LrzqDhXYT3Cg4hvXySwJcgMYSXalfTxnTm9oouePiEXDbK+XwjMP9mjC5CeMg3SaFFTywqaTH0WUqiOBUJ6H3Gsm0sB15Tj4lNKQ= - provider: pypi distributions: sdist - user: "Didou09" + username: "Didou09" skip_existing: true - skip_cleanup: true + cleanup: False on: tags: true - branch: master + condition: $IS_MASTER = master password: secure: JNEDTDJVx/2fXNfHntNQ99iDRNuQ4uB3y+DBWVIBycCT95+UCb36YPtKzmruEk/UUS29Xgq4IYCGdfCSWE9smKqG8tV1PcHiw705m+AzcpKy77YtzbVECFBxqY4W36O2pHrkwEUzP/7acjFwNsnUFzArqEzsBJ+KdLaa4OPHJXCh30GA0GyqlrXYbBKG+DA9hX5vtsGo4C6w9noALYF3fS7pKPiI6ipKFnAlzGgHQ7Ke0uQME8N3IAFhmh+Z5xMtIIDWxlnqv+KszdG4DIaGV/W6NIJNAbRhzkqUd+Chu6LoPAd/XkHDTeirR/MBkNUc5UcRJxRnP9rUTRo1gCO/buTYuNRgFkMvqhV5a033+x9edWgtUiKNJIMPLXOxe0RJvc5GWji+Co77HtHxRmGRM2rnYqWMtZeYZlFbUdvHu/8jf0d6I8jyUgAoJYdlMA2u/ipENP3S6by4epE9qycUPXiIVh6r3DZbf3vPTMFvTZYAjBrA0NOzihv1xgcXwemmNUFOQSpe0io4UcFxtS9lLMo+30UMQjCHSnbEVM3zSlZmbMOKpkVOlKlt8Lz5NxwVgWtu9FuW2pGukLtE8AWbqvY9urXAPZCQqZlOIklIjJQIqOITnuw9LEV09cgvPHXfdvNni3ldbMlIQ89zryM6dYvhYryTiEZGK4JDR3wAKJA= - provider: pypi distributions: bdist_wheel - user: "Didou09" + username: "Didou09" skip_existing: true - skip_cleanup: true + cleanup: False on: condition: $OS = osx-64 tags: true - branch: master + condition: $IS_MASTER = master password: secure: JNEDTDJVx/2fXNfHntNQ99iDRNuQ4uB3y+DBWVIBycCT95+UCb36YPtKzmruEk/UUS29Xgq4IYCGdfCSWE9smKqG8tV1PcHiw705m+AzcpKy77YtzbVECFBxqY4W36O2pHrkwEUzP/7acjFwNsnUFzArqEzsBJ+KdLaa4OPHJXCh30GA0GyqlrXYbBKG+DA9hX5vtsGo4C6w9noALYF3fS7pKPiI6ipKFnAlzGgHQ7Ke0uQME8N3IAFhmh+Z5xMtIIDWxlnqv+KszdG4DIaGV/W6NIJNAbRhzkqUd+Chu6LoPAd/XkHDTeirR/MBkNUc5UcRJxRnP9rUTRo1gCO/buTYuNRgFkMvqhV5a033+x9edWgtUiKNJIMPLXOxe0RJvc5GWji+Co77HtHxRmGRM2rnYqWMtZeYZlFbUdvHu/8jf0d6I8jyUgAoJYdlMA2u/ipENP3S6by4epE9qycUPXiIVh6r3DZbf3vPTMFvTZYAjBrA0NOzihv1xgcXwemmNUFOQSpe0io4UcFxtS9lLMo+30UMQjCHSnbEVM3zSlZmbMOKpkVOlKlt8Lz5NxwVgWtu9FuW2pGukLtE8AWbqvY9urXAPZCQqZlOIklIjJQIqOITnuw9LEV09cgvPHXfdvNni3ldbMlIQ89zryM6dYvhYryTiEZGK4JDR3wAKJA= - provider: script script: $START/anaconda_upload.sh - skip_cleanup: true + cleanup: False on: tags: true - branch: master - skip_cleanup: true + condition: $IS_MASTER = master \ No newline at end of file From c2eeeaff65717a36e38f2ba02b0bf5e4002f4baf Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Wed, 5 Feb 2020 17:07:54 +0100 Subject: [PATCH 03/18] right version --- tofu/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tofu/version.py b/tofu/version.py index 02b780ab3..04a8c5300 100644 --- a/tofu/version.py +++ b/tofu/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '1.4.2beta3' +__version__ = '1.4.2b4' From 5858375d1577e477563faa6494c942d5a70420fa Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Wed, 5 Feb 2020 17:41:10 +0100 Subject: [PATCH 04/18] trying to add quotes to condition --- .travis.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 99c210aaf..874a76ef3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,6 +82,9 @@ before_deploy: export PKG_REAL=$(conda build . --output | tail -1) export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") + echo $IS_MASTER + echo $IS_DEPLOY + echo $PKG_REAL echo "BEFORE DEPLOY END.........." fi deploy: @@ -92,7 +95,7 @@ deploy: cleanup: False on: tags: true - condition: $IS_DEPLOY = deploy-test + condition: $IS_DEPLOY = "deploy-test" server: https://test.pypi.org/legacy/ password: secure: xfVFuoz9YYNChzmT8DC9y+8eH6zdFkfoy3B51uqy8b+vhJNzCzLay4F0uSHvhHy6iYorM6UQKr6soC4D7n3PhmnFOTX/cgLtd/p4gBWGYZF6yXacvw+UHKMshgbAhn2sEynxdSAqdAlNttMI8jsUu9RhbzGiv1l5zSNnFWF4Zsly02G68UnztxIGoz8AYTRW2N2oQhGrl/ryj/YG4mSRKjled6BzK7kNoJUqLGl12DqdMMTEmdJ9NHBXgK3Dv0ya17ReFz3TcxE/4+Yc38NwSR4Ia2EvVSMtyIaccQ1uSrXwW8JQOMn+9CmDWZVUMDD2bzKYbm2WGGM9Fh8WrHnwlWRujoLDofhYEK0Cus11gULFF+J88XucOJlyJNrHP6TWxdSVVoQfwWr2ABqZIvilsvHpF+sjDLqomTNHdi+BbzP2koRv0nJb9K1W24bjPLtSK8+plX7suv7gdBNwlsJ+dPLDM87v4+jGHGthQ6P4X2guTMHZm1PU0PSPB9LCbENCN1uktLLhkgx7gZ42Ag+Jwiu02ENkChLaEB4WpPb9mjLnomu5LDYXFGtPJ/uLMOi3VCXyda0LrzqDhXYT3Cg4hvXySwJcgMYSXalfTxnTm9oouePiEXDbK+XwjMP9mjC5CeMg3SaFFTywqaTH0WUqiOBUJ6H3Gsm0sB15Tj4lNKQ= @@ -103,7 +106,7 @@ deploy: cleanup: False on: tags: true - condition: $IS_DEPLOY = deploy-test + condition: $IS_DEPLOY = "deploy-test" condition: $OS = osx-64 server: https://test.pypi.org/legacy/ password: @@ -115,7 +118,7 @@ deploy: cleanup: False on: tags: true - condition: $IS_MASTER = master + condition: $IS_MASTER = "master" password: secure: JNEDTDJVx/2fXNfHntNQ99iDRNuQ4uB3y+DBWVIBycCT95+UCb36YPtKzmruEk/UUS29Xgq4IYCGdfCSWE9smKqG8tV1PcHiw705m+AzcpKy77YtzbVECFBxqY4W36O2pHrkwEUzP/7acjFwNsnUFzArqEzsBJ+KdLaa4OPHJXCh30GA0GyqlrXYbBKG+DA9hX5vtsGo4C6w9noALYF3fS7pKPiI6ipKFnAlzGgHQ7Ke0uQME8N3IAFhmh+Z5xMtIIDWxlnqv+KszdG4DIaGV/W6NIJNAbRhzkqUd+Chu6LoPAd/XkHDTeirR/MBkNUc5UcRJxRnP9rUTRo1gCO/buTYuNRgFkMvqhV5a033+x9edWgtUiKNJIMPLXOxe0RJvc5GWji+Co77HtHxRmGRM2rnYqWMtZeYZlFbUdvHu/8jf0d6I8jyUgAoJYdlMA2u/ipENP3S6by4epE9qycUPXiIVh6r3DZbf3vPTMFvTZYAjBrA0NOzihv1xgcXwemmNUFOQSpe0io4UcFxtS9lLMo+30UMQjCHSnbEVM3zSlZmbMOKpkVOlKlt8Lz5NxwVgWtu9FuW2pGukLtE8AWbqvY9urXAPZCQqZlOIklIjJQIqOITnuw9LEV09cgvPHXfdvNni3ldbMlIQ89zryM6dYvhYryTiEZGK4JDR3wAKJA= - provider: pypi @@ -126,7 +129,7 @@ deploy: on: condition: $OS = osx-64 tags: true - condition: $IS_MASTER = master + condition: $IS_MASTER = "master" password: secure: JNEDTDJVx/2fXNfHntNQ99iDRNuQ4uB3y+DBWVIBycCT95+UCb36YPtKzmruEk/UUS29Xgq4IYCGdfCSWE9smKqG8tV1PcHiw705m+AzcpKy77YtzbVECFBxqY4W36O2pHrkwEUzP/7acjFwNsnUFzArqEzsBJ+KdLaa4OPHJXCh30GA0GyqlrXYbBKG+DA9hX5vtsGo4C6w9noALYF3fS7pKPiI6ipKFnAlzGgHQ7Ke0uQME8N3IAFhmh+Z5xMtIIDWxlnqv+KszdG4DIaGV/W6NIJNAbRhzkqUd+Chu6LoPAd/XkHDTeirR/MBkNUc5UcRJxRnP9rUTRo1gCO/buTYuNRgFkMvqhV5a033+x9edWgtUiKNJIMPLXOxe0RJvc5GWji+Co77HtHxRmGRM2rnYqWMtZeYZlFbUdvHu/8jf0d6I8jyUgAoJYdlMA2u/ipENP3S6by4epE9qycUPXiIVh6r3DZbf3vPTMFvTZYAjBrA0NOzihv1xgcXwemmNUFOQSpe0io4UcFxtS9lLMo+30UMQjCHSnbEVM3zSlZmbMOKpkVOlKlt8Lz5NxwVgWtu9FuW2pGukLtE8AWbqvY9urXAPZCQqZlOIklIjJQIqOITnuw9LEV09cgvPHXfdvNni3ldbMlIQ89zryM6dYvhYryTiEZGK4JDR3wAKJA= - provider: script @@ -134,4 +137,4 @@ deploy: cleanup: False on: tags: true - condition: $IS_MASTER = master \ No newline at end of file + condition: $IS_MASTER = "master" \ No newline at end of file From ea9137634233e5e7109c9bc215f77714cfc4cf20 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Wed, 5 Feb 2020 17:57:44 +0100 Subject: [PATCH 05/18] exporting at the right place --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 874a76ef3..2793ee72a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,6 +59,10 @@ install: codecov - export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)") - export VERSION=$(echo $REV | tr - .) +- export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") +- export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") +- echo $IS_MASTER +- echo $IS_DEPLOY - echo $REV - pip install -e ".[dev]" script: @@ -80,10 +84,6 @@ before_deploy: conda install anaconda-client conda-build conda build conda_recipe export PKG_REAL=$(conda build . --output | tail -1) - export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") - export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") - echo $IS_MASTER - echo $IS_DEPLOY echo $PKG_REAL echo "BEFORE DEPLOY END.........." fi From 485738810cd84ec27c97321927769b2eed24ca93 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Wed, 5 Feb 2020 18:07:33 +0100 Subject: [PATCH 06/18] debugging --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2793ee72a..fb57dfb9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,12 +59,15 @@ install: codecov - export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)") - export VERSION=$(echo $REV | tr - .) +- echo $REV +- pip install -e ".[dev]" - export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") - export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") +- echo $TRAVIS_COMMIT +- git ls-remote origin - echo $IS_MASTER - echo $IS_DEPLOY -- echo $REV -- pip install -e ".[dev]" + script: - cd $HOME - nosetests tofu.tests --nocapture -v --with-id --with-timer --with-coverage --cover-package=tofu From 4e58fc1ff9c1ac8656eca770d8970e90223c5a86 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 12:01:23 +0100 Subject: [PATCH 07/18] trying to only use file version of updateveresion --- pyproject.toml | 7 +++++-- setup.py | 36 ++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 914ec2419..daf04b8b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,6 @@ [build-system] -requires = ["setuptools>=40.8.0", "wheel", "cython>0.26", "numpy"] -build-backend = "setuptools.build_meta" \ No newline at end of file +requires = ["setuptools>=40.8.0", + "wheel", + "cython>0.26", + "numpy", + ] diff --git a/setup.py b/setup.py index 443fdd0f2..3b70e34c7 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ # Remove _updateversion import due to build-time dependency # => updateversion defined in here for commodity # => find a cleaner solution later -# import _updateversion as up +import _updateversion as up # ... for `clean` command from distutils.command.clean import clean as Clean @@ -149,23 +149,23 @@ def check_for_openmp(cc_var): _HERE = os.path.abspath(os.path.dirname(__file__)) -def updateversion(path=_HERE): - # Fetch version from git tags, and write to version.py - # Also, when git is not available (PyPi package), use stored version.py - version_py = os.path.join(path, 'tofu', 'version.py') - try: - version_git = subprocess.check_output(["git", - "describe"]).rstrip().decode() - except subprocess.CalledProcessError: - with open(version_py, 'r') as fh: - version_git = fh.read().strip().split("=")[-1].replace("'", '') - version_git = version_git.lower().replace('v', '') +# def updateversion(path=_HERE): +# # Fetch version from git tags, and write to version.py +# # Also, when git is not available (PyPi package), use stored version.py +# version_py = os.path.join(path, 'tofu', 'version.py') +# try: +# version_git = subprocess.check_output(["git", +# "describe"]).rstrip().decode() +# except subprocess.CalledProcessError: +# with open(version_py, 'r') as fh: +# version_git = fh.read().strip().split("=")[-1].replace("'", '') +# version_git = version_git.lower().replace('v', '') - version_msg = "# Do not edit, pipeline versioning governed by git tags!" - with open(version_py, "w") as fh: - msg = "{0}__version__ = '{1}'{0}".format(os.linesep, version_git) - fh.write(version_msg + msg) - return version_git +# version_msg = "# Do not edit, pipeline versioning governed by git tags!" +# with open(version_py, "w") as fh: +# msg = "{0}__version__ = '{1}'{0}".format(os.linesep, version_git) +# fh.write(version_msg + msg) +# return version_git def get_version_tofu(path=_HERE): @@ -187,7 +187,7 @@ def get_version_tofu(path=_HERE): .decode() ) if git_branch in ["master", "deploy-test"]: - version_tofu = updateversion() + version_tofu = up.updateversion() else: isgit = False except Exception: From 91b686e70bd93c523184703e2fb5c6cdf538d07d Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 16:15:04 +0100 Subject: [PATCH 08/18] erased old update version function in setup --- setup.py | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/setup.py b/setup.py index 3b70e34c7..7af05a8ac 100644 --- a/setup.py +++ b/setup.py @@ -16,10 +16,7 @@ # ... packages that need to be in pyproject.toml from Cython.Distutils import build_ext import numpy as np -# ... -# Remove _updateversion import due to build-time dependency -# => updateversion defined in here for commodity -# => find a cleaner solution later +# ... local script import _updateversion as up # ... for `clean` command from distutils.command.clean import clean as Clean @@ -149,25 +146,6 @@ def check_for_openmp(cc_var): _HERE = os.path.abspath(os.path.dirname(__file__)) -# def updateversion(path=_HERE): -# # Fetch version from git tags, and write to version.py -# # Also, when git is not available (PyPi package), use stored version.py -# version_py = os.path.join(path, 'tofu', 'version.py') -# try: -# version_git = subprocess.check_output(["git", -# "describe"]).rstrip().decode() -# except subprocess.CalledProcessError: -# with open(version_py, 'r') as fh: -# version_git = fh.read().strip().split("=")[-1].replace("'", '') -# version_git = version_git.lower().replace('v', '') - -# version_msg = "# Do not edit, pipeline versioning governed by git tags!" -# with open(version_py, "w") as fh: -# msg = "{0}__version__ = '{1}'{0}".format(os.linesep, version_git) -# fh.write(version_msg + msg) -# return version_git - - def get_version_tofu(path=_HERE): # Try from git From de0908a59af4b322ddd3a796569991598e6a8dbe Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 16:21:52 +0100 Subject: [PATCH 09/18] having a version number different to the tag version number --- tofu/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tofu/version.py b/tofu/version.py index 04a8c5300..b69681a2f 100644 --- a/tofu/version.py +++ b/tofu/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '1.4.2b4' +__version__ = '1.4.2b4-2-g91b686e7' From 69b1aa9840c513d8a3d4f0cf82835d2920b940d2 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 17:04:32 +0100 Subject: [PATCH 10/18] adding prints to see whats happening in travis --- setup.py | 4 ++++ tofu/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7af05a8ac..b3df349a7 100644 --- a/setup.py +++ b/setup.py @@ -151,6 +151,7 @@ def get_version_tofu(path=_HERE): # Try from git isgit = ".git" in os.listdir(path) if isgit: + print(">>>> is git branch") try: git_branch = ( subprocess.check_output( @@ -164,7 +165,9 @@ def get_version_tofu(path=_HERE): .rstrip() .decode() ) + print(">>>> git branch => ", git_branch) if git_branch in ["master", "deploy-test"]: + print(">>>> updating version") version_tofu = up.updateversion() else: isgit = False @@ -172,6 +175,7 @@ def get_version_tofu(path=_HERE): isgit = False if not isgit: + print(">>>> is NOT git") version_tofu = os.path.join(path, "tofu") version_tofu = os.path.join(version_tofu, "version.py") with open(version_tofu, "r") as fh: diff --git a/tofu/version.py b/tofu/version.py index b69681a2f..bf7a961fa 100644 --- a/tofu/version.py +++ b/tofu/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '1.4.2b4-2-g91b686e7' +__version__ = '1.4.2b3-8-gde0908a5' From 4c8ff09a3746bf08cb5eb4f65fecfc6575c1c3c6 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 17:53:42 +0100 Subject: [PATCH 11/18] only building conda recipe for conda deployment --- .travis.yml | 5 ----- anaconda_upload.sh | 7 +++++-- tofu/version.py | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb57dfb9b..354b13954 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,11 +83,6 @@ before_deploy: echo "BEFORE DEPLOY START........" ls $START cd $START - conda config --set anaconda_upload no - conda install anaconda-client conda-build - conda build conda_recipe - export PKG_REAL=$(conda build . --output | tail -1) - echo $PKG_REAL echo "BEFORE DEPLOY END.........." fi deploy: diff --git a/anaconda_upload.sh b/anaconda_upload.sh index e0f5a9a66..c5d368920 100644 --- a/anaconda_upload.sh +++ b/anaconda_upload.sh @@ -1,8 +1,11 @@ #!/bin/bash set -e -#echo "Converting conda package..." -#conda convert --platform all $PKG_DIR/tofu-*.tar.bz2 --output-dir $PKG_DIR +conda config --set anaconda_upload no +conda install anaconda-client conda-build +conda build conda_recipe +export PKG_REAL=$(conda build . --output | tail -1) +echo $PKG_REAL echo "Deploying to anaconda.org..." export USER=ToFuProject diff --git a/tofu/version.py b/tofu/version.py index bf7a961fa..000a430b0 100644 --- a/tofu/version.py +++ b/tofu/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '1.4.2b3-8-gde0908a5' +__version__ = '1.4.2b4-1-g7499a8c5' From b1d018f6a882675ac7e2f89c46647f923a4ea0a4 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 18:11:10 +0100 Subject: [PATCH 12/18] trying install not in editable mode --- .travis.yml | 2 +- tofu/version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 354b13954..ad5704ef5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,7 +60,7 @@ install: - export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)") - export VERSION=$(echo $REV | tr - .) - echo $REV -- pip install -e ".[dev]" +- python setup.py install - export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") - export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") - echo $TRAVIS_COMMIT diff --git a/tofu/version.py b/tofu/version.py index 000a430b0..0143693cd 100644 --- a/tofu/version.py +++ b/tofu/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '1.4.2b4-1-g7499a8c5' +__version__ = '1.4.2b3-10-g4c8ff09a' From 9c9c8390af343680e0346472ddb849002bf38bbb Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 18:19:59 +0100 Subject: [PATCH 13/18] instaling requirements --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ad5704ef5..bfad39b29 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,6 +60,7 @@ install: - export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)") - export VERSION=$(echo $REV | tr - .) - echo $REV +- conda install -q --file requirements.txt - python setup.py install - export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") - export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") From d916732cd559452b057759c97a8cb9a2cfaea420 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 18:22:46 +0100 Subject: [PATCH 14/18] checking version number right before deployment --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index bfad39b29..5353b5516 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,6 +84,7 @@ before_deploy: echo "BEFORE DEPLOY START........" ls $START cd $START + more tofu/version.py echo "BEFORE DEPLOY END.........." fi deploy: From e581319b39095c9d064cb082e3ebd08e617db758 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 18:40:43 +0100 Subject: [PATCH 15/18] checking version number right before deployment --- setup.py | 3 ++- tofu/version.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b3df349a7..6ccf51164 100644 --- a/setup.py +++ b/setup.py @@ -166,7 +166,8 @@ def get_version_tofu(path=_HERE): .decode() ) print(">>>> git branch => ", git_branch) - if git_branch in ["master", "deploy-test"]: + deploy_branches = ["master", "deploy-test"] + if (git_branch in deploy_branches or "TRAVIS_TAG" in os.environ): print(">>>> updating version") version_tofu = up.updateversion() else: diff --git a/tofu/version.py b/tofu/version.py index 0143693cd..6c45f826f 100644 --- a/tofu/version.py +++ b/tofu/version.py @@ -1,2 +1,2 @@ # Do not edit, pipeline versioning governed by git tags! -__version__ = '1.4.2b3-10-g4c8ff09a' +__version__ = '1.4.2b3-13-gd916732c' From d254226aa4bf3bae0aa9eecb5113530d74ace3e4 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 18:50:52 +0100 Subject: [PATCH 16/18] reverting back installation method --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5353b5516..7a38e42cf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,8 +60,7 @@ install: - export REV=$(python -c "import _updateversion as up; out=up.updateversion(); print(out)") - export VERSION=$(echo $REV | tr - .) - echo $REV -- conda install -q --file requirements.txt -- python setup.py install +- pip install -e ".[dev]" - export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") - export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") - echo $TRAVIS_COMMIT From d16595dbca1bc8b516f03abced987c3c2fa2f460 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 19:04:47 +0100 Subject: [PATCH 17/18] [deploy] cleaning up changes --- .travis.yml | 13 ++++++------- setup.py | 4 ---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7a38e42cf..b7742dbd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,7 +83,6 @@ before_deploy: echo "BEFORE DEPLOY START........" ls $START cd $START - more tofu/version.py echo "BEFORE DEPLOY END.........." fi deploy: @@ -91,7 +90,7 @@ deploy: distributions: sdist username: __token__ skip_existing: true - cleanup: False + skip_cleanup: true on: tags: true condition: $IS_DEPLOY = "deploy-test" @@ -102,7 +101,7 @@ deploy: distributions: bdist_wheel username: __token__ skip_existing: true - cleanup: False + skip_cleanup: true on: tags: true condition: $IS_DEPLOY = "deploy-test" @@ -114,7 +113,7 @@ deploy: distributions: sdist username: "Didou09" skip_existing: true - cleanup: False + skip_cleanup: true on: tags: true condition: $IS_MASTER = "master" @@ -124,7 +123,7 @@ deploy: distributions: bdist_wheel username: "Didou09" skip_existing: true - cleanup: False + skip_cleanup: true on: condition: $OS = osx-64 tags: true @@ -133,7 +132,7 @@ deploy: secure: JNEDTDJVx/2fXNfHntNQ99iDRNuQ4uB3y+DBWVIBycCT95+UCb36YPtKzmruEk/UUS29Xgq4IYCGdfCSWE9smKqG8tV1PcHiw705m+AzcpKy77YtzbVECFBxqY4W36O2pHrkwEUzP/7acjFwNsnUFzArqEzsBJ+KdLaa4OPHJXCh30GA0GyqlrXYbBKG+DA9hX5vtsGo4C6w9noALYF3fS7pKPiI6ipKFnAlzGgHQ7Ke0uQME8N3IAFhmh+Z5xMtIIDWxlnqv+KszdG4DIaGV/W6NIJNAbRhzkqUd+Chu6LoPAd/XkHDTeirR/MBkNUc5UcRJxRnP9rUTRo1gCO/buTYuNRgFkMvqhV5a033+x9edWgtUiKNJIMPLXOxe0RJvc5GWji+Co77HtHxRmGRM2rnYqWMtZeYZlFbUdvHu/8jf0d6I8jyUgAoJYdlMA2u/ipENP3S6by4epE9qycUPXiIVh6r3DZbf3vPTMFvTZYAjBrA0NOzihv1xgcXwemmNUFOQSpe0io4UcFxtS9lLMo+30UMQjCHSnbEVM3zSlZmbMOKpkVOlKlt8Lz5NxwVgWtu9FuW2pGukLtE8AWbqvY9urXAPZCQqZlOIklIjJQIqOITnuw9LEV09cgvPHXfdvNni3ldbMlIQ89zryM6dYvhYryTiEZGK4JDR3wAKJA= - provider: script script: $START/anaconda_upload.sh - cleanup: False + skip_cleanup: true on: tags: true - condition: $IS_MASTER = "master" \ No newline at end of file + condition: $IS_MASTER = "master" diff --git a/setup.py b/setup.py index 6ccf51164..557b746fe 100644 --- a/setup.py +++ b/setup.py @@ -151,7 +151,6 @@ def get_version_tofu(path=_HERE): # Try from git isgit = ".git" in os.listdir(path) if isgit: - print(">>>> is git branch") try: git_branch = ( subprocess.check_output( @@ -165,10 +164,8 @@ def get_version_tofu(path=_HERE): .rstrip() .decode() ) - print(">>>> git branch => ", git_branch) deploy_branches = ["master", "deploy-test"] if (git_branch in deploy_branches or "TRAVIS_TAG" in os.environ): - print(">>>> updating version") version_tofu = up.updateversion() else: isgit = False @@ -176,7 +173,6 @@ def get_version_tofu(path=_HERE): isgit = False if not isgit: - print(">>>> is NOT git") version_tofu = os.path.join(path, "tofu") version_tofu = os.path.join(version_tofu, "version.py") with open(version_tofu, "r") as fh: From 2af1a09ea6dca8fb01f3b31abc0f15393de8fee8 Mon Sep 17 00:00:00 2001 From: Laura Mendoza Date: Thu, 6 Feb 2020 19:23:59 +0100 Subject: [PATCH 18/18] [deploy] cleaning up changes 2 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b7742dbd8..df28fa016 100644 --- a/.travis.yml +++ b/.travis.yml @@ -64,7 +64,6 @@ install: - export IS_MASTER=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/master$" | grep -o "master") - export IS_DEPLOY=$(git ls-remote origin | grep "$TRAVIS_COMMIT\s\+refs/heads/deploy-test$" | grep -o "deploy-test") - echo $TRAVIS_COMMIT -- git ls-remote origin - echo $IS_MASTER - echo $IS_DEPLOY