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

Added consistent spelling #581

Merged
merged 9 commits into from
Mar 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Special thanks to our contributors:
- Support users specifying an undeclared parametrization of python via `--extra-python` (#361)
- Support double-digit minor version in `python` keyword (#367)
- Add `py.typed` to `manifest.in` (#360)
- Update nox to latest supported python versions. (#362)
- Update Nox to latest supported python versions. (#362)
DiddiLeija marked this conversation as resolved.
Show resolved Hide resolved
- Decouple merging of `--python` with `nox.options` from `--sessions` and `--keywords` (#359)
- Do not merge command-line options in place (#357)

Expand Down Expand Up @@ -180,7 +180,7 @@ Special thanks to our contributors:
- Add `venv` as an option for `venv_backend`. (#231)
- Add gdbgui to list of projects. (#235)
- Add mypy to Nox's lint. (#230)
- Add pipx to projects that use nox. (#225)
- Add pipx to projects that use Nox. (#225)
- Add `session(venv_backend='conda')` option to use Conda environments. (#217, #221)
- Document how to call builtins on Windows. (#223)
- Replace `imp.load_source()` with `importlib`. (#214)
Expand Down Expand Up @@ -345,7 +345,7 @@ Other changes:

## v0.18.1

* Fix nox not returning a non-zero exit code on failure. (#55)
* Fix Nox not returning a non-zero exit code on failure. (#55)
* Restore result and report output. (#57)

## v0.18.0
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ side of including lots of information, such as:
## Running tests

Nox runs its own tests (it's recursive!). The best thing to do is start with
a known-good nox installation, e.g. from PyPI:
a known-good Nox installation, e.g. from PyPI:

pip install --pre --upgrade nox

Expand Down
10 changes: 5 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# nox documentation build configuration file, created by
# Nox documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 28 00:05:25 2016.
#
# This file is execfile()d with the current directory set to its
Expand All @@ -24,7 +24,7 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# Note: even though nox is installed when the docs are built, there's a
# Note: even though Nox is installed when the docs are built, there's a
# possibility it's installed as a bytecode-compiled binary (.egg). So,
# include the source anyway.
sys.path.insert(0, os.path.abspath(".."))
Expand Down Expand Up @@ -254,7 +254,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "nox.tex", "nox Documentation", "Alethea Katherine Flowers", "manual"),
(master_doc, "nox.tex", "Nox Documentation", "Alethea Katherine Flowers", "manual"),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -282,7 +282,7 @@

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "nox", "nox Documentation", [author], 1)]
man_pages = [(master_doc, "nox", "Nox Documentation", [author], 1)]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -297,7 +297,7 @@
(
master_doc,
"nox",
"nox Documentation",
"Nox Documentation",
author,
"nox",
"One line description of project.",
Expand Down
2 changes: 1 addition & 1 deletion docs/cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Nox is super easy to get started with, and super powerful right out of the box.

The kind of sessions that make you think "I didn't know you could do that!"

This cookbook is intended to be a centralized, community-driven repository of awesome Nox sessions to act as a source of inspiration and a reference guide for nox's users. If you're doing something cool with Nox, why not add your session here?
This cookbook is intended to be a centralized, community-driven repository of awesome Nox sessions to act as a source of inspiration and a reference guide for Nox's users. If you're doing something cool with Nox, why not add your session here?


Contributing a Session
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ And if you run ``nox --sessions lint`` Nox will just run the lint session:
nox > Session lint was successful.


In the noxfile, you can specify a default set of sessions to run. If so, a plain
In the Noxfile, you can specify a default set of sessions to run. If so, a plain
``nox`` call will only trigger certain sessions:

.. code-block:: python
Expand Down
18 changes: 9 additions & 9 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ The order that sessions are executed is the order that they appear in the Noxfil
Specifying one or more sessions
-------------------------------

By default Nox will run all sessions defined in the noxfile. However, you can choose to run a particular set of them using ``--session``, ``-s``, or ``-e``:
By default Nox will run all sessions defined in the Noxfile. However, you can choose to run a particular set of them using ``--session``, ``-s``, or ``-e``:

.. code-block:: console

Expand Down Expand Up @@ -110,7 +110,7 @@ Then running ``nox --session tests`` will actually run all parametrized versions
Changing the sessions default backend
-------------------------------------

By default nox uses ``virtualenv`` as the virtual environment backend for the sessions, but it also supports ``conda``, ``mamba``, and ``venv`` as well as no backend (passthrough to whatever python environment nox is running on). You can change the default behaviour by using ``-db <backend>`` or ``--default-venv-backend <backend>``. Supported names are ``('none', 'virtualenv', 'conda', 'mamba', 'venv')``.
By default Nox uses ``virtualenv`` as the virtual environment backend for the sessions, but it also supports ``conda``, ``mamba``, and ``venv`` as well as no backend (passthrough to whatever python environment Nox is running on). You can change the default behaviour by using ``-db <backend>`` or ``--default-venv-backend <backend>``. Supported names are ``('none', 'virtualenv', 'conda', 'mamba', 'venv')``.

.. code-block:: console

Expand All @@ -128,7 +128,7 @@ Note that using this option does not change the backend for sessions where ``ven
Forcing the sessions backend
----------------------------

You might work in a different environment than a project's default continuous integration settings, and might wish to get a quick way to execute the same tasks but on a different venv backend. For this purpose, you can temporarily force the backend used by **all** sessions in the current nox execution by using ``-fb <backend>`` or ``--force-venv-backend <backend>``. No exceptions are made, the backend will be forced for all sessions run whatever the other options values and nox file configuration. Supported names are ``('none', 'virtualenv', 'conda', 'venv')``.
You might work in a different environment than a project's default continuous integration settings, and might wish to get a quick way to execute the same tasks but on a different venv backend. For this purpose, you can temporarily force the backend used by **all** sessions in the current Nox execution by using ``-fb <backend>`` or ``--force-venv-backend <backend>``. No exceptions are made, the backend will be forced for all sessions run whatever the other options values and Noxfile configuration. Supported names are ``('none', 'virtualenv', 'conda', 'venv')``.

.. code-block:: console

Expand All @@ -138,7 +138,7 @@ You might work in a different environment than a project's default continuous in

You can also set this option in the Noxfile with ``nox.options.force_venv_backend``. In case both are provided, the commandline argument takes precedence.

Finally note that the ``--no-venv`` flag is a shortcut for ``--force-venv-backend none`` and allows to temporarily run all selected sessions on the current python interpreter (the one running nox).
Finally note that the ``--no-venv`` flag is a shortcut for ``--force-venv-backend none`` and allows to temporarily run all selected sessions on the current python interpreter (the one running Nox).

.. code-block:: console

Expand Down Expand Up @@ -206,7 +206,7 @@ using the ``python`` specified for the current ``PATH``::
Stopping if any session fails
-----------------------------

By default nox will continue to run all sessions even if one fails. You can use ``--stop-on-first-error`` to make nox abort as soon as the first session fails::
By default Nox will continue to run all sessions even if one fails. You can use ``--stop-on-first-error`` to make Nox abort as soon as the first session fails::

nox --stop-on-first-error

Expand Down Expand Up @@ -244,7 +244,7 @@ If the Noxfile sets ``nox.options.error_on_external_run``, you can override the
Specifying a different configuration file
-----------------------------------------

If for some reason your noxfile is not named *noxfile.py*, you can use ``--noxfile`` or ``-f``:
If for some reason your Noxfile is not named *noxfile.py*, you can use ``--noxfile`` or ``-f``:

.. code-block:: console

Expand All @@ -257,7 +257,7 @@ If for some reason your noxfile is not named *noxfile.py*, you can use ``--noxfi
Storing virtualenvs in a different directory
--------------------------------------------

By default nox stores virtualenvs in ``./.nox``, however, you can change this using ``--envdir``:
By default Nox stores virtualenvs in ``./.nox``, however, you can change this using ``--envdir``:

.. code-block:: console

Expand Down Expand Up @@ -331,7 +331,7 @@ Controlling color output
By default, Nox will output colorful logs if you're using in an interactive
terminal. However, if you are redirecting ``stderr`` to a file or otherwise
not using an interactive terminal, or the environment variable ``NO_COLOR`` is
set, nox will output in plaintext. If this is not set, and ``FORCE_COLOR`` is
set, Nox will output in plaintext. If this is not set, and ``FORCE_COLOR`` is
present, color will be forced.

You can manually control Nox's output using the ``--nocolor`` and ``--forcecolor`` flags.
Expand Down Expand Up @@ -417,7 +417,7 @@ zsh
autoload -U bashcompinit
bashcompinit

# Afterwards you can enable completion for nox:
# Afterwards you can enable completion for Nox:
eval "$(register-python-argcomplete nox)"

tcsh
Expand Down
2 changes: 1 addition & 1 deletion nox/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""The nox `main` module.
"""The Nox `main` module.

This is the entrypoint for the ``nox`` command (specifically, the ``main``
function). This module primarily loads configuration, and then passes
Expand Down
8 changes: 4 additions & 4 deletions nox/_option_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

"""High-level options interface. This allows defining options just once that
can be specified from the command line and the noxfile, easily used in tests,
can be specified from the command line and the Noxfile, easily used in tests,
and surfaced in documentation."""

from __future__ import annotations
Expand Down Expand Up @@ -113,7 +113,7 @@ def flag_pair_merge_func(
command_args: Namespace,
noxfile_args: Namespace,
) -> bool:
"""Merge function for flag pairs. If the flag is set in the noxfile or
"""Merge function for flag pairs. If the flag is set in the Noxfile or
the command line params, return ``True`` *unless* the disable flag has been
specified on the command-line.

Expand Down Expand Up @@ -162,7 +162,7 @@ def make_flag_pair(
) -> tuple[Option, Option]:
"""Returns two options - one to enable a behavior and another to disable it.

The positive option is considered to be available to the noxfile, as
The positive option is considered to be available to the Noxfile, as
there isn't much point in doing flag pairs without it.
"""
disable_name = f"no_{name}"
Expand Down Expand Up @@ -309,7 +309,7 @@ def noxfile_namespace(self) -> Namespace:
def merge_namespaces(
self, command_args: Namespace, noxfile_args: Namespace
) -> None:
"""Merges the command-line options with the noxfile options."""
"""Merges the command-line options with the Noxfile options."""
command_args_copy = Namespace(**vars(command_args))
for name, option in self.options.items():
if option.merge_func:
Expand Down
16 changes: 8 additions & 8 deletions nox/_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from nox import _option_set
from nox.tasks import discover_manifest, filter_manifest, load_nox_module

"""All of nox's configuration options."""
"""All of Nox's configuration options."""

options = _option_set.OptionSet(
description="Nox is a Python automation toolkit.", add_help=False
Expand Down Expand Up @@ -86,7 +86,7 @@ def _sessions_and_keywords_merge_func(
def _default_venv_backend_merge_func(
command_args: argparse.Namespace, noxfile_args: argparse.Namespace
) -> str:
"""Merge default_venv_backend from command args and nox file. Default is "virtualenv".
"""Merge default_venv_backend from command args and Noxfile. Default is "virtualenv".

Args:
command_args (_option_set.Namespace): The options specified on the
Expand All @@ -104,7 +104,7 @@ def _default_venv_backend_merge_func(
def _force_venv_backend_merge_func(
command_args: argparse.Namespace, noxfile_args: argparse.Namespace
) -> str:
"""Merge force_venv_backend from command args and nox file. Default is None.
"""Merge force_venv_backend from command args and Noxfile. Default is None.

Args:
command_args (_option_set.Namespace): The options specified on the
Expand Down Expand Up @@ -319,7 +319,7 @@ def _session_completer(
noxfile=True,
merge_func=_default_venv_backend_merge_func,
help=(
"Virtual environment backend to use by default for nox sessions, this is"
"Virtual environment backend to use by default for Nox sessions, this is"
" ``'virtualenv'`` by default but any of ``('virtualenv', 'conda', 'mamba',"
" 'venv')`` are accepted."
),
Expand All @@ -333,8 +333,8 @@ def _session_completer(
noxfile=True,
merge_func=_force_venv_backend_merge_func,
help=(
"Virtual environment backend to force-use for all nox sessions in this run,"
" overriding any other venv backend declared in the nox file and ignoring"
"Virtual environment backend to force-use for all Nox sessions in this run,"
" overriding any other venv backend declared in the Noxfile and ignoring"
" the default backend. Any of ``('virtualenv', 'conda', 'mamba', 'venv')``"
" are accepted."
),
Expand Down Expand Up @@ -376,15 +376,15 @@ def _session_completer(
"--noxfile",
group=options.groups["general"],
default="noxfile.py",
help="Location of the Python file containing nox sessions.",
help="Location of the Python file containing Nox sessions.",
),
_option_set.Option(
"envdir",
"--envdir",
noxfile=True,
merge_func=_envdir_merge_func,
group=options.groups["environment"],
help="Directory where nox will store virtualenvs, this is ``.nox`` by default.",
help="Directory where Nox will store virtualenvs, this is ``.nox`` by default.",
),
_option_set.Option(
"extra_pythons",
Expand Down
2 changes: 1 addition & 1 deletion nox/_parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def parametrize_decorator(
Add new invocations to the underlying session function using the list of
``arg_values_list`` for the given ``arg_names``. Parametrization is
performed during session discovery and each invocation appears as a
separate session to nox.
separate session to Nox.

Args:
arg_names (Sequence[str]): A list of argument names.
Expand Down
10 changes: 5 additions & 5 deletions nox/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _parse_string_constant(node: ast.AST) -> str | None: # pragma: no cover


def _parse_needs_version(source: str, filename: str = "<unknown>") -> str | None:
"""Parse ``nox.needs_version`` from the user's noxfile."""
"""Parse ``nox.needs_version`` from the user's Noxfile."""
value: str | None = None
module: ast.Module = ast.parse(source, filename=filename)
for statement in module.body:
Expand All @@ -68,7 +68,7 @@ def _parse_needs_version(source: str, filename: str = "<unknown>") -> str | None


def _read_needs_version(filename: str) -> str | None:
"""Read ``nox.needs_version`` from the user's noxfile."""
"""Read ``nox.needs_version`` from the user's Noxfile."""
with open(filename) as io:
source = io.read()

Expand All @@ -95,12 +95,12 @@ def _check_nox_version_satisfies(needs_version: str) -> None:


def check_nox_version(filename: str) -> None:
"""Check if ``nox.needs_version`` in the user's noxfile is satisfied.
"""Check if ``nox.needs_version`` in the user's Noxfile is satisfied.

Args:

filename: The location of the user's noxfile. ``nox.needs_version`` is
read from the noxfile by parsing the AST.
filename: The location of the user's Noxfile. ``nox.needs_version`` is
read from the Noxfile by parsing the AST.

Raises:
VersionCheckFailed: The Nox version does not satisfy what
Expand Down
2 changes: 1 addition & 1 deletion nox/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Manifest:
"""Session manifest.

The session manifest provides the source of truth for the sequence of
sessions that should be run by nox.
sessions that should be run by Nox.

It is possible for this to be mutated during execution. This allows for
useful use cases, such as for one session to "notify" another or
Expand Down
2 changes: 1 addition & 1 deletion nox/py.typed
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Marker file for PEP 561. The nox package uses inline types.
# Marker file for PEP 561. The Nox package uses inline types.
Loading