-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a system overview section on the landing page #867 #897
Conversation
Codecov Report
@@ Coverage Diff @@
## master #897 +/- ##
=======================================
Coverage 92.61% 92.61%
=======================================
Files 12 12
Lines 2330 2330
Branches 409 409
=======================================
Hits 2158 2158
Misses 109 109
Partials 63 63 Continue to review full report at Codecov.
|
Oh good, this would also address where we started discussing these things: #478. What should be covered though in the explanation is, that the visualized default flow is highly configurable (e.g. you could not build a package and you could also switch off installing the package (and use tox in a I have no idea yet how and where this should be visualized/documented, but I think it should definitely be part of a high level overview to make clear that tox can do much more than the standard flow. |
I know, and if you read the explanation for the phases you can see I pointed out clearly where things change behaviour. I updated the diagram to emphasize the optional phases. |
I have to admit that I did not read very carefully on the first go, I will have a closer look tonight and might have some ideas for improvments. |
af63a7d
to
cb3d244
Compare
@obestwalter did you manage to get to this? thanks! |
Hi @gaborbernat, I will be able to dedicate this friday to tox properly and try to catch up then. |
BTW - did you watch the video? What do you think about us trying to apply this to the tox documentation? |
I did not watch the video but was there in the audience. It makes some good points. As far as our project goes I think we just need to have a different page for the plugins. |
I think I will take the friday to have a proper look at our existing docs and go from there. |
80d369c
to
c4923ca
Compare
74add49
to
bb4a94c
Compare
|
||
.. | ||
The above image raw can be found and edited by using the toxdevorg Google role account under | ||
https://www.lucidchart.com/documents/edit/5d921f32-f2e1-4618-a265-7f9e30503dc6/0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a very good idea.
doc/index.rst
Outdated
|
||
3. **environment** - for each tox environment (e.g. ``py27``, ``py36``) do: | ||
|
||
1. **environment creation**: create a fresh environment, by default Python virtual environments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about shortening that to:
create a fresh environment. By default virtualenv_ is used.
An maybe we could also mention this here?
To use `venv <https://docs.python.org/3/library/venv.html>`_ `pip install tox-venv` additionally to tox.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer having it as phase names, to help new users grasp tox run concepts. Hence I still think environment creation is better. Again let's only discuss the built-in capabilities, so no plugins please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry if that wasn't clear - I wasn't referring to the phase name, but to the explanation after that. Basically to shorten the first sentence and add the replacement info via plugin there as well (but I am not sure, if that is not overloading that part).
doc/index.rst
Outdated
means Python 2.7 and the ``basepython`` configuration value) and the current operating system | ||
``PATH`` value. This step is done at first run only (or when :confval:`basepython` value | ||
changes) and re-used at subsequent runs, unless the user requests explicitly recreating this | ||
by passing in the ``-r`` flag. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit more handwavy but maybe sufficient here?
This is created at first run only to be re-used at subsequent runs. If certain aspects of the project change, a re-creation of the environment is automatically triggered. To force the recreation (e.g. when changes weren't properly picked up), tox can be invoked with ``-r``/``--recreate``.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll use most of it other than the (e.g. when changes weren't properly picked up)
. Some changes are not tracked, but I don't think that warrants it being stated not properly.
doc/index.rst
Outdated
By default ``pip`` is used to install packages, however one can customise this via | ||
:confval:`install_command`. Note ``pip`` will not update project dependencies (specified either | ||
in the ``install_requires`` or the ``extras`` section of the ``setup.py``) if any version already | ||
exists in the virtual environment; therefore we recommend to recreate your environments entirely |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"entirely" is not necessary here (and maybe even potentially confusing?), as there is no way to recreate the environment partially.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will dop entirely
doc/index.rst
Outdated
exists in the virtual environment; therefore we recommend to recreate your environments entirely | ||
whenever your project dependencies change. | ||
|
||
3. **commands**: run one by one the specified commands. Whenever the exit code of any of them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
run the specified commands in the specified order.
doc/index.rst
Outdated
|
||
3. **commands**: run one by one the specified commands. Whenever the exit code of any of them | ||
is not zero stop, and mark the environment failed. Note, starting a command with a single dash | ||
character means ignore exit code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or:
To ignore the exit code of a command, a dash can be prefixed to the command.
doc/index.rst
Outdated
ERROR: py36: commands failed | ||
|
||
Only if all environments finished with success will the exit code of tox be success. In this | ||
case you'll also see the message ``congratulations :)``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or:
Only if all environments ran successfully tox will return `0` (success). In this case you'll also see the message ``congratulations :)``.
doc/index.rst
Outdated
environment variables not specified via :confval:`passenv`. Furthermore, it will also alter the | ||
``PATH`` variable so that your commands resolve first and foremost within the current active | ||
tox environment. It's possible to fallback to executables outside of this, however these need to | ||
be explicitly enabled via the :confval:`whitelist_external` configuration variable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not quite accurate: tox uses whatever is available, but will warn when it was not expllicitly whitelisted.
How about:
In general all executables in the path are available in ``commands``, but tox will emit a warning if it was not explicitly allowed via :confval:`whitelist_external`.
Includes a flow diagram of tox.
I find we lack a quick two-minute high-level overview of what tox is. This should help new people quickly understand easier what tox actually does and expose common gotchas.
See output at https://tox-gaborbernat.readthedocs.io/en/general/#system-overview.
Resolves #867.