MLBazaar / BTB

A simple, extensible library for developing AutoML systems
https://mlbazaar.github.io/BTB/
MIT License
172 stars 41 forks source link

Confirm Travis PyPI deployment works #103

Closed micahjsmith closed 5 years ago

micahjsmith commented 5 years ago

Travis erroring out on tag builds that are supposed to be deployed to PyPI. Example: https://travis-ci.org/HDI-Project/BTB/jobs/454809090

I believe error is due to incorrect use of travis encrypt for the PyPI password. I believe I fixed it in decd2a8 but need to confirm on next tag that it is fixed.

If error recurs, can manually release by git checkout vX.Y.Z && make release.

Log snippet follows:

Deploying application
running sdist
running egg_info
creating baytune.egg-info
writing baytune.egg-info/PKG-INFO
writing dependency_links to baytune.egg-info/dependency_links.txt
writing requirements to baytune.egg-info/requires.txt
writing top-level names to baytune.egg-info/top_level.txt
writing manifest file 'baytune.egg-info/SOURCES.txt'
reading manifest file 'baytune.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '__pycache__' found under directory '*'
warning: no previously-included files matching '*.py[co]' found under directory '*'
warning: no files found matching '*.jpg' under directory 'docs'
warning: no files found matching '*.gif' under directory 'docs'
writing manifest file 'baytune.egg-info/SOURCES.txt'
running check
creating baytune-0.2.3
creating baytune-0.2.3/baytune.egg-info
creating baytune-0.2.3/btb
creating baytune-0.2.3/btb/recommendation
creating baytune-0.2.3/btb/selection
creating baytune-0.2.3/btb/tuning
creating baytune-0.2.3/docs
creating baytune-0.2.3/docs/_static
creating baytune-0.2.3/tests
creating baytune-0.2.3/tests/btb
creating baytune-0.2.3/tests/btb/recommendation
creating baytune-0.2.3/tests/btb/selection
creating baytune-0.2.3/tests/btb/tuning
copying files to baytune-0.2.3...
copying AUTHORS.rst -> baytune-0.2.3
copying CONTRIBUTING.rst -> baytune-0.2.3
copying HISTORY.md -> baytune-0.2.3
copying LICENSE -> baytune-0.2.3
copying MANIFEST.in -> baytune-0.2.3
copying README.md -> baytune-0.2.3
copying setup.cfg -> baytune-0.2.3
copying setup.py -> baytune-0.2.3
copying baytune.egg-info/PKG-INFO -> baytune-0.2.3/baytune.egg-info
copying baytune.egg-info/SOURCES.txt -> baytune-0.2.3/baytune.egg-info
copying baytune.egg-info/dependency_links.txt -> baytune-0.2.3/baytune.egg-info
copying baytune.egg-info/not-zip-safe -> baytune-0.2.3/baytune.egg-info
copying baytune.egg-info/requires.txt -> baytune-0.2.3/baytune.egg-info
copying baytune.egg-info/top_level.txt -> baytune-0.2.3/baytune.egg-info
copying btb/__init__.py -> baytune-0.2.3/btb
copying btb/hyper_parameter.py -> baytune-0.2.3/btb
copying btb/recommendation/__init__.py -> baytune-0.2.3/btb/recommendation
copying btb/recommendation/matrix_factorization.py -> baytune-0.2.3/btb/recommendation
copying btb/recommendation/recommender.py -> baytune-0.2.3/btb/recommendation
copying btb/recommendation/uniform.py -> baytune-0.2.3/btb/recommendation
copying btb/selection/__init__.py -> baytune-0.2.3/btb/selection
copying btb/selection/best.py -> baytune-0.2.3/btb/selection
copying btb/selection/constants.py -> baytune-0.2.3/btb/selection
copying btb/selection/custom_selector.py -> baytune-0.2.3/btb/selection
copying btb/selection/hierarchical.py -> baytune-0.2.3/btb/selection
copying btb/selection/pure.py -> baytune-0.2.3/btb/selection
copying btb/selection/recent.py -> baytune-0.2.3/btb/selection
copying btb/selection/selector.py -> baytune-0.2.3/btb/selection
copying btb/selection/ucb1.py -> baytune-0.2.3/btb/selection
copying btb/selection/uniform.py -> baytune-0.2.3/btb/selection
copying btb/tuning/__init__.py -> baytune-0.2.3/btb/tuning
copying btb/tuning/constants.py -> baytune-0.2.3/btb/tuning
copying btb/tuning/custom_tuner.py -> baytune-0.2.3/btb/tuning
copying btb/tuning/gcp.py -> baytune-0.2.3/btb/tuning
copying btb/tuning/gp.py -> baytune-0.2.3/btb/tuning
copying btb/tuning/tuner.py -> baytune-0.2.3/btb/tuning
copying btb/tuning/uniform.py -> baytune-0.2.3/btb/tuning
copying docs/Makefile -> baytune-0.2.3/docs
copying docs/api_reference.rst -> baytune-0.2.3/docs
copying docs/authors.rst -> baytune-0.2.3/docs
copying docs/conf.py -> baytune-0.2.3/docs
copying docs/contributing.rst -> baytune-0.2.3/docs
copying docs/history.rst -> baytune-0.2.3/docs
copying docs/index.rst -> baytune-0.2.3/docs
copying docs/make.bat -> baytune-0.2.3/docs
copying docs/readme.rst -> baytune-0.2.3/docs
copying docs/recommenders.md -> baytune-0.2.3/docs
copying docs/selectors.md -> baytune-0.2.3/docs
copying docs/tuners.md -> baytune-0.2.3/docs
copying docs/_static/BTB-Icon-small.png -> baytune-0.2.3/docs/_static
copying tests/__init__.py -> baytune-0.2.3/tests
copying tests/btb/__init__.py -> baytune-0.2.3/tests/btb
copying tests/btb/test_hyper_parameter.py -> baytune-0.2.3/tests/btb
copying tests/btb/recommendation/test_matrix_factorization_recommender.py -> baytune-0.2.3/tests/btb/recommendation
copying tests/btb/recommendation/test_recommender.py -> baytune-0.2.3/tests/btb/recommendation
copying tests/btb/recommendation/test_uniform_recommender.py -> baytune-0.2.3/tests/btb/recommendation
copying tests/btb/selection/__init__.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_best.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_constants.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_custom_selector.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_hierarchical.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_pure.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_recent.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_selector.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_ucb1.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/selection/test_uniform.py -> baytune-0.2.3/tests/btb/selection
copying tests/btb/tuning/__init__.py -> baytune-0.2.3/tests/btb/tuning
copying tests/btb/tuning/test_custom_tuner.py -> baytune-0.2.3/tests/btb/tuning
copying tests/btb/tuning/test_gp.py -> baytune-0.2.3/tests/btb/tuning
copying tests/btb/tuning/test_tuner.py -> baytune-0.2.3/tests/btb/tuning
copying tests/btb/tuning/test_uniform.py -> baytune-0.2.3/tests/btb/tuning
Writing baytune-0.2.3/setup.cfg
creating dist
Creating tar archive
removing 'baytune-0.2.3' (and everything under it)
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/btb
copying btb/__init__.py -> build/lib/btb
copying btb/hyper_parameter.py -> build/lib/btb
creating build/lib/btb/recommendation
copying btb/recommendation/uniform.py -> build/lib/btb/recommendation
copying btb/recommendation/matrix_factorization.py -> build/lib/btb/recommendation
copying btb/recommendation/__init__.py -> build/lib/btb/recommendation
copying btb/recommendation/recommender.py -> build/lib/btb/recommendation
creating build/lib/btb/tuning
copying btb/tuning/uniform.py -> build/lib/btb/tuning
copying btb/tuning/custom_tuner.py -> build/lib/btb/tuning
copying btb/tuning/tuner.py -> build/lib/btb/tuning
copying btb/tuning/constants.py -> build/lib/btb/tuning
copying btb/tuning/gp.py -> build/lib/btb/tuning
copying btb/tuning/__init__.py -> build/lib/btb/tuning
copying btb/tuning/gcp.py -> build/lib/btb/tuning
creating build/lib/btb/selection
copying btb/selection/uniform.py -> build/lib/btb/selection
copying btb/selection/best.py -> build/lib/btb/selection
copying btb/selection/constants.py -> build/lib/btb/selection
copying btb/selection/custom_selector.py -> build/lib/btb/selection
copying btb/selection/selector.py -> build/lib/btb/selection
copying btb/selection/__init__.py -> build/lib/btb/selection
copying btb/selection/hierarchical.py -> build/lib/btb/selection
copying btb/selection/recent.py -> build/lib/btb/selection
copying btb/selection/pure.py -> build/lib/btb/selection
copying btb/selection/ucb1.py -> build/lib/btb/selection
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/btb
creating build/bdist.linux-x86_64/wheel/btb/recommendation
copying build/lib/btb/recommendation/uniform.py -> build/bdist.linux-x86_64/wheel/btb/recommendation
copying build/lib/btb/recommendation/matrix_factorization.py -> build/bdist.linux-x86_64/wheel/btb/recommendation
copying build/lib/btb/recommendation/__init__.py -> build/bdist.linux-x86_64/wheel/btb/recommendation
copying build/lib/btb/recommendation/recommender.py -> build/bdist.linux-x86_64/wheel/btb/recommendation
copying build/lib/btb/__init__.py -> build/bdist.linux-x86_64/wheel/btb
creating build/bdist.linux-x86_64/wheel/btb/tuning
copying build/lib/btb/tuning/uniform.py -> build/bdist.linux-x86_64/wheel/btb/tuning
copying build/lib/btb/tuning/custom_tuner.py -> build/bdist.linux-x86_64/wheel/btb/tuning
copying build/lib/btb/tuning/tuner.py -> build/bdist.linux-x86_64/wheel/btb/tuning
copying build/lib/btb/tuning/constants.py -> build/bdist.linux-x86_64/wheel/btb/tuning
copying build/lib/btb/tuning/gp.py -> build/bdist.linux-x86_64/wheel/btb/tuning
copying build/lib/btb/tuning/__init__.py -> build/bdist.linux-x86_64/wheel/btb/tuning
copying build/lib/btb/tuning/gcp.py -> build/bdist.linux-x86_64/wheel/btb/tuning
creating build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/uniform.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/best.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/constants.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/custom_selector.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/selector.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/__init__.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/hierarchical.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/recent.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/pure.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/selection/ucb1.py -> build/bdist.linux-x86_64/wheel/btb/selection
copying build/lib/btb/hyper_parameter.py -> build/bdist.linux-x86_64/wheel/btb
running install_egg_info
Copying baytune.egg-info to build/bdist.linux-x86_64/wheel/baytune-0.2.3-py3.6.egg-info
running install_scripts
adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
adding license file "AUTHORS.rst" (matched pattern "AUTHORS*")
creating build/bdist.linux-x86_64/wheel/baytune-0.2.3.dist-info/WHEEL
creating 'dist/baytune-0.2.3-py2.py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'btb/__init__.py'
adding 'btb/hyper_parameter.py'
adding 'btb/recommendation/__init__.py'
adding 'btb/recommendation/matrix_factorization.py'
adding 'btb/recommendation/recommender.py'
adding 'btb/recommendation/uniform.py'
adding 'btb/selection/__init__.py'
adding 'btb/selection/best.py'
adding 'btb/selection/constants.py'
adding 'btb/selection/custom_selector.py'
adding 'btb/selection/hierarchical.py'
adding 'btb/selection/pure.py'
adding 'btb/selection/recent.py'
adding 'btb/selection/selector.py'
adding 'btb/selection/ucb1.py'
adding 'btb/selection/uniform.py'
adding 'btb/tuning/__init__.py'
adding 'btb/tuning/constants.py'
adding 'btb/tuning/custom_tuner.py'
adding 'btb/tuning/gcp.py'
adding 'btb/tuning/gp.py'
adding 'btb/tuning/tuner.py'
adding 'btb/tuning/uniform.py'
adding 'baytune-0.2.3.dist-info/AUTHORS.rst'
adding 'baytune-0.2.3.dist-info/LICENSE'
adding 'baytune-0.2.3.dist-info/METADATA'
adding 'baytune-0.2.3.dist-info/WHEEL'
adding 'baytune-0.2.3.dist-info/top_level.txt'
adding 'baytune-0.2.3.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Uploading distributions to https://upload.pypi.org/legacy/
Uploading baytune-0.2.3-py2.py3-none-any.whl
100%|██████████| 38.5k/38.5k [00:00<00:00, 191kB/s] 
NOTE: Try --verbose to see response content.
HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/
csala commented 5 years ago

