Skip to content

Commit 086ccc4

Browse files
Merge remote-tracking branch 'skeleton/main' into fix-doc-builds
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
2 parents e15c67f + f3d1fcd commit 086ccc4

File tree

3 files changed

+17
-10
lines changed

3 files changed

+17
-10
lines changed

configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ CLI_ARGS=$1
3030
# Requirement arguments passed to pip and used by default or with --dev.
3131
REQUIREMENTS="--editable . --constraint requirements.txt"
3232
DEV_REQUIREMENTS="--editable .[testing,packages] --constraint requirements.txt --constraint requirements-dev.txt"
33+
DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt"
3334

3435
# where we create a virtualenv
3536
VIRTUALENV_DIR=venv
@@ -178,6 +179,7 @@ while getopts :-: optchar; do
178179
help ) cli_help;;
179180
clean ) find_python && clean;;
180181
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
182+
docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";;
181183
esac;;
182184
esac
183185
done

configure.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
@rem # Requirement arguments passed to pip and used by default or with --dev.
2929
set "REQUIREMENTS=--editable . --constraint requirements.txt"
3030
set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
31+
set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt"
3132

3233
@rem # where we create a virtualenv
3334
set "VIRTUALENV_DIR=venv"
@@ -78,6 +79,9 @@ if not "%1" == "" (
7879
if "%1" EQU "--dev" (
7980
set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
8081
)
82+
if "%1" EQU "--docs" (
83+
set "CFG_REQUIREMENTS=%DOCS_REQUIREMENTS%"
84+
)
8185
shift
8286
goto again
8387
)

docs/source/contribute/contrib_doc.rst

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ That will create an ``/scancode-toolkit`` directory in your working directory.
1818
Now you can install the dependencies in a virtualenv::
1919

2020
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.
2326

24-
Now, the following prerequisites should be installed
27+
Now, this will install the following prerequisites:
2528

2629
- Sphinx
2730
- sphinx_rtd_theme (the format theme used by ReadTheDocs)
2831
- docs8 (style linter)
2932

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.
3534

3635
Now you can build the HTML documents locally::
3736

37+
source venv/bin/activate
3838
cd docs
3939
make html
4040

@@ -116,9 +116,10 @@ Style Checks Using ``Doc8``
116116
How To Run Style Tests
117117
^^^^^^^^^^^^^^^^^^^^^^
118118

119-
In the project root, run the following command::
119+
In the project root, run the following commands::
120120

121-
$ doc8 --max-line-length 100 docs/source/ --ignore D000
121+
$ cd docs
122+
$ ./scripts/doc8_style_check.sh
122123

123124
A sample output is::
124125

0 commit comments

Comments
 (0)