Skip to content

Commit 208bf6f

Browse files
authored
prepare space for fused docs (#14160)
* copy app conf * ci + req. * script symlink * wip * keep only App * add also PL * lightning * artifact
1 parent 7987a1b commit 208bf6f

File tree

433 files changed

+1204
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

433 files changed

+1204
-6
lines changed

.github/workflows/docs-checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: false
1919
matrix:
20-
pkg: ["app", "pytorch"]
20+
pkg: ["app", "pytorch"] # TODO: , "lit"
2121
steps:
2222
- uses: actions/checkout@v2
2323
with:
@@ -68,7 +68,7 @@ jobs:
6868
strategy:
6969
fail-fast: false
7070
matrix:
71-
pkg: ["app", "pytorch"]
71+
pkg: ["app", "pytorch", "lit"]
7272
steps:
7373
- uses: actions/checkout@v2
7474
with:
@@ -112,7 +112,7 @@ jobs:
112112
- name: Upload built docs
113113
uses: actions/upload-artifact@v3
114114
with:
115-
name: docs-results-${{ github.sha }}
115+
name: docs-${{ matrix.pkg }}-${{ github.sha }}
116116
path: docs/build/html/
117117
# Use always() to always run this step to publish test results when there are test failures
118118
if: success()

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ lightning_logs/
99
# Documentations
1010
docs/source-app/generated
1111
docs/source-app/*/generated
12+
docs/source-lit/generated
13+
docs/source-lit/*/generated
14+
docs/source-lit/api
1215
docs/source-pytorch/api
1316
docs/source-pytorch/*.md
1417
docs/source-pytorch/generated

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ clean:
2222
rm -rf ./docs/source-pytorch/api
2323
rm -rf ./docs/source-app/generated
2424
rm -rf ./docs/source-app/*/generated
25+
rm -rf ./docs/source-lit/api
26+
rm -rf ./docs/source-lit/generated
27+
rm -rf ./docs/source-lit/*/generated
2528
rm -rf build
2629
rm -rf dist
2730
rm -rf *.egg-info

docs/create-symlinks.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import glob
2+
import os
3+
4+
5+
def symlink_folder(source_dir, target_dir: str = "source-lit") -> None:
6+
assert os.path.isdir(source_dir)
7+
assert os.path.isdir(target_dir)
8+
ls = glob.glob(os.path.join(source_dir, "**"), recursive=True)
9+
for path_ in ls:
10+
path_target = path_.replace(source_dir, target_dir)
11+
if os.path.isdir(path_) or os.path.exists(path_target):
12+
continue
13+
if os.path.islink(path_target):
14+
print(path_target)
15+
continue
16+
path_dir = os.path.dirname(path_target)
17+
os.makedirs(path_dir, exist_ok=True)
18+
depth = path_.count(os.path.sep)
19+
path_root = os.path.sep.join([".."] * depth)
20+
path_source = os.path.join(path_root, path_)
21+
# print(path_source, path_target, os.path.exists(path_target))
22+
os.symlink(path_source, path_target)
23+
24+
25+
if __name__ == "__main__":
26+
for name in ("app", "pytorch"):
27+
symlink_folder(f"source-{name}")

docs/source-app/code_samples/quickstart/app/app_0.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from docs.quickstart.app_02 import HourLongWork
2-
31
import lightning as L
2+
from docs.quickstart.app_02 import HourLongWork
43

54

65
class RootFlow(L.LightningFlow):

docs/source-lit/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS = -T -W
6+
SPHINXBUILD = sphinx-build
7+
SOURCEDIR = .
8+
BUILDDIR = ../build
9+
10+
# Put it first so that "make" without argument is like "make help".
11+
help:
12+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13+
14+
.PHONY: help Makefile
15+
16+
# Catch-all target: route all unknown targets to Sphinx using the new
17+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
18+
%: Makefile
19+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../source-app/_static/copybutton.js
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../source-pytorch/_static/images/accelerator/ipus/profiler.png
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../source-pytorch/_static/images/benchmarks/figure-parity-times.png
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../source-pytorch/_static/images/general/PTL101_youtube_thumbnail.jpg

0 commit comments

Comments
 (0)