Skip to content

Commit 57e20db

Browse files
Bordatullie
authored andcommitted
fix missing images on pypi (Lightning-AI#1407)
* formatting * fix missing image on pypi * fix pypi push
1 parent ecb6d22 commit 57e20db

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

.github/workflows/pypi-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ jobs:
3333
3434
# We do this, since failures on test.pypi aren't that bad
3535
- name: Publish to Test PyPI
36-
if: startsWith(github.event.ref, 'refs/tags')
36+
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
3737
uses: pypa/gh-action-pypi-publish@master
3838
with:
3939
user: __token__
4040
password: ${{ secrets.test_pypi_password }}
4141
repository_url: https://test.pypi.org/legacy/
4242

4343
- name: Publish distribution 📦 to PyPI
44-
if: startsWith(github.event.ref, 'refs/tags')
44+
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
4545
uses: pypa/gh-action-pypi-publish@master
4646
with:
4747
user: __token__

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ removed until codecov badge isn't empy. likely a config error showing nothing on
3030
| System / PyTorch ver. | 1.1 | 1.2 | 1.3 | 1.4 |
3131
| :---: | :---: | :---: | :---: | :---: |
3232
| Linux py3.6 [CPU] | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) | [![CircleCI](https://circleci.com/gh/PyTorchLightning/pytorch-lightning.svg?style=svg)](https://circleci.com/gh/PyTorchLightning/pytorch-lightning) |
33-
| Linux py3.7 [GPU] | <center>—</center> | <center>—</center> | <center>—</center> | [![Build Status](http://35.192.60.23/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://35.192.60.23/PyTorchLightning/pytorch-lightning) |
34-
| Linux py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | <center>—</center> | <center>—</center> | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
35-
| OSX py3.6 / py3.7 / py3.8| [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | <center>—</center> | <center>—</center> | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
36-
| Windows py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | <center>—</center> | <center>—</center> | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
33+
| Linux py3.7 [GPU] | - | - | - | [![Build Status](http://35.192.60.23/api/badges/PyTorchLightning/pytorch-lightning/status.svg)](http://35.192.60.23/PyTorchLightning/pytorch-lightning) |
34+
| Linux py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
35+
| OSX py3.6 / py3.7 / py3.8| [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
36+
| Windows py3.6 / py3.7 / py3.8 | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) | - | - | [![CI testing](https://github.com/PyTorchLightning/pytorch-lightning/workflows/CI%20testing/badge.svg?event=push)](https://github.com/PyTorchLightning/pytorch-lightning/actions?query=workflow%3A%22CI+testing%22) |
3737

3838
</center>
3939

pytorch_lightning/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Root package info."""
22

3-
__version__ = '0.7.2rc5'
3+
__version__ = '0.7.2rc6'
44
__author__ = 'William Falcon et al.'
55
__author_email__ = '[email protected]'
66
__license__ = 'Apache-2.0'

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ def load_requirements(path_dir=PATH_ROOT, comment_char='#'):
3232
return reqs
3333

3434

35+
def load_long_describtion():
36+
# https://github.com/PyTorchLightning/pytorch-lightning/raw/master/docs/source/_images/lightning_module/pt_to_pl.png
37+
url = os.path.join(pytorch_lightning.__homepage__, 'raw', pytorch_lightning.__version__, 'docs')
38+
text = open('README.md', encoding='utf-8').read()
39+
text = text.replace('](docs', f']({url}')
40+
return text
41+
42+
3543
# https://packaging.python.org/discussions/install-requires-vs-requirements /
3644
# keep the meta-data here for simplicity in reading this file... it's not obvious
3745
# what happens and to non-engineers they won't know to look in init ...
@@ -48,7 +56,7 @@ def load_requirements(path_dir=PATH_ROOT, comment_char='#'):
4856
license=pytorch_lightning.__license__,
4957
packages=find_packages(exclude=['tests', 'tests/*', 'benchmarks']),
5058

51-
long_description=open('README.md', encoding='utf-8').read(),
59+
long_description=load_long_describtion(),
5260
long_description_content_type='text/markdown',
5361
include_package_data=True,
5462
zip_safe=False,

0 commit comments

Comments
 (0)