Skip to content

Commit

Permalink
links checked and working now
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmeigh committed Sep 10, 2024
1 parent 2efa53a commit 556f504
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions docs/developer_guide/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ If you are using `pytest`, you can run tests that match a specific keyword by us
pytest -k "test_valid_login"

These commands allow you to target specific areas of the codebase during development, making it easier to test and debug individual components or workflows.
See the Pytest docs for additional `command line options <https://docs.pytest.org/en/stable/reference/reference.html#command-line-flags>`.
See the Pytest docs for additional `command line options <https://docs.pytest.org/en/stable/reference/reference.html#command-line-flags>`_.


Pre-commit
----------

Mantid Imaging uses `pre-commit <https://pre-commit.com/>`_: to run pre-commit hooks, ensuring code quality and consistency before changes are committed. These hooks include tasks such as linting, type checks, and formatting.
Mantid Imaging uses `pre-commit <https://pre-commit.com/>`_ to run pre-commit hooks, ensuring code quality and consistency before changes are committed. These hooks include tasks such as linting, type checks, and formatting.

To enable pre-commit hooks, you must manually install them by running::

Expand All @@ -57,21 +58,21 @@ This command executes all pre-commit hooks across the entire codebase, including
Unit testing
------------

Unit tests can be run using `pytest <https://docs.pytest.org/>`_:, e.g.::
Unit tests can be run using `pytest <https://docs.pytest.org/>`_, e.g.::

make pytest

For options such as running a subset of tests, see `PyTest Docs <https://docs.pytest.org/en/stable/usage.html>`_
For options such as running a subset of tests, see `PyTest Docs <https://docs.pytest.org/en/stable/usage.html>`_.


Static analysis
---------------

Mantid Imaging uses several tools to ensure high code quality and consistency:

- :code:`mypy <http://mypy-lang.org/>`_: Enforces type correctness to catch potential type errors early.
- :code:`ruff <https://beta.ruff.rs/docs/>`_: Checks for common syntax and style issues to maintain clean, readable code.
- :code:`yapf <https://github.com/google/yapf>`_: Formats code according to PEP 8 standards, ensuring consistent style.
- `mypy <http://mypy-lang.org/>`_: Enforces type correctness to catch potential type errors early.
- `ruff <https://beta.ruff.rs/docs/>`_: Checks for common syntax and style issues to maintain clean, readable code.
- `yapf <https://github.com/google/yapf>`_: Formats code according to PEP 8 standards, ensuring consistent style.

These tools can be run collectively with:

Expand All @@ -87,7 +88,7 @@ Or individually for specific tasks:
GUI Screenshot Testing
----------------------

Mantid Imaging uses `Applitools Eyes <https://applitools.com/products-eyes/>`_: for GUI approval testing. During this process, screenshots of application windows are captured and compared against known good baseline images to detect any unintended visual changes. This process is integrated into the GitHub Actions workflow and runs automatically on pull requests.
Mantid Imaging uses `Applitools Eyes <https://applitools.com/products-eyes/>`_ for GUI approval testing. During this process, screenshots of application windows are captured and compared against known good baseline images to detect any unintended visual changes. This process is integrated into the GitHub Actions workflow and runs automatically on pull requests.

The tests can also be run locally, with options tailored for different platforms:

Expand Down

0 comments on commit 556f504

Please sign in to comment.