From f1bc4fd7b4b48dea239892a2f07462bdce81e7c1 Mon Sep 17 00:00:00 2001 From: thouska Date: Mon, 7 Sep 2020 13:05:09 +0200 Subject: [PATCH 1/7] Test upload on testpypi --- .travis.yml | 17 ++++++++++++++--- setup.py | 2 ++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2144899a..66560d89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,8 +31,19 @@ install: script: - - py.test tests/test_* --cov spotpy --cov-report term-missing -v + - py.test tests/test_* --cov spotpy --cov-report term-missing -v # - mpirun -c 4 python spotpy/examples/tutorial_parallel_computing_hymod.py 100 - pip uninstall spotpy -y -after_success: - - coveralls + +jobs: + include: + - stage: Coveralls + name: Report Coveralls + after_success: python3 -m coveralls + + # Test Deploy source distribution + - stage: deploy + name: PyPi Test Deploy + script: python3 setup.py sdist --formats=gztar bdist_wheel + after_success: + - python3 -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/* \ No newline at end of file diff --git a/setup.py b/setup.py index 728f6be6..b2fe2a8b 100644 --- a/setup.py +++ b/setup.py @@ -13,6 +13,8 @@ author_email = 'tobias.houska@umwelt.uni-giessen.de', url = 'https://spotpy.readthedocs.io/en/latest/', license = 'MIT', + install_requires=[ + 'scipy', 'numpy', 'random', 'time', 'math', 'copy', 'threading', 'logging'], packages=find_packages(exclude=["tests*", "docs*"]), use_2to3 = True, keywords = 'Monte Carlo, MCMC, MLE, SCE-UA, Simulated Annealing, DE-MCz, DREAM, ROPE, Artifical Bee Colony, DDS, PA-DDS, Uncertainty, Calibration, Model, Signatures', From 2ddcc72854ac79fc98d200511c9a90e0df314880 Mon Sep 17 00:00:00 2001 From: thouska Date: Mon, 7 Sep 2020 13:15:18 +0200 Subject: [PATCH 2/7] Removed unecessarry module from pre-install --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b2fe2a8b..a751b762 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ url = 'https://spotpy.readthedocs.io/en/latest/', license = 'MIT', install_requires=[ - 'scipy', 'numpy', 'random', 'time', 'math', 'copy', 'threading', 'logging'], + 'scipy', 'numpy', 'random', 'time', 'math', 'copy', 'logging'], packages=find_packages(exclude=["tests*", "docs*"]), use_2to3 = True, keywords = 'Monte Carlo, MCMC, MLE, SCE-UA, Simulated Annealing, DE-MCz, DREAM, ROPE, Artifical Bee Colony, DDS, PA-DDS, Uncertainty, Calibration, Model, Signatures', From a02e532e7657d82484231d3058b927d7e2546e55 Mon Sep 17 00:00:00 2001 From: thouska Date: Mon, 7 Sep 2020 13:21:41 +0200 Subject: [PATCH 3/7] Further cleanding of pre-install requirements --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a751b762..1c3a7b17 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ url = 'https://spotpy.readthedocs.io/en/latest/', license = 'MIT', install_requires=[ - 'scipy', 'numpy', 'random', 'time', 'math', 'copy', 'logging'], + 'scipy', 'numpy', 'logging'], packages=find_packages(exclude=["tests*", "docs*"]), use_2to3 = True, keywords = 'Monte Carlo, MCMC, MLE, SCE-UA, Simulated Annealing, DE-MCz, DREAM, ROPE, Artifical Bee Colony, DDS, PA-DDS, Uncertainty, Calibration, Model, Signatures', From e76384bdcfdd1ccb7e58f4fbf89772fa2f45b1b2 Mon Sep 17 00:00:00 2001 From: thouska Date: Mon, 7 Sep 2020 14:40:04 +0200 Subject: [PATCH 4/7] Enable taged deployment with travis --- .travis.yml | 24 ++++++++++++++++++------ setup.py | 5 +++++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 66560d89..aa79a230 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,9 @@ python: - "3.7" # - "3.8" #Errors on Travis, build times out because no output was received... +# Uses cache to build faster +cache: pip + # this ubuntu distribution has sure the libopenmpi-dev packages available dist: bionic @@ -41,9 +44,18 @@ jobs: name: Report Coveralls after_success: python3 -m coveralls - # Test Deploy source distribution - - stage: deploy - name: PyPi Test Deploy - script: python3 setup.py sdist --formats=gztar bdist_wheel - after_success: - - python3 -m twine upload --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/* \ No newline at end of file +# Publish spotpy on PyPi if taged +deploy: + # If you need to deploy files Travis has built, use the next line + skip_cleanup: true + provider: pypi + distributions: sdist bdist_wheel gztar + on: + # In this case I want to deploy only when a tag is present... + tags: true + # ... and when tag is on master and respects the form "v0.0.0" + branch: + - master + - /v?(\d+\.)?(\d+\.)?(\*|\d+)$/ + user: thouska + password : ${deploying} \ No newline at end of file diff --git a/setup.py b/setup.py index 1c3a7b17..ef554167 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,15 @@ from setuptools import setup, find_packages import os +# Type of python distribution +[bdist_wheel] +universal=0 + setup( name = 'spotpy', version = '1.5.11', description = 'A Statistical Parameter Optimization Tool', + description-file = README.rst long_description=open(os.path.join(os.path.dirname(__file__), "README.rst")).read(), author = 'Tobias Houska, Philipp Kraft, Alejandro Chamorro-Chavez and Lutz Breuer', From c644da407f3a90f63c24f82d511db9c63da7bef9 Mon Sep 17 00:00:00 2001 From: thouska Date: Mon, 7 Sep 2020 14:45:19 +0200 Subject: [PATCH 5/7] Fix string --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index ef554167..731312fa 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ name = 'spotpy', version = '1.5.11', description = 'A Statistical Parameter Optimization Tool', - description-file = README.rst + description-file = 'README.rst', long_description=open(os.path.join(os.path.dirname(__file__), "README.rst")).read(), author = 'Tobias Houska, Philipp Kraft, Alejandro Chamorro-Chavez and Lutz Breuer', From 260c3ca66c5df3bbfb4c2001008b17602f76dfad Mon Sep 17 00:00:00 2001 From: thouska Date: Mon, 7 Sep 2020 14:48:32 +0200 Subject: [PATCH 6/7] Skipping description-file --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 731312fa..0396ad68 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,6 @@ name = 'spotpy', version = '1.5.11', description = 'A Statistical Parameter Optimization Tool', - description-file = 'README.rst', long_description=open(os.path.join(os.path.dirname(__file__), "README.rst")).read(), author = 'Tobias Houska, Philipp Kraft, Alejandro Chamorro-Chavez and Lutz Breuer', From acf63adc560a693145856bc800f1d4afb79a2dcd Mon Sep 17 00:00:00 2001 From: thouska Date: Mon, 7 Sep 2020 14:51:45 +0200 Subject: [PATCH 7/7] Remove specified pypi build --- setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.py b/setup.py index 0396ad68..1c3a7b17 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,6 @@ from setuptools import setup, find_packages import os -# Type of python distribution -[bdist_wheel] -universal=0 - setup( name = 'spotpy', version = '1.5.11',