diff --git a/.github/workflows/release-pypi.yml b/.github/workflows/release-pypi.yml index bb7665941f316..a102da6cbf6eb 100644 --- a/.github/workflows/release-pypi.yml +++ b/.github/workflows/release-pypi.yml @@ -28,6 +28,16 @@ jobs: python setup.py sdist bdist_wheel ls -lh dist/ + - name: Upload to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: dist/* + tag: ${{ github.ref }} + asset_name: packages + overwrite: false + file_glob: true + - name: Delay releasing if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release' uses: juliangruber/sleep-action@v1 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 diff --git a/README.md b/README.md index 83e84f3ae7731..a5c6bbb244730 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. - + --- @@ -91,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] | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | -| Linux py3.7 [GPUs**] | - | - | - | [](http://104.154.220.231/PyTorchLightning/pytorch-lightning) | - | - | -| Linux py3.{6,7} [TPUs***] | - | - | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | - | -| Linux py3.{6,7} | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | -| OSX py3.{6,7,8} | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | -| Windows py3.{6,7,8} | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | +| Conda py3.7 [linux] | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22PyTorch+%26+Conda%22+branch%3Amaster) | +| Linux py3.7 [GPUs**] | - | - | - | [](http://104.154.220.231/PyTorchLightning/pytorch-lightning) | - | - | +| Linux py3.{6,7} [TPUs***] | - | - | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22TPU+tests%22+branch%3Amaster) | - | +| Linux py3.{6,7} | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | +| OSX py3.{6,7,8} | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | +| Windows py3.{6,7,8} | [](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | - | [](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 590d2d396baa2..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, 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 - ... '[]' - ... '(https://pypi.org/project/pytorch-lightning/) and another text later') + ... '[]' + ... '(https://anaconda.org/conda-forge/pytorch-lightning) and another text later') 'Some text here... - [](https://pypi.org/project/pytorch-lightning/) + [](https://anaconda.org/conda-forge/pytorch-lightning) and another text later' >>> import shutil >>> shutil.rmtree(_PATH_BADGES) @@ -83,10 +84,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'[]', f'[]') + text = text.replace(f'[]', f'[]') return text @@ -152,17 +157,25 @@ def _load_long_description(path_dir: str) -> str: >>> _load_long_description(PROJECT_ROOT) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE '