@@ -348,7 +348,8 @@ simple code examples that demonstrate how to use various features are always wel
348
348
349
349
350
350
All documentation is contained in the :file: `doc/ ` directory of the source repository and is written in `reStructuredText `_.
351
- The .rst files are then processed by `Sphinx `_ to produce the final documentation.
351
+ The .rst files are then processed by `Sphinx `_ to produce the final documentation. See the :ref: `tox_commands ` section for
352
+ details on how to build the final documentation.
352
353
353
354
.. _`reStructuredText` : http://docutils.sourceforge.net/rst.html
354
355
.. _`Sphinx` : http://www.sphinx-doc.org/en/master/
@@ -375,6 +376,8 @@ part of the project.
375
376
376
377
:command: `tox `
377
378
379
+ See :ref: `tox_commands ` for more information on using Tox.
380
+
378
381
3. If any tests fail, you should investigate and correct the failure *before * making any changes.
379
382
#. Make your code changes
380
383
#. Include new tests that validate your changes
@@ -390,19 +393,6 @@ All code submissions must meet the following requirements before the pull reques
390
393
.. _`numpydoc` : https://numpydoc.readthedocs.io/en/latest/format.html
391
394
392
395
393
- Useful tox commands
394
- ++++++++++++
395
- flake8
396
- pytest
397
-
398
- tox
399
- tox -e pyXX-flake8 # Linting/style checker
400
- tox -e pyXX-flake8 src/sasctl/...
401
- tox -e pyXX-tests
402
- tox -e pyXX-doc
403
- tox -e pyXX-tests -- python
404
-
405
-
406
396
407
397
.. _testing :
408
398
@@ -432,6 +422,58 @@ And finally, the :doc:`tox <tox:index>` module is used to ensure that **sasctl**
432
422
Python versions.
433
423
434
424
425
+ .. _tox_commands :
426
+
427
+ Useful Tox Commands
428
+ +++++++++++++++++++
429
+ :mod: `tox ` is used to automate common development tasks such as testing, linting, and building documentation.
430
+ Running :program: `tox ` from the project root directory will automatically build virtual environments for all Python interpreters
431
+ found on the system and then install the required packages necessary to perform a given task. The simplest way to run Tox is:
432
+
433
+ .. code ::
434
+
435
+ $ tox
436
+
437
+ This will run the :mod: `flake8 ` linter followed by :mod: `pytest ` to test the code against all Python runtimes
438
+ found on the machine. One of the great features of Tox is the ability to run specific tasks by specifying the environment to run.
439
+ A few useful environments are listed below, where **XX ** indicates a Python version present in your development environment,
440
+ such as '27' or '36'.
441
+
442
+ #.
443
+ .. code ::
444
+
445
+ $ tox -e pyXX-flake8
446
+
447
+ Runs the flake8 linter against all **sasctl ** source code.
448
+
449
+ #.
450
+ .. code ::
451
+
452
+ $ tox -e pyXX-flake8 src/sasctl/tasks.py
453
+
454
+ Runs the flake8 linter against a specific file.
455
+
456
+ #.
457
+ .. code ::
458
+
459
+ $ tox -e pyXX-tests
460
+
461
+ Runs all tests using the specified Python interpreter.
462
+
463
+ #.
464
+ .. code ::
465
+
466
+ $ tox -e pyXX-doc
467
+
468
+ Builds the documentation.
469
+
470
+ #.
471
+ .. code ::
472
+
473
+ $ tox -e pyXX-tests -- python
474
+
475
+ Starts a Python REPL in an environment with **sasctl ** already installed.
476
+
435
477
Release History
436
478
---------------
437
479
0 commit comments