Skip to content
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

Merged
merged 2 commits into from
Jul 17, 2018
Merged

Add a system overview section on the landing page #867 #897

merged 2 commits into from
Jul 17, 2018

Conversation

gaborbernat
Copy link
Member

@gaborbernat gaborbernat commented Jul 10, 2018

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.

@gaborbernat gaborbernat added feature:new something does not exist yet, but should area:documentation needs:review somebody who thinks they know what they are doing should have a look at this level:easy rought estimate that this might be quite easy to implement labels Jul 10, 2018
@gaborbernat gaborbernat added this to the 3.2 milestone Jul 10, 2018
@codecov
Copy link

codecov bot commented Jul 10, 2018

Codecov Report

Merging #897 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 95f5476...9540e26. Read the comment docs.

@obestwalter
Copy link
Member

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 setup.py less project) or you could install a devlopment version.

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.

@gaborbernat
Copy link
Member Author

gaborbernat commented Jul 10, 2018

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.

@obestwalter
Copy link
Member

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.

@gaborbernat gaborbernat force-pushed the master branch 5 times, most recently from af63a7d to cb3d244 Compare July 11, 2018 09:19
@gaborbernat
Copy link
Member Author

@obestwalter did you manage to get to this? thanks!

@obestwalter
Copy link
Member

obestwalter commented Jul 11, 2018

Hi @gaborbernat, I will be able to dedicate this friday to tox properly and try to catch up then.

@obestwalter
Copy link
Member

BTW - did you watch the video? What do you think about us trying to apply this to the tox documentation?

@gaborbernat
Copy link
Member Author

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.

@obestwalter
Copy link
Member

I think I will take the friday to have a proper look at our existing docs and go from there.

@gaborbernat gaborbernat force-pushed the master branch 4 times, most recently from 80d369c to c4923ca Compare July 11, 2018 10:08
@gaborbernat gaborbernat force-pushed the master branch 10 times, most recently from 74add49 to bb4a94c Compare July 11, 2018 17:15

..
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
Copy link
Member

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
Copy link
Member

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.  

Copy link
Member Author

@gaborbernat gaborbernat Jul 17, 2018

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.

Copy link
Member

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.
Copy link
Member

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``.

Copy link
Member Author

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
Copy link
Member

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.

Copy link
Member Author

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
Copy link
Member

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.
Copy link
Member

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 :)``.
Copy link
Member

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.
Copy link
Member

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`.

@gaborbernat gaborbernat merged commit b6bcd27 into tox-dev:master Jul 17, 2018
@gaborbernat gaborbernat deleted the general branch July 19, 2018 15:13
@asottile asottile removed their assignment Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:documentation feature:new something does not exist yet, but should level:easy rought estimate that this might be quite easy to implement needs:review somebody who thinks they know what they are doing should have a look at this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

general overview of tox - documentation
4 participants