Skip to content

Commit 8af9080

Browse files
authored
Proofread the Contributing section (#2285)
1 parent 1852877 commit 8af9080

File tree

9 files changed

+336
-337
lines changed

9 files changed

+336
-337
lines changed

doc/contributing/contributing.rst

Lines changed: 179 additions & 182 deletions
Large diffs are not rendered by default.

doc/contributing/docs/examples.rst

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
2-
================================================================================
31
Examples and templates
4-
================================================================================
2+
======================
53

6-
In this document, we explain general guidelines for describing Tarantool API and
7-
give some examples and templates.
4+
This document contains general guidelines for describing the Tarantool API,
5+
as well as examples and templates.
86

97
Use this checklist for documenting a function or a method:
108

@@ -14,39 +12,37 @@ Use this checklist for documenting a function or a method:
1412
* Return type (if exists)
1513
* Possible errors (if exist)
1614
* Complexity factors (if exist)
17-
* Note re storage engine (if exists)
15+
* Usage with memtx and vinyl (if differs)
1816
* Example(s)
1917
* Extra information (if needed)
2018

21-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22-
Documenting a function
23-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19+
Documenting functions
20+
~~~~~~~~~~~~~~~~~~~~~
2421

25-
We describe functions of Tarantool modules via Sphinx directives ``.. module::``
26-
and ``.. function::``:
22+
We use the Sphinx directives ``.. module::``
23+
and ``.. function::`` to describe functions of Tarantool modules:
2724

2825
.. literalinclude:: ./_includes/function_template.rst
2926
:language: rst
3027

31-
And the resulting output looks like this:
28+
The resulting output looks like this:
3229

3330
.. include:: ./_includes/function_template.rst
3431

35-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36-
Documenting class method and data
37-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32+
Documenting class methods and data
33+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3834

39-
Description of a method is similar to a function, but the ``.. class::``
35+
Methods are described similarly to functions, but the ``.. class::``
4036
directive, unlike ``.. module::``, requires nesting.
4137

42-
As for documenting data, it will be enough to write a description,
43-
a return type, and an example.
38+
As for data, it's enough to write the description, the return type, and an example.
4439

45-
Here is an example of documenting a method and data of a class ``index_object``:
40+
Here is the example documentation describing
41+
the method and data of the ``index_object`` class:
4642

4743
.. literalinclude:: ./_includes/class_template.rst
4844
:language: rst
4945

5046
And the resulting output looks like this:
5147

52-
.. include:: ./_includes/class_template.rst
48+
.. include:: ./_includes/class_template.rst

doc/contributing/docs/infra.rst

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,33 @@
22
Documentation infrastructure
33
=============================
44

5-
In this section of the :doc:`documentation guidelines </contributing/docs>`,
6-
we deal with some support activities to ensure the correct building of
5+
This section of the :doc:`documentation guidelines </contributing/docs>`
6+
discusses some of the support activities that ensure the correct building of
77
documentation.
88

99
.. _guidelines_doc_submodules:
1010

1111
Adding submodules
1212
-----------------
1313

14-
The source files with the documentation content are mainly stored in the
14+
The documentation source files are mainly stored in the
1515
`documentation repository <https://github.com/tarantool/doc>`_.
16-
However, in some of the cases the content source files are stored in
17-
repositories of other Tarantool-related products and modules, for example,
18-
`Cartridge <https://github.com/tarantool/cartridge>`_,
16+
However, in some cases, they are stored in the
17+
repositories of other Tarantool-related products
18+
or modules---`Cartridge <https://github.com/tarantool/cartridge>`_,
1919
`Monitoring <https://github.com/tarantool/metrics/tree/master/doc/monitoring>`__,
20-
and some others.
20+
and others.
2121

22-
In this case, we need to add such a repository containing the source files
23-
as a submodule to the `documentation repository <https://github.com/tarantool/doc>`_
24-
and set up other necessary settings to ensure the proper building of the entire
25-
body of Tarantool documentation presented at the `official web-site <http://www.tarantool.io/en/doc>`_.
22+
If you are working with source files from a product or module repository,
23+
add that repository as a submodule to the
24+
`documentation repository <https://github.com/tarantool/doc>`_
25+
and configure other necessary settings.
26+
This will ensure that the entire
27+
body of Tarantool documentation,
28+
presented on the `official website <http://www.tarantool.io/en/doc>`_,
29+
is built properly.
2630

27-
The steps to do that are the following:
31+
Here is how to do that:
2832

2933
.. contents::
3034
:local:
@@ -35,7 +39,7 @@ The steps to do that are the following:
3539
1. Add a submodule
3640
~~~~~~~~~~~~~~~~~~
3741

38-
First, we need to add a repository containing the content source files as
42+
First, we need to add the repository with content source files as
3943
a submodule.
4044

4145
#. Make sure you are in the root directory of the documentation repository.
@@ -49,7 +53,7 @@ a submodule.
4953
cd ..
5054
5155
52-
#. Check that the new submodule appears in the ``.gitmodules`` file, for example:
56+
#. Check that the new submodule is in the ``.gitmodules`` file, for example:
5357

5458
.. code-block:: ini
5559
@@ -62,30 +66,30 @@ a submodule.
6266
2. Update build_submodules.sh
6367
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6468

65-
Next, we should define what directories and files are to be copied from
66-
the submodule repository into the documentation one before building
69+
Now define what directories and files are to be copied from
70+
the submodule repository to the documentation repository before building
6771
documentation. These settings are defined in the ``build_submodules.sh`` file
68-
which is in the root directory of the documentation repository.
72+
in the root directory of the documentation repository.
6973

70-
We can take examples of the already existing submodules to show the logic of
71-
the settings.
74+
Here are some real submodule examples
75+
that show the logic of the settings.
7276

7377
metrics
7478
^^^^^^^
7579

76-
In case of the ``metrics`` submodule, the content source files are in the
80+
The content source files for the ``metrics`` submodule are in the
7781
``./doc/monitoring`` directory of the submodule repository.
7882
In the final documentation view, the content should appear in the
7983
`Monitoring <https://www.tarantool.io/en/doc/latest/book/monitoring/>`__
8084
chapter (``https://www.tarantool.io/en/doc/latest/book/monitoring/``).
8185

82-
So, we need to:
86+
To make this work:
8387

84-
* create a directory at ``./doc/book/monitoring/``.
85-
* copy the entire content of the ``./modules/metrics/doc/monitoring/`` directory to
88+
* Create a directory at ``./doc/book/monitoring/``.
89+
* Copy the entire content of the ``./modules/metrics/doc/monitoring/`` directory to
8690
``./doc/book/monitoring/``.
8791

88-
The corresponding lines in the ``build_submodules.sh`` file are the following:
92+
Here are the corresponding lines in ``build_submodules.sh``:
8993

9094
.. code-block:: bash
9195
@@ -95,25 +99,25 @@ The corresponding lines in the ``build_submodules.sh`` file are the following:
9599
mkdir -p "${monitoring_dest}"
96100
yes | cp -rf "${monitoring_root}" "${monitoring_dest}/"
97101
98-
The ``${project_root}`` variable is defined earlier as ``project_root=$(pwd)``.
99-
We should start the documentation build from the documentation repository root
100-
directory so that will be the value of the variable.
102+
The ``${project_root}`` variable is defined earlier in the file as ``project_root=$(pwd)``.
103+
This is because the documentation build has to start from the documentation repository root
104+
directory.
101105

102106
cartridge_cli
103107
^^^^^^^^^^^^^
104108

105-
In case of the ``cartridge_cli`` submodule, the content source is in
106-
the ``README.rst`` file located in the directory of the submodule repository.
109+
The content source file for the ``cartridge_cli`` submodule is
110+
``README.rst``, located in the directory of the submodule repository.
107111
In the final documentation view, the content should appear here:
108112
``https://www.tarantool.io/en/doc/latest/book/cartridge/cartridge_cli/``.
109113

110-
So, we need to:
114+
To make this work:
111115

112-
* create a directory at ``./doc/book/cartridge/cartridge_cli``
113-
* copy ``./modules/cartridge_cli/README.rst`` to
116+
* Create a directory at ``./doc/book/cartridge/cartridge_cli``.
117+
* Copy ``./modules/cartridge_cli/README.rst`` to
114118
``./doc/book/cartridge/cartridge_cli/index.rst``.
115119

116-
The corresponding settings in the ``build_submodules.st`` file are the following:
120+
Here ar the corresponding settings in ``build_submodules.sh``:
117121

118122
.. code-block:: bash
119123
@@ -130,5 +134,4 @@ The corresponding settings in the ``build_submodules.st`` file are the following
130134
3. Update .gitignore
131135
~~~~~~~~~~~~~~~~~~~~
132136

133-
Finaly, we should add paths to the copied directories and files to
134-
the ``.gitignore`` file.
137+
Finally, add paths to the copied directories and files to ``.gitignore``.

doc/contributing/docs/markup.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
================================================================================
1+
22
Markup reference
3-
================================================================================
3+
================
44

5-
Tarantool documentation is built via
5+
Tarantool documentation is built via the
66
`Sphinx <https://www.sphinx-doc.org/en/master/index.html>`_ engine and is written in
7-
`reStructuredText <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html>`_
8-
markup.
9-
This section will guide you through our typical cases while writing the docs.
7+
`reStructuredText <https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html>`_.
8+
This section will guide you through our typical documentation formatting cases.
109

1110

1211
.. toctree::

doc/contributing/docs/markup/links.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ For this purpose, we add our own labels for linking to any place in this documen
3333

3434
Our naming convention is as follows:
3535

36-
* Character set: a through z, 0 through 9, dash, underscore.
37-
* Format: ``path dash filename dash tag``
36+
* Character set: a through z, 0 through 9, hyphen, underscore.
37+
* Format: ``path hyphen filename hyphen tag``
3838

3939
**Example:**
4040

@@ -48,13 +48,13 @@ where:
4848
* ``box_index`` is the file name (without ".rst"), and
4949
* ``iterator_type`` is the tag.
5050

51-
Use a dash "-" to delimit the path and the file name. In the documentation
52-
source, we use only underscores "_" in paths and file names, reserving dash "-"
51+
Use a hyphen "-" to delimit the path and the file name. In the documentation
52+
source, we use only underscores "_" in paths and file names, reserving the hyphen "-"
5353
as the delimiter for local links.
5454

5555
The tag can be anything meaningful. The only guideline is for Tarantool syntax
5656
items (such as members), where the preferred tag syntax is
57-
``module_or_object_name dash member_name``. For example, ``box_space-drop``.
57+
``module_or_object_name hyphen member_name``. For example, ``box_space-drop``.
5858

5959
To add a link to an anchor, use the following syntax:
6060

0 commit comments

Comments
 (0)