Skip to content

Commit c716fb1

Browse files
authored
Improve the documentation. (#61)
1 parent a565011 commit c716fb1

16 files changed

+256
-188
lines changed

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
.. end-badges
3333
3434
35-
Features
36-
--------
35+
.. start-features
3736
3837
In its highest aspirations, pytask tries to be pytest as a build system. It's main
3938
purpose is to facilitate reproducible research by automating workflows in research
@@ -63,6 +62,8 @@ projects. Its features include:
6362
<https://pytask-dev.readthedocs.io/en/latest/tutorials/how_to_use_plugins.html>`_ how
6463
you can use plugins.
6564

65+
.. end-features
66+
6667
6768
Why do I need a build system?
6869
-----------------------------

docs/changes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>
1212
- :gh:`55` implements miscellaneous fixes to improve error message, tests and coverage.
1313
- :gh:`59` adds a tutorial on using plugins and features plugins more prominently.
1414
- :gh:`60` adds the MIT license to the project and mentions pytest and its developers.
15+
- :gh:`61` adds many changes to the documentation.
1516
- :gh:`65` adds versioneer to pytask and :gh:`66` corrects the coverage reports which
1617
were deflated due to the new files.
1718
- :gh:`67` prepares pytask to be published on PyPI.

docs/explanations/why_another_build_system.rst renamed to docs/explanations/build_systems.rst

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
Build Systems
2+
=============
3+
14
Why another build system?
2-
=========================
5+
-------------------------
36

47
There are a lot of build systems out there with existing communities who accumulated a
58
lot of experience over time. So why bother creating another build system?
@@ -96,17 +99,3 @@ Pros
9699
Cons
97100

98101
- Seems to have no plugin system.
99-
100-
101-
`cook <https://github.com/jachris/cook>`_
102-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103-
104-
Pros
105-
106-
- Still simple, maybe useful for some quick inspirations.
107-
108-
Cons
109-
110-
- Development is paused.
111-
- Designed for compiling software.
112-
- No plugin system, but extensible interfaces.

docs/explanations/design.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/explanations/index.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ systems in general as well as its design.
88
:maxdepth: 1
99

1010
why_do_i_need_a_build_system
11-
why_another_build_system
12-
design
11+
build_systems
1312
pluggy

docs/explanations/why_do_i_need_a_build_system.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ TL;DR
77
Research projects consists of complex workflows which handle data, employ models, and
88
produce figures, tables, and reports.
99

10-
Making sure that all steps of the analysis are up-to-date should not be done by hand
11-
since this process is error-prone and time-consuming.
10+
Ensuring that all steps of the analysis are up-to-date should not be done by hand since
11+
this process is error-prone and time-consuming.
1212

1313
Build systems like pytask provide an easy interface for researchers to express the
1414
relationships among the tasks in a research project and conveniently manage the

docs/index.rst

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,26 @@ pytask
66
:end-before: end-badges
77

88

9+
Features
10+
--------
11+
12+
.. include:: ../README.rst
13+
:start-after: start-features
14+
:end-before: end-features
15+
16+
17+
Installation
18+
------------
19+
920
.. include:: ../README.rst
1021
:start-after: start-installation
1122
:end-before: end-installation
1223

1324

14-
The documentation is build upon four pillars:
25+
Documentation
26+
-------------
1527

28+
If you want to know more about pytask, dive into one the following topics.
1629

1730
.. panels::
1831
:container: container pb-4
@@ -28,8 +41,7 @@ The documentation is build upon four pillars:
2841
:text: Tutorials
2942
:classes: stretched-link font-weight-bold
3043

31-
Tutorials help you to get started with pytask, explain the interface and basic
32-
capabilities.
44+
Tutorials help you to get started with pytask and how you manage your first project.
3345

3446
---
3547
:img-top: _static/images/book.svg
@@ -39,8 +51,8 @@ The documentation is build upon four pillars:
3951
:text: How-to Guides
4052
:classes: stretched-link font-weight-bold
4153

42-
How-to guides are designed to provide detailed instructions for very specific and
43-
advanced tasks.
54+
How-to guides provide instructions for very specific and advanced tasks and document
55+
best-practices.
4456

4557
---
4658
:img-top: _static/images/books.svg
@@ -50,8 +62,7 @@ The documentation is build upon four pillars:
5062
:text: Explanations
5163
:classes: stretched-link font-weight-bold
5264

53-
Explanations give detailed information on key topics and concepts which underlie the
54-
package.
65+
Explanations deal with key topics and concepts which underlie the package.
5566

5667
---
5768
:img-top: _static/images/coding.svg

docs/reference_guides/marks.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ pytask.mark.parametrize
2424

2525
.. autofunction:: _pytask.parametrize.parametrize
2626
:noindex:
27+
28+
29+
pytask.mark.try_first
30+
---------------------
31+
32+
.. function:: try_first
33+
:noindex:
34+
35+
This

docs/rtd_environment.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@ channels:
22
- conda-forge
33

44
dependencies:
5-
- python=3.8
5+
- python >= 3.6
66
- pip
77
- furo
88
- ipython
9+
- nbsphinx
910
- sphinx
10-
- sphinx-copybutton
11-
- sphinx-autodoc-typehints
1211
- sphinx-autoapi
12+
- sphinx-autodoc-typehints
1313
- sphinx-click
14+
- sphinx-copybutton
1415
- sphinx-panels
1516

1617
# Package dependencies necessary for sphinx-click
17-
- attrs
18+
- attrs >=17.4.0
1819
- click
1920
- click-default-group
2021
- networkx
21-
- pexpect
2222
- pluggy
23-
- pony >= 0.7.13
23+
- pony >=0.7.13
24+
- pexpect
2425

2526
- pip:
2627
- -e ../

docs/tutorials/how_to_debug.rst

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,38 @@
11
How to debug
22
============
33

4-
To facilitate debugging, pytask offers two command-line options.
4+
The debug mode is one of pytask's biggest strength. Whenever you encounter an error in
5+
one of your tasks, jump right into the code and inspect the cause of the exception.
56

6-
.. tip::
7+
Quick and easy feedback through a debugger is immensely valuable because it helps you to
8+
be more productive and gain more confidence in your code.
79

8-
Instead of Python's :mod:`pdb`, use `pdb++ <https://github.com/pdbpp/pdbpp>`_ which
9-
is more convenient, colorful has some useful features like the `sticky mode
10-
<https://github.com/pdbpp/pdbpp#sticky-mode>`_.
10+
To facilitate debugging, pytask offers two command-line options.
1111

1212

1313
Debugging
1414
---------
1515

16+
Running
17+
1618
.. code-block:: console
1719
1820
$ pytask --pdb
1921
2022
enables the post-mortem debugger. Whenever an exception is raised inside a task, the
2123
prompt will enter the debugger enabling you to discover the source of the exception.
2224

25+
.. seealso::
26+
27+
:doc:`A following tutorial <how_to_select_tasks>` shows you how to run only one or a
28+
subset of tasks which can be combined with the debug mode.
29+
30+
.. tip::
31+
32+
Instead of Python's :mod:`pdb`, use `pdb++ <https://github.com/pdbpp/pdbpp>`_ which
33+
is more convenient, colorful has some useful features like the `sticky mode
34+
<https://github.com/pdbpp/pdbpp#sticky-mode>`_.
35+
2336

2437
Tracing
2538
-------

0 commit comments

Comments
 (0)