diff --git a/Pipfile b/Pipfile index cff3c9e547e..46e86dc2e59 100644 --- a/Pipfile +++ b/Pipfile @@ -9,7 +9,7 @@ alagitpull = "*" releases = "*" aafigure = "*" sphinxcontrib-napoleon = "*" -Sphinx = "*" +sphinx = "*" isort = "*" "flake8" = "*" vulture = "*" @@ -17,6 +17,7 @@ pytest = "*" pytest-rerunfailures = "*" tmuxp = {path = ".", editable = true} "e1839a8" = {path = ".", editable = true} +"doc8" = "*" [packages] kaptan = "*" @@ -24,7 +25,6 @@ libtmux = "==0.8.0" click = ">=7<8" colorama = "*" "e1839a8" = {path = ".", editable = true} -sphinx = "*" [requires] python_version = "2.7" diff --git a/Pipfile.lock b/Pipfile.lock index 32253a1c2a3..2da28db5bce 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "2c486adaf98acf9e522cf764580b65347b68f94d41e1471c3e60d3ea6f92fcdf" + "sha256": "e3efff75927fcb0d4465ec55eb7501a6ac906c336fca84920b9af28641a8350e" }, "pipfile-spec": 6, "requires": { @@ -291,6 +291,14 @@ "markers": "python_version < '3.2'", "version": "==3.5.0" }, + "doc8": { + "hashes": [ + "sha256:2df89f9c1a5abfb98ab55d0175fed633cae0cf45025b8b1e0ee5ea772be28543", + "sha256:d12f08aa77a4a65eb28752f4bc78f41f611f9412c4155e2b03f1f5d4a45efe04" + ], + "index": "pypi", + "version": "==0.8.0" + }, "docutils": { "hashes": [ "sha256:02aec4bd92ab067f6ff27a38a38a41173bf01bed8f89157768c1573f53e474a6", @@ -416,6 +424,13 @@ "markers": "python_version < '3.6'", "version": "==2.3.2" }, + "pbr": { + "hashes": [ + "sha256:1be135151a0da949af8c5d0ee9013d9eafada71237eb80b3ba8896b4f12ec5dc", + "sha256:cf36765bf2218654ae824ec8e14257259ba44e43b117fd573c8d07a9895adbdd" + ], + "version": "==4.3.0" + }, "pluggy": { "hashes": [ "sha256:6e3836e39f4d36ae72840833db137f7b7d35105079aee6ec4a62d9f80d594dd1", @@ -519,6 +534,12 @@ ], "version": "==2.19.1" }, + "restructuredtext-lint": { + "hashes": [ + "sha256:c48ca9a84c312b262809f041fe47dcfaedc9ee4879b3e1f9532f745c182b4037" + ], + "version": "==1.1.3" + }, "scandir": { "hashes": [ "sha256:04b8adb105f2ed313a7c2ef0f1cf7aff4871aa7a1883fa4d8c44b5551ab052d6", @@ -580,6 +601,13 @@ ], "version": "==1.1.0" }, + "stevedore": { + "hashes": [ + "sha256:1e153545aca7a6a49d8337acca4f41c212fbfa60bf864ecd056df0cafb9627e8", + "sha256:c7eac1c0d95824c88b655273da5c17cdde6482b2739f47c30bf851dcc9d3c2c0" + ], + "version": "==1.29.0" + }, "tmuxp": { "editable": true, "path": "." diff --git a/doc/about.rst b/doc/about.rst index 06fc9297ee9..0b693e4759b 100644 --- a/doc/about.rst +++ b/doc/about.rst @@ -12,7 +12,7 @@ Built on a object relational mapper for tmux. tmux users can reload common workspaces from YAML, JSON and :py:obj:`dict` configurations like `tmuxinator`_ and `teamocil`_. -tmuxp is used by developers for tmux automation at great companies like +tmuxp is used by developers for tmux automation at great companies like `Bugsnag`_, `Pragmatic Coders`_ and many others. To jump right in, see :ref:`quickstart` and :ref:`examples`. @@ -20,7 +20,7 @@ To jump right in, see :ref:`quickstart` and :ref:`examples`. Interested in some kung-fu or joining the effort? :ref:`api` and :ref:`developing`. -`MIT-licensed`_. Code on `github +`MIT-licensed`_. Code on `github `_. .. _Bugsnag: https://blog.bugsnag.com/benefits-of-using-tmux/ @@ -84,7 +84,7 @@ See :ref:`libtmux's internals `. **Conversion** ``$ tmuxp convert `` can convert files to and from JSON and YAML. -.. [1] While freezing and importing sessions is a great way to save time, +.. [1] While freezing and importing sessions is a great way to save time, tweaking will probably be required - There is no substitute to a config made with love. diff --git a/doc/about_tmux.rst b/doc/about_tmux.rst index 2840402548c..31b0b9ee668 100644 --- a/doc/about_tmux.rst +++ b/doc/about_tmux.rst @@ -154,10 +154,10 @@ sandwich, and re-(attach), all applications are still running! +--------+--------+ | $ bash | $ bash | | | | - | | | /------------\ - +--------+--------+ --> | detach | - | $ vim | $ bash | | 'Ctrl-b b' | - | | | \------------/ + | | | /------------\ + +--------+--------+ --> | detach | + | $ vim | $ bash | | 'Ctrl-b b' | + | | | \------------/ | | | | +--------+--------+ | /------------------/ @@ -208,7 +208,7 @@ Applications running on a remote server can be launched inside of a tmux session, detached, and reattached next timeyour `"train of thought"`_ and work. -Multitasking. Preserving the thinking you have. +Multitasking. Preserving the thinking you have. .. _"train of thought": http://en.wikipedia.org/wiki/Train_of_thought @@ -258,7 +258,7 @@ That's all it takes to launch yourself into a tmux session. Running ``$ tmux list-sessions`` or any other command for listing tmux entities (such as ``$ tmux list-windows`` or ``$ tmux list-panes``). This can generate the error "failed to connect to server". - + This could be because: - tmux server has killed its' last session, killing the server. @@ -633,7 +633,7 @@ Short cut Action ``M-o`` Rotate the panes in the current window backwards. ``M-p`` Move to the previous window with a bell or activity marker. -``C-Up, C-Down`` Resize the current pane in steps of one cell. +``C-Up, C-Down`` Resize the current pane in steps of one cell. ``C-Left, C-Right`` ``M-Up, M-Down`` Resize the current pane in steps of five cells. ``M-Left, M-Right`` diff --git a/doc/developing.rst b/doc/developing.rst index 82c30e8489c..358a765c65c 100644 --- a/doc/developing.rst +++ b/doc/developing.rst @@ -22,6 +22,9 @@ using ``$ tmux -L test_case``. Install the latest code from git -------------------------------- +Using pip +^^^^^^^^^ + To begin developing, check out the code from github: .. code-block:: bash @@ -56,6 +59,48 @@ adjust the code and the installed software will reflect the changes. $ tmuxp +Using pipenv +^^^^^^^^^^^^ + +To begin developing, check out the code from github: + +.. code-block:: bash + + $ git clone git@github.com:tmux-python/tmuxp.git + $ cd tmuxp + +You can create a virtualenv, and install all of the locked +packages as listed in Pipfile.lock: + +.. code-block:: bash + + $ pipenv install --ignore-pipfile --dev + +If you prefer to install updated packages based on Pipfile only, not being +bound by Pipfile.lock: + +.. code-block:: bash + + $ pipenv install --skip-lock --dev + +If you ever need to update packages during your development session, the +following command can be used to update all packages as per Pipfile settings or +individual package (second command): + +.. code-block:: bash + + $ pipenv update --dev + $ pipenv update requests + +Then activate it to your current tty / terminal session with: + +.. code-block:: bash + + $ pipenv shell + +That is it! You are now ready to code! + + Test Runner ----------- @@ -76,7 +121,7 @@ If you found a problem or are trying to write a test, you can file an .. _test_specific_tests: Test runner options -~~~~~~~~~~~~~~~~~~~ +^^^^^^^^^^^^^^^^^^^ Test only a file: @@ -101,7 +146,7 @@ Multiple can be separated by spaces: .. _test_builder_visually: Visual testing -~~~~~~~~~~~~~~ +-------------- You can watch tmux testsuite build sessions visually by keeping a client open in a separate terminal. @@ -114,7 +159,7 @@ Create two terminals: version of tmuxp above. Then: .. code-block:: bash - + $ py.test tests/test_workspacebuilder.py Terminal 1 should have flickered and built the session before your eyes. @@ -147,7 +192,7 @@ argument`_: $ make watch_test test='-x tests/test_config.py tests/test_util.py' Rebuild sphinx docs on save -~~~~~~~~~~~~~~~~~~~~~~~~~~~ +--------------------------- Rebuild the documentation when an ``.rst`` file is edited: @@ -178,7 +223,7 @@ this will load the ``.tmuxp.yaml`` in the root of the project. .. _travis: Travis CI -~~~~~~~~~ +--------- tmuxp uses `travis-ci`_ for continuous integration / automatic unit testing. diff --git a/doc/examples.rst b/doc/examples.rst index 56a5895c998..6792d377e8e 100644 --- a/doc/examples.rst +++ b/doc/examples.rst @@ -183,12 +183,12 @@ In this case of this example, assuming the username "user":: $ MY_ENV_VAR=foo tmuxp load examples/env-variables.yaml -and your session name will be ``session - user (foo)``. +and your session name will be ``session - user (foo)``. -Shell variables in ``shell_command`` do not support this type of +Shell variables in ``shell_command`` do not support this type of concatenation. ``shell_command`` and ``shell_command_before`` both support normal shell variables, since they are sent into panes -automatically via ``send-key`` in ``tmux(1)``. See ``ls $PWD`` in +automatically via ``send-key`` in ``tmux(1)``. See ``ls $PWD`` in example. If you have a special case and would like to see behavior changed, @@ -369,7 +369,7 @@ A successful script will exit with a status of ``0``. Important: the script file must be chmod executable ``+x`` or ``755``. Run a python script (and check for it's return code), the script is -*relative to the ``.tmuxp.yaml``'s root* (Windows and panes omitted in +*relative to the ``.tmuxp.yaml``'s root* (Windows and panes omitted in this example): .. code-block:: yaml @@ -450,7 +450,8 @@ packages are installed: - blank - pipenv run ./manage.py runserver -You can also source yourself into the virtual environment using ``shell_command_before``: +You can also source yourself into the virtual environment using +``shell_command_before``: .. code-block:: yaml diff --git a/doc/glossary.rst b/doc/glossary.rst index dcdea84f761..b30f406a2e4 100644 --- a/doc/glossary.rst +++ b/doc/glossary.rst @@ -37,7 +37,7 @@ Glossary Session Inside a tmux :term:`server`. - + The session has 1 or more :term:`Window`. The bottom bar in tmux show a list of windows. Normally they can be navigated with ``Ctrl-a [0-9]``, ``Ctrl-a n`` and ``Ctrl-a p``. diff --git a/requirements/doc.txt b/requirements/doc.txt index a89ae1585ed..2df461eb838 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -5,3 +5,4 @@ alagitpull==0.0.21 releases==1.6.1 aafigure==0.6 sphinxcontrib-napoleon==0.7 +doc8==0.8.0