Skip to content

Commit

Permalink
Apply search-and-replace for |nox| to |Nox| as a reStructuredText…
Browse files Browse the repository at this point in the history
… substitution (#2687)

* Substitution: |nox| to |Nox|

* Apply |nox| → |Nox| substitution

* Apply |nox| to |Nox| change in places excluded from pre-commit hook

* Capitalize the substitution
  • Loading branch information
namurphy committed May 13, 2024
1 parent c1c189f commit 21651ec
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 22 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-search-and-replace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@
- search: 'ion="p"'
replacement: 'ion="p+"'
description: Use canonical symbol for proton

- search: '|nox|'
replacement: '|Nox|'
description: Nox is capitalized except when used as a command
6 changes: 3 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Documentation Improvements
|tox|
via the ``tox-uv`` extension, and the |documentation guide| to reflect that
the
documentation is now built with |nox| instead of |tox| (:pr:`2590`)
documentation is now built with |Nox| instead of |tox| (:pr:`2590`)
- Add examples to the docstring for
`~plasmapy.formulary.radiation.thermal_bremsstrahlung`. (:pr:`2618`)
- Update the dependency version support policy in the |coding guide|.
Expand Down Expand Up @@ -135,12 +135,12 @@ Internal Changes and Refactorings
integration
and for documentation builds, while adding corresponding documentation.
(:pr:`2650`)
- Added :file:`noxfile.py` as a configuration file for |nox|. This file
- Added :file:`noxfile.py` as a configuration file for |Nox|. This file
initially contains
environments for building documentation, checking hyperlinks, and performing
static
type checking with |mypy| (:pr:`2654`)
- Began using |nox| for some testing environments in |GitHub Actions|,
- Began using |Nox| for some testing environments in |GitHub Actions|,
including for the
documentation build and static type checking. (:pr:`2656`)

Expand Down
2 changes: 1 addition & 1 deletion changelog/2664.internal.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Converted the |tox| environment for regenerating the requirements files
used in continuous integration checks to |nox|.
used in continuous integration checks to |Nox|.
2 changes: 1 addition & 1 deletion changelog/2681.internal.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Created a parametrized |nox| session to run tests.
Created a parametrized |Nox| session to run tests.
2 changes: 1 addition & 1 deletion changelog/2682.internal.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Added |nox| sessions to test importing PlasmaPy, validating :file:`CITATION.cff`,
Added |Nox| sessions to test importing PlasmaPy, validating :file:`CITATION.cff`,
and building a source distribution and wheel.
2 changes: 1 addition & 1 deletion docs/_global_substitutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"mpmath": "https://mpmath.org/doc/current",
"mypy": "https://mypy.readthedocs.io",
"nbsphinx": "https://nbsphinx.readthedocs.io",
"nox": "https://nox.thea.codes",
"Nox": "https://nox.thea.codes",
"Numba": "https://numba.readthedocs.io",
"NumPy": "https://numpy.org",
"office hours": "https://www.plasmapy.org/meetings/office_hours/",
Expand Down
6 changes: 3 additions & 3 deletions docs/changelog/2024.5.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Documentation Improvements
|tox|
via the ``tox-uv`` extension, and the |documentation guide| to reflect that
the
documentation is now built with |nox| instead of |tox| (:pr:`2590`)
documentation is now built with |Nox| instead of |tox| (:pr:`2590`)
- Add examples to the docstring for
`~plasmapy.formulary.radiation.thermal_bremsstrahlung`. (:pr:`2618`)
- Update the dependency version support policy in the |coding guide|.
Expand Down Expand Up @@ -135,12 +135,12 @@ Internal Changes and Refactorings
integration
and for documentation builds, while adding corresponding documentation.
(:pr:`2650`)
- Added :file:`noxfile.py` as a configuration file for |nox|. This file
- Added :file:`noxfile.py` as a configuration file for |Nox|. This file
initially contains
environments for building documentation, checking hyperlinks, and performing
static
type checking with |mypy| (:pr:`2654`)
- Began using |nox| for some testing environments in |GitHub Actions|,
- Began using |Nox| for some testing environments in |GitHub Actions|,
including for the
documentation build and static type checking. (:pr:`2656`)

Expand Down
22 changes: 11 additions & 11 deletions docs/contributing/doc_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1153,16 +1153,16 @@ Building documentation
documentation locally on your own computer. New contributors can
safely skip this section.

There are two methods for building the documentation: make_ and |nox|.
There are two methods for building the documentation: make_ and |Nox|.

* Using make_ will build the documentation based off of what is in the
current directory structure. make_ is quicker for local builds than
|nox| but requires you to install and set up all dependencies.
|Nox| but requires you to install and set up all dependencies.

* Using |nox| does not require setting up all dependencies ahead of
* Using |Nox| does not require setting up all dependencies ahead of
time, but is more computationally intensive since it creates a virtual
environment and builds the package before building the documentation.
Consequently, PlasmaPy uses |nox| for building the documentation on
Consequently, PlasmaPy uses |Nox| for building the documentation on
continuous integration testing platforms.

.. _doc-build-prereqs:
Expand All @@ -1184,20 +1184,20 @@ It may also be necessary to install the following software:

* `graphviz <https://graphviz.org/download>`__
* `pandoc <https://pandoc.org/installing.html>`__
* make_ (not necessary for building the documentation with |nox| or
* make_ (not necessary for building the documentation with |Nox| or
sphinx_build)

Building documentation
----------------------

PlasmaPy's documentation can be built using |nox|, make_, or
sphinx-build_. We recommend starting with |nox|.
PlasmaPy's documentation can be built using |Nox|, make_, or
sphinx-build_. We recommend starting with |Nox|.

.. tabs::

.. group-tab:: nox

We can use |nox| to build the documentation locally by running:
We can use |Nox| to build the documentation locally by running:

.. code-block:: bash
Expand All @@ -1207,7 +1207,7 @@ sphinx-build_. We recommend starting with |nox|.
example, use :bash:`nox -s docs -- -v` to increase output
verbosity.

Building with |nox| is well-suited for reproducible documentation
Building with |Nox| is well-suited for reproducible documentation
builds in an isolated Python environment, which is why it is used
in continuous integration tests.

Expand All @@ -1232,7 +1232,7 @@ sphinx-build_. We recommend starting with |nox|.
.. group-tab:: sphinx-build

Using sphinx-build_ allows us to choose different `options to
sphinx-build`_ than the defaults used by |nox| and make_.
sphinx-build`_ than the defaults used by |Nox| and make_.

PlasmaPy's documentation can be build by going to the top-level
directory of the repository and running:
Expand Down Expand Up @@ -1269,7 +1269,7 @@ To check hyperlinks locally, run:
.. tip::

When writing documentation, please fix any new warnings that arise.
To enforce this, the ``docs`` |nox| environment fails if there are
To enforce this, the ``docs`` |Nox| environment fails if there are
any warnings.

Troubleshooting
Expand Down
2 changes: 1 addition & 1 deletion docs/contributing/testing_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tests marked as slow.
.. important::

PlasmaPy is in the process of switching its test runner from |tox| to
|nox|. In the near future, it will likely be necessary to run ``nox``
|Nox|. In the near future, it will likely be necessary to run ``nox``
instead of ``tox`` to invoke tests.

Writing tests
Expand Down

0 comments on commit 21651ec

Please sign in to comment.