Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use tenacity, move run_codecov.py out of view #171

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions bin/run_codecov.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""Workaround for https://github.com/codecov/codecov-python/issues/158."""
# std imports
import sys

# 3rd party
import codecov
import tenacity

@tenacity.retry(wait=tenacity.wait_random(min=1, max=5),
stop=tenacity.stop_after_delay(60))
def main():
codecov.main(sys.argv[1:])


if __name__ == '__main__':
main()
47 changes: 0 additions & 47 deletions run_codecov.py

This file was deleted.

5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import_heading_firstparty = local
import_heading_localfolder = local
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
no_lines_before=LOCALFOLDER
known_third_party = jinxed
known_third_party = jinxed,codecov,tenacity
atomic = true

[flake8]
Expand Down Expand Up @@ -214,9 +214,10 @@ commands = {envbindir}/sphinx-build -v -W -d {toxinidir}/docs/_build/doctrees -b
basepython = python{env:TOXPYTHON:{env:TRAVIS_PYTHON_VERSION:3.8}}
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
deps = codecov>=1.4.0
tenacity==6.1.0
# commands = codecov -e TOXENV
# Workaround for https://github.com/codecov/codecov-python/issues/158
commands = {envpython} run_codecov.py -e TOXENV
commands = {envpython} bin/run_codecov.py --required -e TOXENV

[testenv:publish_static]
# Synchronize the artifacts in docs/_static/ with https://dxtz6bzwq9sxx.cloudfront.net/
Expand Down