File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ CLI_ARGS=$1
30
30
# Requirement arguments passed to pip and used by default or with --dev.
31
31
REQUIREMENTS=" --editable . --constraint requirements.txt"
32
32
DEV_REQUIREMENTS=" --editable .[testing,packages] --constraint requirements.txt --constraint requirements-dev.txt"
33
+ DOCS_REQUIREMENTS=" --editable .[docs] --constraint requirements.txt"
33
34
34
35
# where we create a virtualenv
35
36
VIRTUALENV_DIR=venv
@@ -178,6 +179,7 @@ while getopts :-: optchar; do
178
179
help ) cli_help;;
179
180
clean ) find_python && clean;;
180
181
dev ) CFG_REQUIREMENTS=" $DEV_REQUIREMENTS " ;;
182
+ docs ) CFG_REQUIREMENTS=" $DOCS_REQUIREMENTS " ;;
181
183
esac ;;
182
184
esac
183
185
done
Original file line number Diff line number Diff line change 28
28
@ rem # Requirement arguments passed to pip and used by default or with --dev.
29
29
set " REQUIREMENTS = --editable . --constraint requirements.txt"
30
30
set " DEV_REQUIREMENTS = --editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
31
+ set " DOCS_REQUIREMENTS = --editable .[docs] --constraint requirements.txt"
31
32
32
33
@ rem # where we create a virtualenv
33
34
set " VIRTUALENV_DIR = venv"
@@ -78,6 +79,9 @@ if not "%1" == "" (
78
79
if " %1 " EQU " --dev" (
79
80
set " CFG_REQUIREMENTS = %DEV_REQUIREMENTS% "
80
81
)
82
+ if " %1 " EQU " --docs" (
83
+ set " CFG_REQUIREMENTS = %DOCS_REQUIREMENTS% "
84
+ )
81
85
shift
82
86
goto again
83
87
)
Original file line number Diff line number Diff line change @@ -18,23 +18,23 @@ That will create an ``/scancode-toolkit`` directory in your working directory.
18
18
Now you can install the dependencies in a virtualenv::
19
19
20
20
cd scancode-toolkit
21
- ./configure --dev
22
- source venv/bin/activate
21
+ ./configure --docs
22
+
23
+ .. note ::
24
+
25
+ In case of windows, run ``configure --docs `` instead of this.
23
26
24
- Now, the following prerequisites should be installed
27
+ Now, this will install the following prerequisites:
25
28
26
29
- Sphinx
27
30
- sphinx_rtd_theme (the format theme used by ReadTheDocs)
28
31
- docs8 (style linter)
29
32
30
- ::
31
-
32
- pip install -e .[docs]
33
-
34
- These requirements are already present in setup.cfg and this installs them.
33
+ These requirements are already present in setup.cfg and `./configure --docs ` installs them.
35
34
36
35
Now you can build the HTML documents locally::
37
36
37
+ source venv/bin/activate
38
38
cd docs
39
39
make html
40
40
@@ -116,9 +116,10 @@ Style Checks Using ``Doc8``
116
116
How To Run Style Tests
117
117
^^^^^^^^^^^^^^^^^^^^^^
118
118
119
- In the project root, run the following command ::
119
+ In the project root, run the following commands ::
120
120
121
- $ doc8 --max-line-length 100 docs/source/ --ignore D000
121
+ $ cd docs
122
+ $ ./scripts/doc8_style_check.sh
122
123
123
124
A sample output is::
124
125
You can’t perform that action at this time.
0 commit comments