@micahjsmith I think that it's safer to not use the travis auto-deployment and do the releases manually using a make target.

If you agreed on this, I would open an issue to update the Makefile with the latest changes from our cookiecutter template, so that making a releases becomes as easy as a make release + inputting the PyPi password.

micahjsmith commented 5 years ago

Can you explain why you think it is safer? My opinion is automated solutions are almost always safer because they reduce the risk of human error and take the burden off the programmer to follow strict procedures. I have used automated PyPI deployment for several other packages without problems.

csala commented 5 years ago

I think it's safer because of two things:

  1. Only people who have the password can actually execute a release
  2. Executing the make release command is not final, since it stops at the password prompt.

In the automated fashion, if someone (e.g. a confused student) mistakenly runs the make release target and pushes a tag to github, travis will make a release on its own without asking for confirmation, and this cannot be reverted on PyPi.

csala commented 5 years ago

I confirm that this continues to fail :-(

Here is the log of the latest build, which failed: https://travis-ci.org/HDI-Project/BTB/jobs/482562504

I'll make now the release manually.

I also opened an issue to import the latest changes from the DAI-Lab cookiecutter project (#110), which include the release steps in the Makefile target, for if we want to end up switching to manual release.

micahjsmith commented 5 years ago

It continues not to work and its not worth investigating further, we will do manual releases