Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21c6968

Browse files
seiko2plusmattip
andcommitted
DOC: Apply suggestions from Matti review
Co-authored-by: Matti Picus <[email protected]>
1 parent 1f56a45 commit 21c6968

2 files changed

Lines changed: 21 additions & 14 deletions

File tree

.circleci/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ jobs:
88
docker:
99
# CircleCI maintains a library of pre-built images
1010
# documented at https://circleci.com/docs/2.0/circleci-images/
11+
# circleci/python3.8 images come with old versions of Doxygen(1.6.x),
12+
# therefore a new base image chose instead to guarantee to
13+
# have a newer version >= 1.8.10 to avoid warnings
14+
# that related to the default behaviors or non-exist config options
1115
- image: cimg/base:2021.05
1216

1317
working_directory: ~/repo

doc/source/dev/howto-docs.rst

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,13 @@ Note that for documentation within NumPy, it is not necessary to do
215215
Please use the ``numpydoc`` :ref:`formatting standard <numpydoc:format>` as
216216
shown in their :ref:`example <numpydoc:example>`.
217217

218-
.. _doc_c_cpp:
218+
.. _doc_c_code:
219219

220220
Documenting C/C++ Code
221221
======================
222222

223-
Recently, NumPy headed out to use Doxygen_ along with Sphinx due to the urgent need
224-
to generate C/C++ API reference documentation from comment blocks, especially with
225-
the most recent expansion in the use of SIMD, and also due to the future reliance on C++.
226-
Thanks to Breathe_, we were able to bind both worlds together at the lowest cost.
223+
NumPy uses Doxygen_ to parse specially-formatted C/C++ comment blocks. This generates
224+
XML files, which are converted by Breathe_ into RST, which is used by Sphinx.
227225

228226
**It takes three steps to complete the documentation process**:
229227

@@ -235,10 +233,9 @@ is more preferable than the others due to the similarities with the current
235233
existing non-indexed comment blocks.
236234

237235
.. note::
238-
If you have never used Doxygen_ before, then maybe you need to take a quick
239-
look at `"Documenting the code" <https://www.doxygen.nl/manual/docblocks.html>`__.
236+
Please see `"Documenting the code" <https://www.doxygen.nl/manual/docblocks.html>`__.
240237

241-
This is how Javadoc style looks like::
238+
This is what Javadoc style looks like::
242239

243240
/**
244241
* Your brief is here.
@@ -252,7 +249,7 @@ For line comment, insert a triple forward slash::
252249

253250
And for structured data members, just insert triple forward slash and less-than sign::
254251

255-
/// Data type brief.
252+
/// Data type brief description
256253
typedef struct {
257254
int member_1; ///< Member 1 description.
258255
int member_2; ///< Member 2 description.
@@ -297,10 +294,16 @@ It is interpreted as source code.
297294

298295
``@rst/@endrst``
299296

300-
Starts/Ends a block of reST markup. Take a look at the following example:
297+
Starts/Ends a block of reST markup.
298+
299+
Example
300+
~~~~~~~
301+
Take a look at the following example:
301302

302303
.. literalinclude:: examples/doxy_rst.h
303304

305+
And here is how it is rendered:
306+
304307
.. doxygenfunction:: doxy_reST_example
305308

306309
2. Feeding Doxygen
@@ -311,11 +314,11 @@ C/C++ header paths within the sub-config files of Doxygen.
311314

312315
Sub-config files have the unique name ``.doxyfile``, which you can usually find near
313316
directories that contain documented headers. You need to create a new config file if
314-
there's no one located in a path close(2-depth) to the headers you want to add.
317+
there's not one located in a path close(2-depth) to the headers you want to add.
315318

316319
Sub-config files can accept any of Doxygen_ `configuration options <https://www.doxygen.nl/manual/config.html>`__,
317-
but you should be aware of not overriding or re-initializing any configuration option,
318-
you must only count on the concatenation operator "+=". For example::
320+
but do not override or re-initialize any configuration option,
321+
rather only use the concatenation operator "+=". For example::
319322

320323
# to specfiy certain headers
321324
INPUT += @CUR_DIR/header1.h \
@@ -336,7 +339,7 @@ you must only count on the concatenation operator "+=". For example::
336339
-----------------------
337340

338341
Breathe_ provides a wide range of custom directives to allow
339-
including the generated documents by Doxygen_ into reST files.
342+
converting the documents generated by Doxygen_ into reST files.
340343

341344
.. note::
342345
For more information, please check out "`Directives & Config Variables <https://breathe.readthedocs.io/en/latest/directives.html>`__"

0 commit comments

Comments
 (0)