Skip to content
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
13 changes: 5 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,14 @@ jobs:
- name: Checkout
uses: actions/checkout@v5

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test_requirements.txt
run: uv sync --locked --dev

- name: Run tests
run: python -m pytest
continue-on-error: false
run: uv run pytest
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
8 changes: 5 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ Setup

First fork the repository and clone your fork.

Install the dependencies:
We use [uv](https://docs.astral.sh/uv/) to manage dependencies.
All `uv` commands will implicitly install the required dependencies,
however you can also explicitly install them with `uv sync`:

.. code-block:: console

pip install -r requirements.txt -r test_requirements.txt
uv sync

Running the tests
-----------------

.. code-block:: console

pytest
uv run pytest

This also runs E2E tests that verify that `mutmut run` produces the same output as before. If your code changes should change the output of `mutmut run` and this test fails, try to delete the `snapshots/*.json` files (as described in the test errors).

Expand Down
6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

52 changes: 0 additions & 52 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ You can add and override pytest arguments:
.. code-block:: python

# for CLI args that select or deselect tests, use `pytest_add_cli_args_test_selection`
pytest_add_cli_args_test_selection = ["-m", "not fail", "-k=test_include"]
pytest_add_cli_args_test_selection = ["-m", "not fail", "-k", "test_include"]

# for other CLI args, use `pytest_add_cli_args`
pytest_add_cli_args = ["-p", "no:some_plugin"] # disable a plugin
Expand Down
62 changes: 62 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[project]
name = "mutmut"
version = "3.3.1"
description = "mutation testing for Python 3"
keyowrds = ["mutmut", "mutant", "mutation", "test", "testing"]
authors = [
{ name = "Anders Hovmöller", email = "[email protected]" },
]
requires-python = ">=3.10"
readme = "README.rst"
license = "BSD-3-Clause"
license-files = ["LICENSE"]

classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]

dependencies = [
"click>=8.0.0",
"coverage>=7.3.0",
"libcst>=1.8.5",
"pytest>=6.2.5",
"setproctitle>=1.1.0",
"textual>=1.0.0",
"toml>=0.10.2 ; python_full_version < '3.11'",
]

[project.urls]
Homepage = "https://github.com/boxed/mutmut"
Documentation = "https://mutmut.readthedocs.io/en/latest/"
Repository = "https://github.com/boxed/mutmut"
Issues = "https://github.com/boxed/mutmut/issues"
Changelog = "https://github.com/boxed/mutmut/blob/main/HISTORY.rst"


[project.scripts]
mutmut = "mutmut.__main__:cli"

[build-system]
requires = ["uv_build>=0.9.5,<0.10.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
source-include = ["HISTORY.rst"]

[dependency-groups]
dev = [
"pytest-asyncio>=1.0.0",
]

[tool.pytest.ini_options]
testpaths = [
"tests",
]
8 changes: 0 additions & 8 deletions requirements.txt

This file was deleted.

17 changes: 0 additions & 17 deletions setup.cfg

This file was deleted.

112 changes: 0 additions & 112 deletions setup.py

This file was deleted.

3 changes: 2 additions & 1 deletion mutmut/__init__.py → src/mutmut/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import importlib.metadata
from collections import defaultdict

__version__ = '3.3.1'
__version__ = importlib.metadata.version("mutmut")


duration_by_test = defaultdict(float)
Expand Down
4 changes: 2 additions & 2 deletions mutmut/__main__.py → src/mutmut/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def pytest_runtest_makereport(self, item, call):
return int(self.execute_pytest(pytest_args, plugins=[stats_collector]))

def run_tests(self, *, mutant_name, tests):
pytest_args = ['-x', '-q', '-p no:randomly', '-p no:random-order']
pytest_args = ['-x', '-q', '-p', 'no:randomly', '-p', 'no:random-order']
if tests:
pytest_args += list(tests)
else:
Expand Down Expand Up @@ -806,7 +806,7 @@ def load_config():


@click.group()
@click.version_option(mutmut.__version__)
@click.version_option()
def cli():
pass

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions test_requirements.txt

This file was deleted.

40 changes: 0 additions & 40 deletions tox.ini

This file was deleted.

Loading