From 752b9d46de6f24ef67187fcdda451ddbfcb70267 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 14:54:37 +0100 Subject: [PATCH 01/17] fix images --- README.md | 2 +- pytorch_lightning/__init__.py | 2 +- pytorch_lightning/setup_tools.py | 11 +++++------ setup.py | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 83e84f3ae7731..e6f331d154b85 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Scale your models, not the boilerplate.** ## PyTorch Lightning is just organized PyTorch Lightning disentangles PyTorch code to decouple the science from the engineering. -![PT to PL](/docs/source/_images/general/pl_quick_start_full_compressed.gif) +![PT to PL](docs/source/_images/general/pl_quick_start_full_compressed.gif) --- diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 2a73974223e2c..ca08951644c2c 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '1.1.0rc1' +__version__ = '1.1.0test0' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' diff --git a/pytorch_lightning/setup_tools.py b/pytorch_lightning/setup_tools.py index 590d2d396baa2..9c3cdf0eace1f 100644 --- a/pytorch_lightning/setup_tools.py +++ b/pytorch_lightning/setup_tools.py @@ -156,13 +156,12 @@ def _load_long_description(path_dir: str) -> str: >>> shutil.rmtree(_PATH_BADGES) """ # https://github.com/PyTorchLightning/pytorch-lightning/raw/master/docs/source/_images/lightning_module/pt_to_pl.png - url = os.path.join(__homepage__, 'raw', __version__, 'docs') - path_readme = os.path.join(path_dir, 'README.md') - text = open(path_readme, encoding='utf-8').read() + github_url = os.path.join(__homepage__, "raw", __version__,) + path_readme = os.path.join(path_dir, "README.md") + text = open(path_readme, encoding="utf-8").read() # replace relative repository path to absolute link to the release - text = text.replace('](docs', f']({url}') - # SVG images are not readable on PyPI, so replace them with PNG - text = text.replace('.svg', '.png') + # do not replace all "docs" as in the readme we reger some other sources with particular path to docs + text = text.replace("docs/source/_images/", f"{os.path.join(github_url, 'docs/source/_images/')}") # download badge and replace url with local file text = _parse_for_badge(text) return text diff --git a/setup.py b/setup.py index c548d508ab434..a0d17d3835ad8 100755 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ # the goal of the project is simplicity for researchers, don't want to add too much # engineer specific practices setup( - name="pytorch-lightning", + name="pytorch-lightning-devel", # TODO: this is just for testing on on test pipy version=pytorch_lightning.__version__, description=pytorch_lightning.__docs__, author=pytorch_lightning.__author__, From f36c3593fef54c79e189f43036104600486db702 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 14:56:56 +0100 Subject: [PATCH 02/17] not sleep --- .github/workflows/release-pypi.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index bb7665941f316..76ef88c000572 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -28,11 +28,12 @@ jobs: python setup.py sdist bdist_wheel ls -lh dist/ - - name: Delay releasing - if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' - uses: juliangruber/sleep-action@v1 - with: - time: 10m + # TODO: keep the sleep + #- name: Delay releasing + # if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + # uses: juliangruber/sleep-action@v1 + # with: + # time: 10m # We do this, since failures on test.pypi aren't that bad - name: Publish to Test PyPI From 00d4b045cd4a1134f13adf6b9bb81fea74f3f253 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 15:02:12 +0100 Subject: [PATCH 03/17] a0 --- pytorch_lightning/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index ca08951644c2c..4d01b0b3c107d 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '1.1.0test0' +__version__ = '1.1.0a0' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' From 38ee564a9c1294392852189ccea08e606d9c3bef Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 15:10:49 +0100 Subject: [PATCH 04/17] path --- pytorch_lightning/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 4d01b0b3c107d..3f8ddb287f1c6 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,11 +1,11 @@ """Root package info.""" -__version__ = '1.1.0a0' +__version__ = '1.1.0a1' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' __copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__ -__homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning' +__homepage__ = 'https://github.com/Borda/pytorch-lightning' # todo: revert this back # this has to be simple string, see: https://github.com/pypa/twine/issues/522 __docs__ = ( "PyTorch Lightning is the lightweight PyTorch wrapper for ML researchers." From aac1a683fe0c78d1faa75a2c5021664e5069d90a Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 15:38:44 +0100 Subject: [PATCH 05/17] assets --- .github/workflows/release-pypi.yml | 8 ++++++++ pytorch_lightning/__init__.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 76ef88c000572..1f0b6f362d23f 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -28,6 +28,14 @@ jobs: python setup.py sdist bdist_wheel ls -lh dist/ + - name: Upload badges + uses: actions/upload-artifact@v2 + with: + name: badges + path: docs/source/_images/badges/* + # Use always() to always run this step to publish test results when there are test failures + if: success() + # TODO: keep the sleep #- name: Delay releasing # if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 3f8ddb287f1c6..046a85b90885d 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '1.1.0a1' +__version__ = '1.1.0a2' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' From a973c63406d057100b3ccb5af084994abbf80899 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 15:48:18 +0100 Subject: [PATCH 06/17] assets --- .github/workflows/release-pypi.yml | 15 +++++++-------- pytorch_lightning/__init__.py | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 1f0b6f362d23f..0426f7a640bb0 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -31,9 +31,7 @@ jobs: - name: Upload badges uses: actions/upload-artifact@v2 with: - name: badges path: docs/source/_images/badges/* - # Use always() to always run this step to publish test results when there are test failures if: success() # TODO: keep the sleep @@ -53,9 +51,10 @@ jobs: repository_url: https://test.pypi.org/legacy/ verbose: true - - name: Publish distribution 📦 to PyPI - if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' - uses: pypa/gh-action-pypi-publish@v1.4.1 - with: - user: __token__ - password: ${{ secrets.pypi_password }} + # todo: uncomment this one + #- name: Publish distribution 📦 to PyPI + # if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + # uses: pypa/gh-action-pypi-publish@v1.4.1 + # with: + # user: __token__ + # password: ${{ secrets.pypi_password }} diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 046a85b90885d..4c7312ff78a61 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '1.1.0a2' +__version__ = '1.1.0a3' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' From 9e6c19b2c2cdee25346c9c7c01e5acd18a3d06b2 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 16:09:13 +0100 Subject: [PATCH 07/17] bitecode --- README.md | 2 ++ pytorch_lightning/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e6f331d154b85..917be197b92d1 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,8 @@ Scale your models, not the boilerplate.** ###### *Codecov is > 90%+ but build delays may show less +![Hello World](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAUCAAAAAAVAxSkAAABrUlEQVQ4y+3TPUvDQBgH8OdDOGa+oUMgk2MpdHIIgpSUiqC0OKirgxYX8QVFRQRpBRF8KShqLbgIYkUEteCgFVuqUEVxEIkvJFhae3m8S2KbSkcFBw9yHP88+eXucgH8kQZ/jSm4VDaIy9RKCpKac9NKgU4uEJNwhHhK3qvPBVO8rxRWmFXPF+NSM1KVMbwriAMwhDgVcrxeMZm85GR0PhvGJAAmyozJsbsxgNEir4iEjIK0SYqGd8sOR3rJAGN2BCEkOxhxMhpd8Mk0CXtZacxi1hr20mI/rzgnxayoidevcGuHXTC/q6QuYSMt1jC+gBIiMg12v2vb5NlklChiWnhmFZpwvxDGzuUzV8kOg+N8UUvNBp64vy9q3UN7gDXhwWLY2nMC3zRDibfsY7wjEkY79CdMZhrxSqqzxf4ZRPXwzWJirMicDa5KwiPeARygHXKNMQHEy3rMopDR20XNZGbJzUtrwDC/KshlLDWyqdmhxZzCsdYmf2fWZPoxCEDyfIvdtNQH0PRkH6Q51g8rFO3Qzxh2LbItcDCOpmuOsV7ntNaERe3v/lP/zO8yn4N+yNPrekmPAAAAAElFTkSuQmCC) + --- ## PyTorch Lightning is just organized PyTorch diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 4c7312ff78a61..c3dbdd30f0c79 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '1.1.0a3' +__version__ = '1.1.0a4' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' From 52052ee5d4b004ea63522f7b415839350387401d Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 17:37:21 +0100 Subject: [PATCH 08/17] rls --- .github/workflows/release-pypi.yml | 11 +++++++---- README.md | 2 +- pytorch_lightning/__init__.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 0426f7a640bb0..b38d51b00c931 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -28,11 +28,14 @@ jobs: python setup.py sdist bdist_wheel ls -lh dist/ - - name: Upload badges - uses: actions/upload-artifact@v2 + - name: Upload to release + uses: svenstaro/upload-release-action@v2 with: - path: docs/source/_images/badges/* - if: success() + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: docs/source/_images/badges/* + tag: ${{ github.ref }} + overwrite: true + file_glob: true # TODO: keep the sleep #- name: Delay releasing diff --git a/README.md b/README.md index 917be197b92d1..49099d669e791 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Scale your models, not the boilerplate.** ###### *Codecov is > 90%+ but build delays may show less -![Hello World](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAAAUCAAAAAAVAxSkAAABrUlEQVQ4y+3TPUvDQBgH8OdDOGa+oUMgk2MpdHIIgpSUiqC0OKirgxYX8QVFRQRpBRF8KShqLbgIYkUEteCgFVuqUEVxEIkvJFhae3m8S2KbSkcFBw9yHP88+eXucgH8kQZ/jSm4VDaIy9RKCpKac9NKgU4uEJNwhHhK3qvPBVO8rxRWmFXPF+NSM1KVMbwriAMwhDgVcrxeMZm85GR0PhvGJAAmyozJsbsxgNEir4iEjIK0SYqGd8sOR3rJAGN2BCEkOxhxMhpd8Mk0CXtZacxi1hr20mI/rzgnxayoidevcGuHXTC/q6QuYSMt1jC+gBIiMg12v2vb5NlklChiWnhmFZpwvxDGzuUzV8kOg+N8UUvNBp64vy9q3UN7gDXhwWLY2nMC3zRDibfsY7wjEkY79CdMZhrxSqqzxf4ZRPXwzWJirMicDa5KwiPeARygHXKNMQHEy3rMopDR20XNZGbJzUtrwDC/KshlLDWyqdmhxZzCsdYmf2fWZPoxCEDyfIvdtNQH0PRkH6Q51g8rFO3Qzxh2LbItcDCOpmuOsV7ntNaERe3v/lP/zO8yn4N+yNPrekmPAAAAAElFTkSuQmCC) + --- diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index c3dbdd30f0c79..d6c1a8bffdce2 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '1.1.0a4' +__version__ = '1.1.0a5' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' From 4a3686b3009b82036a8127b12ac282d8f7fccfec Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 17:46:30 +0100 Subject: [PATCH 09/17] rls --- .github/workflows/release-pypi.yml | 3 ++- pytorch_lightning/__init__.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index b38d51b00c931..0a9796a25783f 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -34,7 +34,8 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: docs/source/_images/badges/* tag: ${{ github.ref }} - overwrite: true + asset_name: badges + overwrite: false file_glob: true # TODO: keep the sleep diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index d6c1a8bffdce2..b7ea2cd6da565 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '1.1.0a5' +__version__ = '1.1.0a6' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' From 92935faf4763c7720ca07be21c5b26acdcc153e2 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 18:08:33 +0100 Subject: [PATCH 10/17] badges --- .github/workflows/release-pypi.yml | 4 +++- pytorch_lightning/__init__.py | 2 +- pytorch_lightning/setup_tools.py | 19 +++++++++++++------ 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 0a9796a25783f..81dcfce94462a 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -32,7 +32,9 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: docs/source/_images/badges/* + file: | + dist/* + docs/source/_images/badges/* tag: ${{ github.ref }} asset_name: badges overwrite: false diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index b7ea2cd6da565..3a16162b61df7 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '1.1.0a6' +__version__ = '1.1.0a7' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' diff --git a/pytorch_lightning/setup_tools.py b/pytorch_lightning/setup_tools.py index 9c3cdf0eace1f..e3e522dd1bed7 100644 --- a/pytorch_lightning/setup_tools.py +++ b/pytorch_lightning/setup_tools.py @@ -59,7 +59,7 @@ def _load_requirements(path_dir: str , file_name: str = 'requirements.txt', comm return reqs -def _parse_for_badge(text: str, path_badges: str = _PATH_BADGES, badge_names: Iterable = _DEFAULT_BADGES) -> str: +def _parse_for_badge(text: str, release_url: str = None, path_badges: str = _PATH_BADGES, badge_names: Iterable = _DEFAULT_BADGES) -> str: """ Returns the new parsed text with url change with local downloaded files >>> _parse_for_badge('Some text here... ' # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE @@ -83,10 +83,14 @@ def _parse_for_badge(text: str, path_badges: str = _PATH_BADGES, badge_names: It continue # download badge - saved_badge_name = _download_badge(badge_url, badge_name, path_badges) + badge_path = _download_badge(badge_url, badge_name, path_badges) + if release_url: + # https://github.com/Borda/pytorch-lightning/releases/download/1.1.0a6/codecov_badge.png + badge_fname = os.path.basename(badge_path) + badge_path = os.path.join(release_url, badge_fname) # replace url with local file path - text = text.replace(f'[![{badge_name}]({badge_url})]', f'[![{badge_name}]({saved_badge_name})]') + text = text.replace(f'[![{badge_name}]({badge_url})]', f'[![{badge_name}]({badge_path})]') return text @@ -156,12 +160,15 @@ def _load_long_description(path_dir: str) -> str: >>> shutil.rmtree(_PATH_BADGES) """ # https://github.com/PyTorchLightning/pytorch-lightning/raw/master/docs/source/_images/lightning_module/pt_to_pl.png - github_url = os.path.join(__homepage__, "raw", __version__,) + github_source_url = os.path.join(__homepage__, "raw", __version__) path_readme = os.path.join(path_dir, "README.md") text = open(path_readme, encoding="utf-8").read() # replace relative repository path to absolute link to the release # do not replace all "docs" as in the readme we reger some other sources with particular path to docs - text = text.replace("docs/source/_images/", f"{os.path.join(github_url, 'docs/source/_images/')}") + text = text.replace("docs/source/_images/", f"{os.path.join(github_source_url, 'docs/source/_images/')}") + + # https://github.com/Borda/pytorch-lightning/releases/download/1.1.0a6/codecov_badge.png + github_release_url = os.path.join(__homepage__, "releases", "download", __version__) # download badge and replace url with local file - text = _parse_for_badge(text) + text = _parse_for_badge(text, github_release_url) return text From db03ceee1acf76d65cf78f7906c48c3c2e997c68 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 18:15:39 +0100 Subject: [PATCH 11/17] fix --- .github/workflows/release-pypi.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 81dcfce94462a..0a9796a25783f 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -32,9 +32,7 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: | - dist/* - docs/source/_images/badges/* + file: docs/source/_images/badges/* tag: ${{ github.ref }} asset_name: badges overwrite: false From 6a0d74fb426ca7703b3458cd5d9c5dbb58b77817 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 19:09:36 +0100 Subject: [PATCH 12/17] org --- README.md | 14 ++++++-------- pytorch_lightning/setup_tools.py | 13 +++++++++---- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 49099d669e791..a5c6bbb244730 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,6 @@ Scale your models, not the boilerplate.** ###### *Codecov is > 90%+ but build delays may show less - - --- ## PyTorch Lightning is just organized PyTorch @@ -93,12 +91,12 @@ Lightning can automatically export to ONNX or TorchScript for those cases. | System / PyTorch ver. | 1.3 (min. req.)* | 1.4 | 1.5 | 1.6 | 1.7 (latest) | 1.8 (nightly) | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | -| Conda py3.7 [linux] | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | -| Linux py3.7 [GPUs**] | - | - | - | [![Build Status](http://104.154.220.231/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://104.154.220.231/PyTorchLightning/pytorch-lightning) | - | - | -| Linux py3.{6,7} [TPUs***] | - | - | - | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | - | -| Linux py3.{6,7} | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | -| OSX py3.{6,7,8} | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | -| Windows py3.{6,7,8} | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | +| Conda py3.7 [linux] | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [![PyTorch & Conda](https://github.com/PyTorchLightning/pytorch-lightning/workflows/PyTorch%20&%20Conda/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | +| Linux py3.7 [GPUs**] | - | - | - | [![GPUs Status](http://104.154.220.231/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://104.154.220.231/PyTorchLightning/pytorch-lightning) | - | - | +| Linux py3.{6,7} [TPUs***] | - | - | - | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | [![TPU tests](https://github.com/PyTorchLightning/pytorch-lightning/workflows/TPU%20tests/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | - | +| Linux py3.{6,7} | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | +| OSX py3.{6,7,8} | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | +| Windows py3.{6,7,8} | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [![CI complete testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20complete%20testing/badge.svg?branch=master&event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - _\* `torch>=1.4` is the minimal pytorch version for Python 3.8_ - _\** tests run on two NVIDIA K80_ diff --git a/pytorch_lightning/setup_tools.py b/pytorch_lightning/setup_tools.py index e3e522dd1bed7..974f69b8c2efd 100644 --- a/pytorch_lightning/setup_tools.py +++ b/pytorch_lightning/setup_tools.py @@ -167,8 +167,13 @@ def _load_long_description(path_dir: str) -> str: # do not replace all "docs" as in the readme we reger some other sources with particular path to docs text = text.replace("docs/source/_images/", f"{os.path.join(github_source_url, 'docs/source/_images/')}") - # https://github.com/Borda/pytorch-lightning/releases/download/1.1.0a6/codecov_badge.png - github_release_url = os.path.join(__homepage__, "releases", "download", __version__) - # download badge and replace url with local file - text = _parse_for_badge(text, github_release_url) + # readthedocs badges + text = text.replace('badge/?version=stable', f'badge/?version={__version__}') + # replace github badges for release ones + text = text.replace('badge.svg?branch=master&event=push', f'badge.svg?branch={__version__}&event=release') + + # # https://github.com/Borda/pytorch-lightning/releases/download/1.1.0a6/codecov_badge.png + # github_release_url = os.path.join(__homepage__, "releases", "download", __version__) + # # download badge and replace url with local file + # text = _parse_for_badge(text, github_release_url) return text From 09f0c4c2a90bc043da1731e022490c862d88bdc8 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 19:14:05 +0100 Subject: [PATCH 13/17] drop --- .github/workflows/release-pypi.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 0a9796a25783f..6c15155ed318e 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -32,18 +32,17 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: docs/source/_images/badges/* + file: dist/* tag: ${{ github.ref }} asset_name: badges overwrite: false file_glob: true - # TODO: keep the sleep - #- name: Delay releasing - # if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' - # uses: juliangruber/sleep-action@v1 - # with: - # time: 10m + - name: Delay releasing + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + uses: juliangruber/sleep-action@v1 + with: + time: 10m # We do this, since failures on test.pypi aren't that bad - name: Publish to Test PyPI @@ -55,10 +54,9 @@ jobs: repository_url: https://test.pypi.org/legacy/ verbose: true - # todo: uncomment this one - #- name: Publish distribution 📦 to PyPI - # if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' - # uses: pypa/gh-action-pypi-publish@v1.4.1 - # with: - # user: __token__ - # password: ${{ secrets.pypi_password }} + - name: Publish distribution 📦 to PyPI + if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' + uses: pypa/gh-action-pypi-publish@v1.4.1 + with: + user: __token__ + password: ${{ secrets.pypi_password }} From 197cfb26964f5f0c9df4a3b3593be925ccb96727 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 19:20:04 +0100 Subject: [PATCH 14/17] clean --- .github/workflows/release-pypi.yml | 2 +- pytorch_lightning/__init__.py | 4 ++-- setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index 6c15155ed318e..a102da6cbf6eb 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -34,7 +34,7 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: dist/* tag: ${{ github.ref }} - asset_name: badges + asset_name: packages overwrite: false file_glob: true diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 3a16162b61df7..2a73974223e2c 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,11 +1,11 @@ """Root package info.""" -__version__ = '1.1.0a7' +__version__ = '1.1.0rc1' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' __copyright__ = 'Copyright (c) 2018-2020, %s.' % __author__ -__homepage__ = 'https://github.com/Borda/pytorch-lightning' # todo: revert this back +__homepage__ = 'https://github.com/PyTorchLightning/pytorch-lightning' # this has to be simple string, see: https://github.com/pypa/twine/issues/522 __docs__ = ( "PyTorch Lightning is the lightweight PyTorch wrapper for ML researchers." diff --git a/setup.py b/setup.py index a0d17d3835ad8..c548d508ab434 100755 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ # the goal of the project is simplicity for researchers, don't want to add too much # engineer specific practices setup( - name="pytorch-lightning-devel", # TODO: this is just for testing on on test pipy + name="pytorch-lightning", version=pytorch_lightning.__version__, description=pytorch_lightning.__docs__, author=pytorch_lightning.__author__, From fc814a2742cebf8075c1b06f92f5adfcd701898c Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 19:27:47 +0100 Subject: [PATCH 15/17] codecov --- pytorch_lightning/setup_tools.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pytorch_lightning/setup_tools.py b/pytorch_lightning/setup_tools.py index 974f69b8c2efd..789fec8102b54 100644 --- a/pytorch_lightning/setup_tools.py +++ b/pytorch_lightning/setup_tools.py @@ -159,16 +159,19 @@ def _load_long_description(path_dir: str) -> str: >>> import shutil >>> shutil.rmtree(_PATH_BADGES) """ - # https://github.com/PyTorchLightning/pytorch-lightning/raw/master/docs/source/_images/lightning_module/pt_to_pl.png - github_source_url = os.path.join(__homepage__, "raw", __version__) path_readme = os.path.join(path_dir, "README.md") text = open(path_readme, encoding="utf-8").read() + + # https://github.com/PyTorchLightning/pytorch-lightning/raw/master/docs/source/_images/lightning_module/pt_to_pl.png + github_source_url = os.path.join(__homepage__, "raw", __version__) # replace relative repository path to absolute link to the release # do not replace all "docs" as in the readme we reger some other sources with particular path to docs text = text.replace("docs/source/_images/", f"{os.path.join(github_source_url, 'docs/source/_images/')}") - # readthedocs badges + # readthedocs badge text = text.replace('badge/?version=stable', f'badge/?version={__version__}') + # codecov badge + text = text.replace('/branch/master/graph/badge.svg', f'/release/{__version__}/graph/badge.svg') # replace github badges for release ones text = text.replace('badge.svg?branch=master&event=push', f'badge.svg?branch={__version__}&event=release') From 18db47ee05d637cd9221fffcd7ced9e7385aca79 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 19:40:18 +0100 Subject: [PATCH 16/17] fix --- pytorch_lightning/setup_tools.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pytorch_lightning/setup_tools.py b/pytorch_lightning/setup_tools.py index 789fec8102b54..071ec050ceac2 100644 --- a/pytorch_lightning/setup_tools.py +++ b/pytorch_lightning/setup_tools.py @@ -24,9 +24,6 @@ _PATH_BADGES = os.path.join('.', 'docs', 'source', '_images', 'badges') # badge to download _DEFAULT_BADGES = [ - 'PyPI - Python Version', - 'PyPI Status', - 'PyPI Status', 'Conda', 'DockerHub', 'codecov', @@ -34,7 +31,6 @@ 'Slack', 'Discourse status', 'license', - 'Next Release' ] @@ -59,14 +55,19 @@ def _load_requirements(path_dir: str , file_name: str = 'requirements.txt', comm return reqs -def _parse_for_badge(text: str, release_url: str = None, path_badges: str = _PATH_BADGES, badge_names: Iterable = _DEFAULT_BADGES) -> str: +def _parse_for_badge( + text: str, + release_url: str = None, + path_badges: str = _PATH_BADGES, + badge_names: Iterable = _DEFAULT_BADGES, +) -> str: """ Returns the new parsed text with url change with local downloaded files >>> _parse_for_badge('Some text here... ' # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE - ... '[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytorch-lightning)]' - ... '(https://pypi.org/project/pytorch-lightning/) and another text later') + ... '[![Conda](https://img.shields.io/conda/v/conda-forge/pytorch-lightning?label=conda)]' + ... '(https://anaconda.org/conda-forge/pytorch-lightning) and another text later') 'Some text here... - [![PyPI - Python Version](...docs...source..._images...badges...PyPI_Python_Version_badge.png)](https://pypi.org/project/pytorch-lightning/) + [![Conda](...docs...source..._images...badges...Conda_badge.svg)](https://anaconda.org/conda-forge/pytorch-lightning) and another text later' >>> import shutil >>> shutil.rmtree(_PATH_BADGES) @@ -156,8 +157,6 @@ def _load_long_description(path_dir: str) -> str: >>> _load_long_description(PROJECT_ROOT) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE '
...' - >>> import shutil - >>> shutil.rmtree(_PATH_BADGES) """ path_readme = os.path.join(path_dir, "README.md") text = open(path_readme, encoding="utf-8").read() From 46b4a13ce2f0eb7897ac4d0d838d1377a03eea46 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 7 Dec 2020 22:00:10 +0100 Subject: [PATCH 17/17] clean --- MANIFEST.in | 1 - 1 file changed, 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index c88d81243d9df..8db3912027d6d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -42,7 +42,6 @@ exclude tests recursive-exclude docs * exclude docs recursive-include docs/source/_images/logos/ * -recursive-include docs/source/_images/badges/ * recursive-include docs/source/_images/general/ pl_overview* tf_* tutorial_* PTL101_* # Include the Requirements