|
22 | 22 |
|
23 | 23 | from pytorch_lightning import __homepage__, __version__, PROJECT_ROOT |
24 | 24 |
|
25 | | -_PATH_BADGES = os.path.join('.', 'docs', 'source', '_images', 'badges') |
| 25 | +_PATH_BADGES = os.path.join('utilities', 'docs', 'source', '_images', 'badges') |
26 | 26 | # badge to download |
27 | 27 | _DEFAULT_BADGES = [ |
28 | 28 | 'PyPI - Python Version', |
@@ -70,7 +70,7 @@ def _parse_for_badge(text: str, path_badges: str = _PATH_BADGES, badge_names: li |
70 | 70 | [](https://pypi.org/project/pytorch-lightning/) |
71 | 71 | and another text later' |
72 | 72 | >>> import shutil |
73 | | - >>> shutil.rmtree('./docs') |
| 73 | + >>> shutil.rmtree(_PATH_BADGES) |
74 | 74 | """ |
75 | 75 | for line in text.split(os.linesep): |
76 | 76 | badge_name = re.search(r'\[!\[(.*?)]', line) |
@@ -103,7 +103,7 @@ def _download_badge(url_badge, badge_name, target_dir): |
103 | 103 | """Download badge from url |
104 | 104 |
|
105 | 105 | >>> path_img = _download_badge('https://img.shields.io/pypi/pyversions/pytorch-lightning', |
106 | | - ... 'PyPI - Python Version', '.') |
| 106 | + ... 'PyPI - Python Version', 'utilities') |
107 | 107 | >>> os.path.isfile(path_img) |
108 | 108 | True |
109 | 109 | >>> path_img |
@@ -159,7 +159,7 @@ def _load_long_description(path_dir): |
159 | 159 | >>> _load_long_description(PROJECT_ROOT) # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE |
160 | 160 | '<div align="center">...' |
161 | 161 | >>> import shutil |
162 | | - >>> shutil.rmtree('./docs') |
| 162 | + >>> shutil.rmtree(_PATH_BADGES) |
163 | 163 | """ |
164 | 164 | # https://github.com/PyTorchLightning/pytorch-lightning/raw/master/docs/source/_images/lightning_module/pt_to_pl.png |
165 | 165 | url = os.path.join(__homepage__, 'raw', __version__, 'docs') |
|
0 commit comments