File tree 2 files changed +26
-6
lines changed
2 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,12 @@ Most of the tests in PyTorch Lightning train a trial MNIST model under various t
104
104
105
105
## Guidelines
106
106
107
+ ### Developments scripts
108
+ To build the documentation locally, simply execute the following commands from project root (only for Unix):
109
+ - ` make clean ` cleans repo from temp/generated files
110
+ - ` make docs ` builds documentation under _ docs/build/html_
111
+ - ` make test ` runs all project's tests
112
+
107
113
### Original code
108
114
109
115
All added or edited code shall be the own original work of the particular contributor.
Original file line number Diff line number Diff line change 1
- .PHONY : test clean
1
+ .PHONY : test clean docs
2
+
3
+ # to imitate SLURM set only single node
4
+ export SLURM_LOCALID =0
5
+ # assume you have installed need packages
6
+ export SPHINX_MOCK_REQUIREMENTS =0
2
7
3
8
test :
9
+ pip install -r requirements/devel.txt
4
10
# install APEX, see https://github.com/NVIDIA/apex#linux
5
- # to imitate SLURM set only single node
6
- export SLURM_LOCALID=0
7
11
8
12
# use this to run tests
9
13
rm -rf _ckpt_*
10
14
rm -rf ./lightning_logs
11
15
python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests pl_examples -v --flake8
12
- python -m coverage report -m
16
+ python -m coverage report
13
17
14
18
# specific file
15
- # python -m coverage run --source pytorch_lightning -m py.test --flake8 --durations=0 -v -k
19
+ # python -m coverage run --source pytorch_lightning -m pytest --flake8 --durations=0 -v -k
20
+
21
+ docs : clean
22
+ pip install --quiet -r requirements/docs.txt
23
+ python -m sphinx -b html -W docs/source docs/build
16
24
17
25
clean :
18
26
# clean all temp runs
19
- rm -rf $(shell find . -name "mlruns" )
27
+ rm -rf $(shell find . -name "mlruns")
28
+ rm -rf .mypy_cache
29
+ rm -rf .pytest_cache
30
+ rm -rf ./docs/build
31
+ rm -rf ./docs/source/generated
32
+ rm -rf ./docs/source/* /generated
33
+ rm -rf ./docs/source/api
You can’t perform that action at this time.
0 commit comments