[Notes] [Git][BuildStream/buildstream][master] CONTRIBUTING.rst: Added more guidelines about documenting the user guide



Title: GitLab

Tristan Van Berkom pushed to branch master at BuildStream / buildstream

Commits:

4 changed files:

Changes:

  • CONTRIBUTING.rst
    ... ... @@ -1147,7 +1147,7 @@ To actually regenerate the code::
    1147 1147
     Documenting
    
    1148 1148
     -----------
    
    1149 1149
     BuildStream starts out as a documented project from day one and uses
    
    1150
    -sphinx to document itself.
    
    1150
    +`sphinx <www.sphinx-doc.org>`_ to document itself.
    
    1151 1151
     
    
    1152 1152
     This section discusses formatting policies for editing files in the
    
    1153 1153
     ``doc/source`` directory, and describes the details of how the docs are
    
    ... ... @@ -1194,10 +1194,8 @@ The BuildStream documentation style is as follows:
    1194 1194
         the target, e.g.: ``:ref:`Link text <anchor_name>```.
    
    1195 1195
         Note that the "_" prefix is not used when referring to the target.
    
    1196 1196
     
    
    1197
    -Useful links:
    
    1198
    -
    
    1199
    -For further information, please see the `Sphinx Documentation
    
    1200
    -<http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_.
    
    1197
    +For further information about using the reStructuredText with sphinx, please see the
    
    1198
    +`Sphinx Documentation <http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_.
    
    1201 1199
     
    
    1202 1200
     
    
    1203 1201
     Building Docs
    
    ... ... @@ -1266,10 +1264,101 @@ the ``man/`` subdirectory, which will be automatically included
    1266 1264
     in the buildstream distribution.
    
    1267 1265
     
    
    1268 1266
     
    
    1269
    -Documentation Examples
    
    1270
    -~~~~~~~~~~~~~~~~~~~~~~
    
    1271
    -The examples section of the documentation contains a series of standalone
    
    1272
    -examples, here are the criteria for an example addition.
    
    1267
    +User guide
    
    1268
    +~~~~~~~~~~
    
    1269
    +The :ref:`user guide <using>` is comprised of free form documentation
    
    1270
    +in manually written ``.rst`` files and is split up into a few sections,
    
    1271
    +of main interest are the :ref:`tutorial <tutorial>` and the
    
    1272
    +:ref:`examples <examples>`.
    
    1273
    +
    
    1274
    +The distinction of the two categories of user guides is important to
    
    1275
    +understand too.
    
    1276
    +
    
    1277
    +* **Tutorial**
    
    1278
    +
    
    1279
    +  The tutorial is structured as a series of exercises which start with
    
    1280
    +  the most basic concepts and build upon the previous chapters in order
    
    1281
    +  to arrive at a basic understanding of how to create BuildStream projects.
    
    1282
    +
    
    1283
    +  This series of examples should be easy enough to complete in a matter
    
    1284
    +  of a few hours for a new user, and should provide just enough insight to
    
    1285
    +  get the user started in creating their own projects.
    
    1286
    +
    
    1287
    +  Going through the tutorial step by step should also result in the user
    
    1288
    +  becoming proficient enough with the reference manual to get by on their own.
    
    1289
    +
    
    1290
    +* **Examples**
    
    1291
    +
    
    1292
    +  These exist to demonstrate how to accomplish more advanced tasks which
    
    1293
    +  are not always obvious and discoverable.
    
    1294
    +
    
    1295
    +  Alternatively, these also demonstrate elegant and recommended ways of
    
    1296
    +  accomplishing some tasks which could be done in various ways.
    
    1297
    +
    
    1298
    +
    
    1299
    +Guidelines
    
    1300
    +''''''''''
    
    1301
    +Here are some general guidelines for adding new free form documentation
    
    1302
    +to the user guide.
    
    1303
    +
    
    1304
    +* **Focus on a single subject**
    
    1305
    +
    
    1306
    +  It is important to stay focused on a single subject and avoid getting
    
    1307
    +  into tangential material when creating a new entry, so that the articles
    
    1308
    +  remain concise and the user is not distracted by unrelated subject material.
    
    1309
    +
    
    1310
    +  A single tutorial chapter or example should not introduce any additional
    
    1311
    +  subject material than the material being added for the given example.
    
    1312
    +
    
    1313
    +* **Reuse existing sample project elements**
    
    1314
    +
    
    1315
    +  To help avoid distracting from the topic at hand, it is always preferable to
    
    1316
    +  reuse the same project sample material from other examples and only deviate
    
    1317
    +  slightly to demonstrate the new material, than to create completely new projects.
    
    1318
    +
    
    1319
    +  This helps us remain focused on a single topic at a time, and reduces the amount
    
    1320
    +  of unrelated material the reader needs to learn in order to digest the new
    
    1321
    +  example.
    
    1322
    +
    
    1323
    +* **Don't be redundant**
    
    1324
    +
    
    1325
    +  When something has already been explained in the tutorial or in another example,
    
    1326
    +  it is best to simply refer to the other user guide entry in a new example.
    
    1327
    +
    
    1328
    +  Always prefer to link to the tutorial if an explanation exists in the tutorial,
    
    1329
    +  rather than linking to another example, where possible.
    
    1330
    +
    
    1331
    +* **Link into the reference manual at every opportunity**
    
    1332
    +
    
    1333
    +  The format and plugin API is 100% documented at all times. Whenever discussing
    
    1334
    +  anything about the format or plugin API, always do so while providing a link
    
    1335
    +  into the more terse reference material.
    
    1336
    +
    
    1337
    +  We don't want users to have to search for the material themselves, and we also
    
    1338
    +  want the user to become proficient at navigating the reference material over
    
    1339
    +  time.
    
    1340
    +
    
    1341
    +* **Use concise terminology**
    
    1342
    +
    
    1343
    +  As developers, we tend to come up with code names for features we develop, and
    
    1344
    +  then end up documenting a new feature in an example.
    
    1345
    +
    
    1346
    +  Never use a code name or shorthand to refer to a feature in the user guide, instead
    
    1347
    +  always use fully qualified sentences outlining very explicitly what we are doing
    
    1348
    +  in the example, or what the example is for in the case of a title.
    
    1349
    +
    
    1350
    +  We need to be considerate that the audience of our user guide is probably a
    
    1351
    +  proficient developer or integrator, but has no idea what we might have decided
    
    1352
    +  to name a given activity.
    
    1353
    +
    
    1354
    +
    
    1355
    +Structure of an example
    
    1356
    +'''''''''''''''''''''''
    
    1357
    +The :ref:`tutorial <tutorial>` and the :ref:`examples <examples>` sections
    
    1358
    +of the documentation contain a series of sample projects, each chapter in
    
    1359
    +the tutoral, or standalone example uses a sample project.
    
    1360
    +
    
    1361
    +Here is the the structure for adding new examples and tutorial chapters.
    
    1273 1362
     
    
    1274 1363
     * The example has a ``${name}``.
    
    1275 1364
     
    
    ... ... @@ -1280,11 +1369,17 @@ examples, here are the criteria for an example addition.
    1280 1369
     * The example has a documentation component.
    
    1281 1370
     
    
    1282 1371
       * This is added at ``doc/source/examples/${name}.rst``
    
    1283
    -  * A reference to ``examples/${name}`` is added to the toctree in ``doc/source/examples.rst``
    
    1372
    +  * An entry for ``examples/${name}`` is added to the toctree in ``doc/source/using_examples.rst``
    
    1284 1373
       * This documentation discusses the project elements declared in the project and may
    
    1285 1374
         provide some BuildStream command examples.
    
    1286 1375
       * This documentation links out to the reference manual at every opportunity.
    
    1287 1376
     
    
    1377
    +  .. note::
    
    1378
    +
    
    1379
    +     In the case of a tutorial chapter, the ``.rst`` file is added in at
    
    1380
    +     ``doc/source/tutorial/${name}.rst`` and an entry for ``tutorial/${name}``
    
    1381
    +     is added to ``doc/source/using_tutorial.rst``.
    
    1382
    +
    
    1288 1383
     * The example has a CI test component.
    
    1289 1384
     
    
    1290 1385
       * This is an integration test added at ``tests/examples/${name}``.
    

  • doc/source/main_using.rst
    1 1
     
    
    2 2
     
    
    3
    +.. _using:
    
    4
    +
    
    3 5
     Using
    
    4 6
     =====
    
    5 7
     This section includes user facing documentation including tutorials,
    

  • doc/source/using_examples.rst
    1 1
     
    
    2
    +
    
    3
    +.. _examples:
    
    4
    +
    
    2 5
     Examples
    
    3 6
     ========
    
    4 7
     This page contains documentation for real examples of BuildStream projects,
    

  • doc/source/using_tutorial.rst
    1 1
     
    
    2
    +
    
    3
    +.. _tutorial:
    
    4
    +
    
    2 5
     Tutorial
    
    3 6
     ========
    
    4 7
     This is a step by step walkthrough meant help the user quickly get
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]