You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That will create an ``/skeleton`` directory in your working directory.
18
-
Now you can install the dependencies in a virtualenv::
19
-
20
-
cd skeleton
21
-
./configure --docs
18
+
(Or use "make dev")
22
19
23
20
.. note::
24
21
25
-
In case of windows, run ``configure --docs`` instead of this.
26
-
27
-
Now, this will install the following prerequisites:
28
-
29
-
- Sphinx
30
-
- sphinx_rtd_theme (the format theme used by ReadTheDocs)
31
-
- docs8 (style linter)
22
+
In case of windows, run ``configure --dev``.
32
23
33
-
These requirements are already present in setup.cfg and `./configure --docs` installs them.
24
+
This will install and configure all requirements foer development including for docs development.
34
25
35
-
Now you can build the HTML documents locally::
26
+
Now you can build the HTML documentation locally::
36
27
37
28
source venv/bin/activate
38
-
cd docs
39
-
make html
40
-
41
-
Assuming that your Sphinx installation was successful, Sphinx should build a local instance of the
42
-
documentation .html files::
43
-
44
-
open build/html/index.html
45
-
46
-
.. note::
47
-
48
-
In case this command did not work, for example on Ubuntu 18.04 you may get a message like “Couldn’t
49
-
get a file descriptor referring to the console”, try:
50
-
51
-
::
52
-
53
-
see build/html/index.html
29
+
make docs
54
30
55
-
You now have a local build of the AboutCode documents.
31
+
This will build a local instance of the ``docs/_build`` directory::
56
32
57
-
.. _contrib_doc_share_improvements:
33
+
open docs/_build/index.html
58
34
59
-
Share Document Improvements
60
-
---------------------------
61
-
62
-
Ensure that you have the latest files::
63
-
64
-
git pull
65
-
git status
66
35
67
-
Before commiting changes run Continious Integration Scripts locally to run tests. Refer
68
-
:ref:`doc_ci` for instructions on the same.
36
+
To validate the documentation style and content, use::
69
37
70
-
Follow standard git procedures to upload your new and modified files. The following commands are
71
-
examples::
72
-
73
-
git status
74
-
git add source/index.rst
75
-
git add source/how-to-scan.rst
76
-
git status
77
-
git commit -m "New how-to document that explains how to scan"
78
-
git status
79
-
git push
80
-
git status
81
-
82
-
The Scancode-Toolkit webhook with ReadTheDocs should rebuild the documentation after your
83
-
Pull Request is Merged.
38
+
source venv/bin/activate
39
+
make doc8
40
+
make docs-check
84
41
85
-
Refer the `Pro Git Book <https://git-scm.com/book/en/v2/>`_ available online for Git tutorials
86
-
covering more complex topics on Branching, Merging, Rebasing etc.
87
42
88
43
.. _doc_ci:
89
44
90
45
Continuous Integration
91
46
----------------------
92
47
93
-
The documentations are checked on every new commit through Travis-CI, so that common errors are
94
-
avoided and documentation standards are enforced. Travis-CI presently checks for these 3 aspects
95
-
of the documentation :
48
+
The documentations are checked on every new commit, so that common errors are avoided and
49
+
documentation standards are enforced. We checks for these aspects of the documentation:
96
50
97
51
1. Successful Builds (By using ``sphinx-build``)
98
-
2. No Broken Links (By Using ``link-check``)
99
-
3. Linting Errors (By Using ``Doc8``)
52
+
2. No Broken Links (By Using ``linkcheck``)
53
+
3. Linting Errors (By Using ``doc8``)
100
54
101
-
So run these scripts at your local system before creating a Pull Request::
55
+
You myst run these scripts locally before creating a pull request::
102
56
103
-
cd docs
104
-
./scripts/sphinx_build_link_check.sh
105
-
./scripts/doc8_style_check.sh
57
+
make doc8
58
+
make check-docs
106
59
107
-
If you don't have permission to run the scripts, run::
108
-
109
-
chmod u+x ./scripts/doc8_style_check.sh
110
60
111
61
.. _doc_style_docs8:
112
62
113
-
Style Checks Using ``Doc8``
63
+
Style Checks Using ``doc8``
114
64
---------------------------
115
65
116
66
How To Run Style Tests
117
67
^^^^^^^^^^^^^^^^^^^^^^
118
68
119
69
In the project root, run the following commands::
120
70
121
-
$ cd docs
122
-
$ ./scripts/doc8_style_check.sh
71
+
make doc8
123
72
124
73
A sample output is::
125
74
@@ -143,11 +92,13 @@ A sample output is::
143
92
144
93
Now fix the errors and run again till there isn't any style error in the documentation.
145
94
95
+
146
96
What is Checked?
147
97
^^^^^^^^^^^^^^^^
148
98
149
99
PyCQA is an Organization for code quality tools (and plugins) for the Python programming language.
150
-
Doc8 is a sub-project of the same Organization. Refer this `README <https://github.com/PyCQA/doc8/blob/main/README.rst>`_ for more details.
100
+
Doc8 is a sub-project of the same Organization. Refer this
101
+
`README <https://github.com/PyCQA/doc8/blob/main/README.rst>`_ for more details.
0 commit comments