Skip to content

Commit 58ee725

Browse files
Sean NarenotajBorda
authored
Fix/links and docs (#829)
Co-authored-by: otaj <[email protected]> Co-authored-by: Jirka Borovec <[email protected]>
1 parent 7117399 commit 58ee725

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

.github/workflows/docs-check.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@master
1515
- uses: actions/setup-python@v2
1616
with:
17-
python-version: 3.8
17+
python-version: 3.9
1818

1919
# Note: This uses an internal pip API and may not always work
2020
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install dependencies
3030
run: |
3131
# python -m pip install --upgrade --user pip
32-
pip install --requirement requirements/devel.txt --upgrade --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet # --upgrade-strategy only-if-needed
32+
pip install --requirement requirements/devel.txt --upgrade --quiet --find-links https://download.pytorch.org/whl/cpu/torch_stable.html
3333
pip install --requirement docs/requirements.txt --upgrade-strategy only-if-needed
3434
python --version
3535
pip --version
@@ -52,7 +52,7 @@ jobs:
5252
- uses: actions/checkout@master
5353
- uses: actions/setup-python@v2
5454
with:
55-
python-version: 3.8
55+
python-version: 3.9
5656

5757
# Note: This uses an internal pip API and may not always work
5858
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
@@ -66,7 +66,6 @@ jobs:
6666
6767
- name: Install dependencies
6868
run: |
69-
pip install --requirement requirements.txt --upgrade-strategy only-if-needed --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
7069
pip install --requirement docs/requirements.txt
7170
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
7271
sudo apt-get update && sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ ______________________________________________________________________
1919

2020
[![PyPI Status](https://badge.fury.io/py/lightning-bolts.svg)](https://badge.fury.io/py/lightning-bolts)
2121
[![PyPI Status](https://pepy.tech/badge/lightning-bolts)](https://pepy.tech/project/lightning-bolts)
22-
[![Build Status](https://dev.azure.com/PytorchLightning/lightning%20Bolts/_apis/build/status/PyTorchLightning.lightning-bolts?branchName=master)](https://dev.azure.com/PytorchLightning/lightning%20Bolts/_build/latest?definitionId=5&branchName=master)
22+
[![Build Status](https://dev.azure.com/Lightning-AI/lightning%20Bolts/_apis/build/status/Lightning-AI.lightning-bolts?branchName=master)](https://dev.azure.com/Lightning-AI/lightning%20Bolts/_build?definitionId=31&_a=summary&repositoryFilter=13&branchFilter=4923%2C4923)
2323
[![codecov](https://codecov.io/gh/PyTorchLightning/lightning-bolts/branch/master/graph/badge.svg)](https://codecov.io/gh/PyTorchLightning/lightning-bolts)
24-
[![CodeFactor](https://www.codefactor.io/repository/github/pytorchlightning/lightning-bolts/badge)](https://www.codefactor.io/repository/github/pytorchlightning/lightning-bolts)
2524

2625
[![Documentation Status](https://readthedocs.org/projects/lightning-bolts/badge/?version=latest)](https://lightning-bolts.readthedocs.io/en/latest/)
2726
[![Slack](https://img.shields.io/badge/slack-chat-green.svg?logo=slack)](https://www.pytorchlightning.ai/community)

docs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line.
55
SPHINXOPTS = -W
6-
SPHINXBUILD = python $(shell which sphinx-build)
6+
SPHINXBUILD = $(shell which sphinx-build)
77
SOURCEDIR = source
88
BUILDDIR = build
99

docs/source/conf.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def package_list_from_file(file):
302302
mocked_packages = []
303303
with open(file) as fp:
304304
for ln in fp.readlines():
305-
found = [ln.index(ch) for ch in list(",=<>#") if ch in ln]
305+
found = [ln.index(ch) for ch in list(",=<>#[]") if ch in ln]
306306
pkg = ln[: min(found)] if found else ln
307307
if pkg.strip():
308308
mocked_packages.append(pkg.strip())
@@ -319,12 +319,15 @@ def package_list_from_file(file):
319319
MOCK_PACKAGES = []
320320
if SPHINX_MOCK_REQUIREMENTS:
321321
# mock also base packages when we are on RTD since we don't install them there
322+
MOCK_PACKAGES += ["numpy"]
322323
MOCK_PACKAGES += package_list_from_file(os.path.join(_PATH_ROOT, "requirements.txt"))
323324
MOCK_PACKAGES += package_list_from_file(os.path.join(_PATH_ROOT, "requirements", "models.txt"))
324325
MOCK_PACKAGES += package_list_from_file(os.path.join(_PATH_ROOT, "requirements", "loggers.txt"))
325326
# replace PyPI packages by importing ones
326327
MOCK_PACKAGES = [PACKAGE_MAPPING.get(pkg, pkg) for pkg in MOCK_PACKAGES]
327328

329+
print(f"{MOCK_PACKAGES=}")
330+
328331
autodoc_mock_imports = MOCK_PACKAGES
329332

330333

requirements/models.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
torchvision>=0.10.*
2-
scikit-learn>=0.23
2+
scikit-learn>=1.0.2
33
Pillow
44
opencv-python-headless
55
gym[atari]>=0.17.2, <0.20.0 # needed for RL

requirements/test.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pre-commit>=1.0
1111
mypy>=0.790
1212
black
1313
atari-py==0.2.6 # needed for RL
14-
scikit-learn>=0.23
14+
scikit-learn>=1.0.2
1515
sparseml
1616
ale-py>=0.7
1717
jsonargparse[signatures] # for LightningCLI

0 commit comments

Comments
 (0)