pytest-flakefighters 0.0.0__tar.gz → 0.1.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pytest_flakefighters-0.1.5/.github/workflows/publish-pypi.yaml +32 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/.gitignore +6 -0
- pytest_flakefighters-0.1.5/.readthedocs.yaml +27 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/PKG-INFO +4 -25
- pytest_flakefighters-0.1.5/docs/Makefile +20 -0
- pytest_flakefighters-0.1.5/docs/source/_static/css/custom.css +49 -0
- pytest_flakefighters-0.1.5/docs/source/_static/images/favicon.png +0 -0
- pytest_flakefighters-0.1.5/docs/source/_static/images/logo.png +0 -0
- pytest_flakefighters-0.1.5/docs/source/acknowlegements.rst +10 -0
- {pytest_flakefighters-0.0.0/docs → pytest_flakefighters-0.1.5/docs/source}/conf.py +34 -11
- pytest_flakefighters-0.1.5/docs/source/configuration.rst +26 -0
- pytest_flakefighters-0.1.5/docs/source/dev/actions_and_webhooks.rst +29 -0
- pytest_flakefighters-0.1.5/docs/source/dev/documentation.rst +58 -0
- pytest_flakefighters-0.1.5/docs/source/dev/version_release.rst +31 -0
- pytest_flakefighters-0.1.5/docs/source/glossary.rst +7 -0
- pytest_flakefighters-0.1.5/docs/source/index.rst +114 -0
- pytest_flakefighters-0.1.5/docs/source/installation.rst +65 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/pyproject.toml +9 -4
- pytest_flakefighters-0.1.5/src/_version.py +34 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/flakefighters/coverage_independence.py +6 -5
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/flakefighters/deflaker.py +4 -3
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/flakefighters/traceback_matching.py +8 -3
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/function_coverage.py +1 -1
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/main.py +6 -1
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/plugin.py +1 -1
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/rerun_strategies.py +1 -1
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters.egg-info/PKG-INFO +4 -25
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters.egg-info/SOURCES.txt +15 -2
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters.egg-info/requires.txt +2 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters.egg-info/top_level.txt +1 -0
- pytest_flakefighters-0.0.0/docs/Makefile +0 -192
- pytest_flakefighters-0.0.0/docs/index.rst +0 -21
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/.github/workflows/ci-mega-linter.yml +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/.github/workflows/ci-tests-drafts.yaml +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/.github/workflows/ci-tests.yaml +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/.mega-linter.yaml +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/.pre-commit-config.yaml +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/LICENSE +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/README.md +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/docs/make.bat +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/setup.cfg +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/__init__.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/database_management.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/flakefighters/__init__.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters/flakefighters/abstract_flakefighter.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters.egg-info/dependency_links.txt +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/src/pytest_flakefighters.egg-info/entry_points.txt +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/__init__.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/conftest.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/flakefighters/test_coverage_independence.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/flakefighters/test_deflaker.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/flakefighters/test_traceback_matching.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/resources/deflaker_broken.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/resources/deflaker_example.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/resources/flaky_reruns.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/resources/pass_fail_flaky.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/resources/test.txt +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/resources/triangle.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/test_database_management.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/test_end_2_end.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/test_function_coverage.py +0 -0
- {pytest_flakefighters-0.0.0 → pytest_flakefighters-0.1.5}/tests/test_rerun_strategies.py +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- v*
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build-release:
|
|
10
|
+
name: Build and publish PyPI
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
with:
|
|
15
|
+
fetch-depth: 0
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: '3.10'
|
|
20
|
+
|
|
21
|
+
- name: Install build tools
|
|
22
|
+
run: |
|
|
23
|
+
pip install --upgrade pip setuptools wheel build setuptools_scm
|
|
24
|
+
|
|
25
|
+
- name: Build Package
|
|
26
|
+
run: |
|
|
27
|
+
python -m build --no-isolation
|
|
28
|
+
|
|
29
|
+
- name: Publish package to PyPI
|
|
30
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
31
|
+
with:
|
|
32
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -70,6 +70,9 @@ instance/
|
|
|
70
70
|
|
|
71
71
|
# Sphinx documentation
|
|
72
72
|
docs/_build/
|
|
73
|
+
docs/build/
|
|
74
|
+
docs/source/autoapi
|
|
75
|
+
.ipynb_checkpoints/
|
|
73
76
|
|
|
74
77
|
# PyBuilder
|
|
75
78
|
.pybuilder/
|
|
@@ -209,3 +212,6 @@ __marimo__/
|
|
|
209
212
|
megalinter-reports/
|
|
210
213
|
|
|
211
214
|
*.db
|
|
215
|
+
|
|
216
|
+
# Hide autogenerated sourcecode docs
|
|
217
|
+
docs/source/autoapi
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Set the version of Python
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-20.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.10"
|
|
13
|
+
|
|
14
|
+
# Build documentation in the docs/ directory with Sphinx
|
|
15
|
+
sphinx:
|
|
16
|
+
configuration: docs/source/conf.py
|
|
17
|
+
|
|
18
|
+
# If using Sphinx, optionally build your docs in additional formats such as PDF
|
|
19
|
+
# formats:
|
|
20
|
+
# - pdf
|
|
21
|
+
|
|
22
|
+
# Optionally declare the Python requirements required to build your docs
|
|
23
|
+
python:
|
|
24
|
+
install:
|
|
25
|
+
- requirements: docs/source/requirements.txt
|
|
26
|
+
- method: pip
|
|
27
|
+
path: . # This should tell RTD to install the CTF from root to render the Estimators page correctly.
|
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-flakefighters
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: Pytest plugin implementing flaky test failure detection and classification.
|
|
5
5
|
Author: TestFLARE Team
|
|
6
|
-
|
|
7
|
-
The MIT License (MIT)
|
|
8
|
-
|
|
9
|
-
Copyright (c) 2025 TestFLARE Team
|
|
10
|
-
|
|
11
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
-
in the Software without restriction, including without limitation the rights
|
|
14
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
-
furnished to do so, subject to the following conditions:
|
|
17
|
-
|
|
18
|
-
The above copyright notice and this permission notice shall be included in
|
|
19
|
-
all copies or substantial portions of the Software.
|
|
20
|
-
|
|
21
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
27
|
-
THE SOFTWARE.
|
|
28
|
-
|
|
29
|
-
Project-URL: Repository, https://github.com/test-flare/pytest-flakefighter
|
|
6
|
+
Project-URL: Repository, https://github.com/test-flare/pytest-flakefighters
|
|
30
7
|
Requires-Python: >=3.10
|
|
31
8
|
Description-Content-Type: text/markdown
|
|
32
9
|
License-File: LICENSE
|
|
@@ -49,6 +26,8 @@ Requires-Dist: pre_commit; extra == "dev"
|
|
|
49
26
|
Requires-Dist: sphinx-autoapi; extra == "dev"
|
|
50
27
|
Requires-Dist: sphinx_rtd_theme; extra == "dev"
|
|
51
28
|
Requires-Dist: tox>=4.31.0; extra == "dev"
|
|
29
|
+
Requires-Dist: myst_parser; extra == "dev"
|
|
30
|
+
Requires-Dist: nbsphinx; extra == "dev"
|
|
52
31
|
Dynamic: license-file
|
|
53
32
|
|
|
54
33
|
# Pytest FlakeFighters
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = source
|
|
9
|
+
BUILDDIR = build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* Custom CSS */
|
|
2
|
+
|
|
3
|
+
/* Note: /*
|
|
4
|
+
The CSS below will only work if 'logo_only':True in conf.py, but will require adjusting if False.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.wy-side-nav-search a .logo {
|
|
8
|
+
max-width: 200px;
|
|
9
|
+
max-height: 170px;
|
|
10
|
+
height: auto;
|
|
11
|
+
width:auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.wy-nav-content {
|
|
15
|
+
background-color: white;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
.wy-nav-top a {
|
|
20
|
+
color: #131E29; /* Change the colour of the homepage navigation title on mobiles */
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.wy-menu-vertical p.caption {
|
|
24
|
+
|
|
25
|
+
color: #9ADBE8; /* Change the colour of captions*/
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
.rst-content code.literal, .highlight .s2, .highlight .s1, .rst-content tt.literal{
|
|
30
|
+
color: #440099;
|
|
31
|
+
font-weight: bold;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
.sig {
|
|
36
|
+
word-wrap: break-word;
|
|
37
|
+
word-break: break-word;
|
|
38
|
+
white-space: normal !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.sig-param {
|
|
42
|
+
display: inline-block;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
dl.class > dt {
|
|
46
|
+
word-wrap: break-word;
|
|
47
|
+
overflow-wrap: break-word;
|
|
48
|
+
white-space: normal !important;
|
|
49
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Acknowledgements
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
The TestFLARE project is funded by EPSRC grant `EP/X024539/1 <https://gtr.ukri.org/projects?ref=EP%2FX024539%2F1>`_.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
The TestFLARE Team
|
|
8
|
+
------------------
|
|
9
|
+
|
|
10
|
+
- Phil McMinn, Owain Parry, Michael Foster, Rimsha Chaudhry, Gregory Kapfhammer, Michael Hilton
|
|
@@ -11,14 +11,17 @@
|
|
|
11
11
|
# serve to show the default.
|
|
12
12
|
|
|
13
13
|
import os
|
|
14
|
-
import shlex
|
|
15
14
|
import sys
|
|
15
|
+
from datetime import date
|
|
16
16
|
|
|
17
17
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
18
18
|
# add these directories to sys.path here. If the directory is relative to the
|
|
19
19
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
20
20
|
# sys.path.insert(0, os.path.abspath('.'))
|
|
21
21
|
|
|
22
|
+
# Include root directory of project
|
|
23
|
+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../..")))
|
|
24
|
+
|
|
22
25
|
# -- General configuration ------------------------------------------------
|
|
23
26
|
|
|
24
27
|
# If your documentation needs a minimal Sphinx version, state it here.
|
|
@@ -28,9 +31,17 @@ import sys
|
|
|
28
31
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
29
32
|
# ones.
|
|
30
33
|
extensions = [
|
|
31
|
-
"
|
|
34
|
+
"autoclasstoc",
|
|
35
|
+
"autoapi.extension",
|
|
36
|
+
"myst_parser",
|
|
37
|
+
"nbsphinx",
|
|
38
|
+
"sphinx.ext.autodoc",
|
|
39
|
+
"sphinx.ext.autosummary",
|
|
32
40
|
]
|
|
33
41
|
|
|
42
|
+
# Get autosummary to work with templates
|
|
43
|
+
autosummary_generate = True
|
|
44
|
+
|
|
34
45
|
# Add any paths that contain templates here, relative to this directory.
|
|
35
46
|
templates_path = ["_templates"]
|
|
36
47
|
|
|
@@ -46,25 +57,25 @@ source_suffix = ".rst"
|
|
|
46
57
|
master_doc = "index"
|
|
47
58
|
|
|
48
59
|
# General information about the project.
|
|
49
|
-
project = "
|
|
50
|
-
copyright = "
|
|
51
|
-
author = "
|
|
60
|
+
project = "Pytest Flakefighters"
|
|
61
|
+
copyright = f"{date.today().year}, TestFLARE Team"
|
|
62
|
+
author = "Michael Foster, Owain Parry, Rimsha Choudhry, Phil McMinn"
|
|
52
63
|
|
|
53
64
|
# The version info for the project you're documenting, acts as replacement for
|
|
54
65
|
# |version| and |release|, also used in various other places throughout the
|
|
55
66
|
# built documents.
|
|
56
67
|
#
|
|
57
68
|
# The short X.Y version.
|
|
58
|
-
version = "0.0.1"
|
|
69
|
+
# version = "0.0.1"
|
|
59
70
|
# The full version, including alpha/beta/rc tags.
|
|
60
|
-
release = "0.0.1"
|
|
71
|
+
# release = "0.0.1"
|
|
61
72
|
|
|
62
73
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
63
74
|
# for a list of supported languages.
|
|
64
75
|
#
|
|
65
76
|
# This is also used if you do content translation via gettext catalogs.
|
|
66
77
|
# Usually you set "language" from the command line for these cases.
|
|
67
|
-
language = None
|
|
78
|
+
# language = None
|
|
68
79
|
|
|
69
80
|
# There are two options for replacing |today|: either, you set today to some
|
|
70
81
|
# non-false value, then it is used:
|
|
@@ -108,7 +119,13 @@ todo_include_todos = False
|
|
|
108
119
|
|
|
109
120
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
110
121
|
# a list of builtin themes.
|
|
111
|
-
html_theme = "
|
|
122
|
+
html_theme = "sphinx_rtd_theme"
|
|
123
|
+
|
|
124
|
+
# Path to generate documentation from using Sphinx AutoAPI
|
|
125
|
+
autoapi_dirs = [os.path.abspath(os.path.join("..", "..", "src"))]
|
|
126
|
+
autoapi_generate_api_docs = True
|
|
127
|
+
autoapi_keep_files = True
|
|
128
|
+
|
|
112
129
|
|
|
113
130
|
# Theme options are theme-specific and customize the look and feel of a theme
|
|
114
131
|
# further. For a list of options available for each theme, see the
|
|
@@ -127,17 +144,23 @@ html_theme = "alabaster"
|
|
|
127
144
|
|
|
128
145
|
# The name of an image file (relative to this directory) to place at the top
|
|
129
146
|
# of the sidebar.
|
|
130
|
-
|
|
147
|
+
html_logo = "_static/images/logo.png"
|
|
131
148
|
|
|
132
149
|
# The name of an image file (within the static path) to use as favicon of the
|
|
133
150
|
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
|
134
151
|
# pixels large.
|
|
135
|
-
|
|
152
|
+
html_favicon = "_static/images/favicon.png"
|
|
136
153
|
|
|
137
154
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
138
155
|
# relative to this directory. They are copied after the builtin static files,
|
|
139
156
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
140
157
|
html_static_path = ["_static"]
|
|
158
|
+
html_css_files = ["css/custom.css"]
|
|
159
|
+
|
|
160
|
+
html_theme_options = {
|
|
161
|
+
"style_nav_header_background": "#9ADBE8", # Set the colour using CSS
|
|
162
|
+
"logo_only": True,
|
|
163
|
+
}
|
|
141
164
|
|
|
142
165
|
# Add any extra paths that contain custom files (such as robots.txt or
|
|
143
166
|
# .htaccess) here, relative to this directory. These files are copied
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Configuration
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
The flakefighters plugin implements several cutting edge flaky test detection tools from the research community.
|
|
5
|
+
Each one is individually configurable and can be run individually or with other flakefighters.
|
|
6
|
+
You can control which flakefighters to run and provide additional configuration options from your :code:`pyproject.toml` file by including sections of the following form for each flakefighter you want to run.
|
|
7
|
+
Here, :code:`<FlakeFighterName>` is the class name of the flakefighter you wish to configure, assuming the class is in the :code:`pytest-flakefighters/flakefighters` directory.
|
|
8
|
+
::
|
|
9
|
+
[tool.pytest.ini_options.pytest_flakefighters.<FlakeFighterName>]
|
|
10
|
+
run_live=[true/false]
|
|
11
|
+
option1=value1
|
|
12
|
+
option2=value2
|
|
13
|
+
...
|
|
14
|
+
|
|
15
|
+
Every flakefighter will have a :code:`run_live` option, which can be set to :code:`true` to classify each test execution as flaky immediately after it is run, or :code:`false` to clasify all tests at once at the end, although individual flakefighters may only support one particular option.
|
|
16
|
+
Individual flakefighters have their own configurable options.
|
|
17
|
+
These are detailed below.
|
|
18
|
+
|
|
19
|
+
.. autoclass:: pytest_flakefighters.flakefighters.coverage_independence.CoverageIndependence
|
|
20
|
+
:noindex:
|
|
21
|
+
.. autoclass:: pytest_flakefighters.flakefighters.deflaker.DeFlaker
|
|
22
|
+
:noindex:
|
|
23
|
+
.. autoclass:: pytest_flakefighters.flakefighters.traceback_matching.TracebackMatching
|
|
24
|
+
:noindex:
|
|
25
|
+
.. autoclass:: pytest_flakefighters.flakefighters.traceback_matching.CosineSimilarity
|
|
26
|
+
:noindex:
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Github Actions and Webhooks
|
|
2
|
+
===========================
|
|
3
|
+
|
|
4
|
+
Actions
|
|
5
|
+
--------------
|
|
6
|
+
|
|
7
|
+
The Causal Testing Framework makes use of 5 `Github Actions <https://github.com/features/actions>`_,
|
|
8
|
+
which can be found in the
|
|
9
|
+
`.github/workflows <https://github.com/test-flare/pytest-flakefighters/tree/main/.github/workflows>`_ directory. These include:
|
|
10
|
+
|
|
11
|
+
#. ``ci-tests-drafts.yaml``, which runs continuous integration (CI) tests on each on each draft pull request.
|
|
12
|
+
|
|
13
|
+
#. ``ci-tests.yaml``, which runs continuous integration (CI) tests on each on each pull request.
|
|
14
|
+
|
|
15
|
+
#. ``ci-mega-linter.yaml``, which runs linting on each pull request.
|
|
16
|
+
|
|
17
|
+
#. ``publish-to-pypi.yaml``, runs when a new version tag is pushed and publishes that tag version to PyPI.
|
|
18
|
+
|
|
19
|
+
Webhooks
|
|
20
|
+
---------------
|
|
21
|
+
|
|
22
|
+
We also use two `Webhooks <https://docs.github.com/en/webhooks-and-events/webhooks/about-webhooks>`_, which can
|
|
23
|
+
be found in the `project settings <https://github.com/test-flare/pytest-flakefighters/settings>`_ on Github. These
|
|
24
|
+
include:
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
#. `Codecov <https://github.com/codecov>`_
|
|
28
|
+
|
|
29
|
+
#. `Read the Docs <https://github.com/readthedocs>`_
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Project Documentation
|
|
2
|
+
=====================
|
|
3
|
+
|
|
4
|
+
This page describes:
|
|
5
|
+
|
|
6
|
+
#. Our project's documentation style,
|
|
7
|
+
|
|
8
|
+
#. The tools used for documentation,
|
|
9
|
+
|
|
10
|
+
#. Read the Docs where the documentation for this project is hosted.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
Style and Tools
|
|
14
|
+
-------------------
|
|
15
|
+
|
|
16
|
+
The `Sphinx docstring format <https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format>`_ is used
|
|
17
|
+
throughout our project's codebase to allow for the easy understanding of classes, methods and functions. This format
|
|
18
|
+
allows for the easy generation of html documentation pages. It also checks for docstrings that have been added to the project's pyLint configuration.
|
|
19
|
+
|
|
20
|
+
To install the packages required to work with the documentation, please ensure the projects **dev** dependencies are installed::
|
|
21
|
+
|
|
22
|
+
pip install pytest-flakefighters[dev]
|
|
23
|
+
|
|
24
|
+
Sphinx
|
|
25
|
+
******
|
|
26
|
+
|
|
27
|
+
This project makes use of `Sphinx <https://www.sphinx-doc.org/en/master/>`_, to generate documentation. The documentation for the project sits within the `docs/` directory inside the project root.
|
|
28
|
+
To manually build the docs, first navigate to the `docs/` directory and run::
|
|
29
|
+
|
|
30
|
+
make html
|
|
31
|
+
|
|
32
|
+
This will populate `docs/build/` with static html pages containing the docs.
|
|
33
|
+
To cleanup the compiled docs you can run::
|
|
34
|
+
|
|
35
|
+
make clean
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
The source reStructuredText files (``.rst``) files can be found within the ``docs/source`` directory, which contains the
|
|
40
|
+
handwritten documentation pages and get compiled by the ``make`` commands.
|
|
41
|
+
|
|
42
|
+
Autodoc & AutoAPI
|
|
43
|
+
*****************
|
|
44
|
+
|
|
45
|
+
`Autodoc <https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>`_ is an extension to Sphinx that can import
|
|
46
|
+
code modules and compile documentation from their docstrings.
|
|
47
|
+
|
|
48
|
+
`AutoAPI <https://sphinx-autoapi.readthedocs.io/en/latest/>`_ is a third party Sphinx tool for recursively discovering
|
|
49
|
+
code modules and compiling them into a logical doctree structure
|
|
50
|
+
|
|
51
|
+
The configuration for Sphinx, Autodoc and AutoAPI can all be found in `/docs/source/conf.py <https://github.com/test-flare/pytest-flakefighters/blob/main/docs/source/conf.py>`_.
|
|
52
|
+
|
|
53
|
+
ReadTheDocs
|
|
54
|
+
-----------
|
|
55
|
+
`Read the Docs <https://readthedocs.org/>`_ is a documentation hosting site that hosts, versions and builds documentation
|
|
56
|
+
for free for open source projects.
|
|
57
|
+
|
|
58
|
+
This project makes use of a Github Webhook to trigger the build in ReadTheDocs, further reading on this can be found :doc:`here <../dev/actions_and_webhooks>`\.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Version Releases
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
This project follows the `Semantic Versioning 2.0.0 <https://semver.org/>`_ style for code releases.
|
|
5
|
+
This page describes the release process for a new framework version on the `Project Github <https://github.com/test-flare/pytest-flakefighters>`_.
|
|
6
|
+
|
|
7
|
+
How to release
|
|
8
|
+
--------------
|
|
9
|
+
|
|
10
|
+
#. Once your PR(s) are merged, navigate to https://github.com/test-flare/pytest-flakefighters/releases, which can be found on the right hand side of the projects Github main page by clicking on 'Releases'.
|
|
11
|
+
|
|
12
|
+
#. Press the **Draft a new release** button in the top right of the releases page.
|
|
13
|
+
|
|
14
|
+
#. Press the **Choose a tag** button and add the new version following the Semantic Version guidelines.
|
|
15
|
+
Please include the 'v' before the tag, e.g. **v0.0.0**.
|
|
16
|
+
|
|
17
|
+
#. Enter the same tag name into the **Release Title** box.
|
|
18
|
+
|
|
19
|
+
#. Press **Generate Release Notes** button.
|
|
20
|
+
|
|
21
|
+
#. Add any additional information that may be helpful to the release notes. If there are breaking changes for example, which modules will they affect?
|
|
22
|
+
|
|
23
|
+
#. Ensure the **Set as the latest release** checkbox is selected.
|
|
24
|
+
|
|
25
|
+
#. Press publish release.
|
|
26
|
+
|
|
27
|
+
#. Check that the Github Action worker, found in the `Actions tab <https://github.com/test-flare/pytest-flakefighters/actions>`_ has successfully completed. The typical time to publish to PyPI is around 2 minutes.
|
|
28
|
+
|
|
29
|
+
#. Check on the projects `PyPI page <https://pypi.org/project/pytest-flakefighters/>`_ that the latest release is ready!
|
|
30
|
+
|
|
31
|
+
From here the latest version can be installed using the common pip version commands. e.g. ``pip install pytest-flakefighters==0.0.0``
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.. pytest-flakefighters documentation master file, created by
|
|
2
|
+
sphinx-quickstart on Thu Oct 1 00:43:18 2015.
|
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
|
4
|
+
contain the root `toctree` directive.
|
|
5
|
+
|
|
6
|
+
Welcome to pytest Flakefighters
|
|
7
|
+
===============================================================
|
|
8
|
+
|
|
9
|
+
|status|
|
|
10
|
+
|ci-tests|
|
|
11
|
+
|code-cov|
|
|
12
|
+
|pypi|
|
|
13
|
+
|docs|
|
|
14
|
+
|python|
|
|
15
|
+
|license|
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Motivation
|
|
19
|
+
----------
|
|
20
|
+
|
|
21
|
+
:term:`Flaky tests` intermittently pass and fail without changes to test or project source code, often without an obvious cause.
|
|
22
|
+
When flaky tests proliferate, developers may loose faith in their test suites, potentially exposing end-users to the consequences of software failures.
|
|
23
|
+
|
|
24
|
+
The Extension
|
|
25
|
+
-------------
|
|
26
|
+
|
|
27
|
+
Flakefighters is a pytest extension that provides a "Swiss army knife" of techniques to detect flaky tests.
|
|
28
|
+
The extension incorporates several cutting edge flaky test detection techniques from research to automatically classify test failures as either genuine: indicating either a fault in the code or a mis-specified test case, or flaky: indicating a test with a nondeterministic outcome.
|
|
29
|
+
Flaky tests are then reported separately in the test report, and can be optionally suppressed so they don't block CI/CD pipelines.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
.. toctree::
|
|
33
|
+
:hidden:
|
|
34
|
+
:caption: Home
|
|
35
|
+
|
|
36
|
+
.. toctree::
|
|
37
|
+
:hidden:
|
|
38
|
+
:maxdepth: 1
|
|
39
|
+
:caption: Introduction
|
|
40
|
+
|
|
41
|
+
installation
|
|
42
|
+
configuration
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
.. toctree::
|
|
46
|
+
:maxdepth: 2
|
|
47
|
+
:caption: API
|
|
48
|
+
:hidden:
|
|
49
|
+
:titlesonly:
|
|
50
|
+
|
|
51
|
+
/autoapi/index
|
|
52
|
+
|
|
53
|
+
.. toctree::
|
|
54
|
+
:hidden:
|
|
55
|
+
:maxdepth: 1
|
|
56
|
+
:caption: Glossary
|
|
57
|
+
|
|
58
|
+
glossary
|
|
59
|
+
|
|
60
|
+
.. toctree::
|
|
61
|
+
:hidden:
|
|
62
|
+
:maxdepth: 1
|
|
63
|
+
:caption: Development
|
|
64
|
+
|
|
65
|
+
/dev/version_release
|
|
66
|
+
/dev/documentation
|
|
67
|
+
/dev/actions_and_webhooks
|
|
68
|
+
|
|
69
|
+
.. toctree::
|
|
70
|
+
:caption: Useful Links
|
|
71
|
+
:hidden:
|
|
72
|
+
:maxdepth: 2
|
|
73
|
+
|
|
74
|
+
Source code <https://github.com/test-flare/pytest-flakefighters/>
|
|
75
|
+
Documentation <https://causal-testing-framework.readthedocs.io/en/latest/>
|
|
76
|
+
PyPI <https://pypi.org/project/pytest-flakefighters/>
|
|
77
|
+
TestFLARE Homepage <https://test-flare.github.io/>
|
|
78
|
+
|
|
79
|
+
.. toctree::
|
|
80
|
+
:hidden:
|
|
81
|
+
:maxdepth: 2
|
|
82
|
+
:caption: Acknowledgements
|
|
83
|
+
|
|
84
|
+
acknowlegements
|
|
85
|
+
|
|
86
|
+
.. Define variables for our GH badges
|
|
87
|
+
|
|
88
|
+
.. |ci-tests| image:: https://github.com/test-flare/pytest-flakefighters/actions/workflows/ci-tests.yaml/badge.svg
|
|
89
|
+
:target: https://github.com/test-flare/pytest-flakefighters/actions/workflows/ci-tests.yaml
|
|
90
|
+
:alt: Continuous Integration Tests
|
|
91
|
+
|
|
92
|
+
.. |code-cov| image:: https://codecov.io/gh/test-flare/pytest-flakefighters/branch/main/graph/badge.svg?token=04ijFVrb4a
|
|
93
|
+
:target: https://codecov.io/gh/test-flare/pytest-flakefighters
|
|
94
|
+
:alt: Code coverage
|
|
95
|
+
|
|
96
|
+
.. |docs| image:: https://readthedocs.org/projects/pytest-flakefighters/badge/?version=latest
|
|
97
|
+
:target: https://pytest-flakefighters.readthedocs.io/en/latest/?badge=latest
|
|
98
|
+
:alt: Documentation
|
|
99
|
+
|
|
100
|
+
.. |python| image:: https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftest-flare%2Fpytest-flakefighters%2Fmain%2Fpyproject.toml&query=%24.project%5B'requires-python'%5D&label=python
|
|
101
|
+
:target: https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2Ftest-flare%2Fpytest-flakefighters%2Fmain%2Fpyproject.toml&query=%24.project%5B'requires-python'%5D&label=python
|
|
102
|
+
:alt: Python
|
|
103
|
+
|
|
104
|
+
.. |status| image:: https://www.repostatus.org/badges/latest/active.svg
|
|
105
|
+
:target: https://www.repostatus.org/#active
|
|
106
|
+
:alt: Status
|
|
107
|
+
|
|
108
|
+
.. |pypi| image:: https://img.shields.io/pypi/v/pytest-flakefighters
|
|
109
|
+
:target: https://pypi.org/project/pytest-flakefighters
|
|
110
|
+
:alt: PyPI
|
|
111
|
+
|
|
112
|
+
.. |license| image:: https://img.shields.io/github/license/test-flare/pytest-flakefighters
|
|
113
|
+
:target: https://github.com/test-flare/pytest-flakefighters
|
|
114
|
+
:alt: License
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Getting Started
|
|
2
|
+
================
|
|
3
|
+
|
|
4
|
+
Installation
|
|
5
|
+
-----------------
|
|
6
|
+
* We currently support Python versions 3.10, 3.11, 3.12, and 3.13.
|
|
7
|
+
|
|
8
|
+
* The Flakefighters plugin can be installed through the `Python Package Index (PyPI)`_ (recommended), or directly from source (recommended for contributors).
|
|
9
|
+
|
|
10
|
+
.. _Python Package Index (PyPI): https://pypi.org/project/pytest-flakefighters
|
|
11
|
+
|
|
12
|
+
Method 1: Installing via pip
|
|
13
|
+
..............................
|
|
14
|
+
|
|
15
|
+
To install the Causal Testing Framework using :code:`pip` for the latest stable version::
|
|
16
|
+
|
|
17
|
+
pip install pytest-flakefighters
|
|
18
|
+
|
|
19
|
+
The plugin will then automatically run as part of `pytest`.
|
|
20
|
+
|
|
21
|
+
If you also want to install the framework with (optional) development packages/tools::
|
|
22
|
+
|
|
23
|
+
pip install pytest-flakefighters[dev]
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Method 2: Installing via Source (For Developers/Contributors)
|
|
27
|
+
...............................................................
|
|
28
|
+
|
|
29
|
+
If you're planning to contribute to the project or need an editable installation for development, you can install directly from source::
|
|
30
|
+
|
|
31
|
+
git clone https://github.com/test-flare/pytest-flakefighters.git
|
|
32
|
+
cd pytest-flakefighters
|
|
33
|
+
|
|
34
|
+
then, to install a specific release::
|
|
35
|
+
|
|
36
|
+
git fetch --all --tags --prune
|
|
37
|
+
git checkout tags/<tag> -b <branch>
|
|
38
|
+
pip install . # For core API only
|
|
39
|
+
pip install -e . # For editable install, useful for development work
|
|
40
|
+
|
|
41
|
+
e.g. version `1.0.0`::
|
|
42
|
+
|
|
43
|
+
git fetch --all --tags --prune
|
|
44
|
+
git checkout tags/1.0.0 -b version
|
|
45
|
+
pip install .
|
|
46
|
+
|
|
47
|
+
or to install the latest development version::
|
|
48
|
+
|
|
49
|
+
pip install .
|
|
50
|
+
|
|
51
|
+
To also install developer tools::
|
|
52
|
+
|
|
53
|
+
pip install -e .[dev]
|
|
54
|
+
|
|
55
|
+
Verifying Your Installation
|
|
56
|
+
-----------------------------
|
|
57
|
+
|
|
58
|
+
After installation, verify that the framework is installed correctly in your environment::
|
|
59
|
+
|
|
60
|
+
python -c "import pytest_flakefighters; print(pytest_flakefighters.__version__)"
|
|
61
|
+
|
|
62
|
+
Next Steps
|
|
63
|
+
-----------
|
|
64
|
+
|
|
65
|
+
* Check out the :doc:`configuration` to learn how to configure the extension.
|