behave-pool 1.0.0__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.
- behave_pool-1.0.0/.editorconfig +18 -0
- behave_pool-1.0.0/.github/ISSUE_TEMPLATE/bug_report.yml +71 -0
- behave_pool-1.0.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- behave_pool-1.0.0/.github/ISSUE_TEMPLATE/feature_request.yml +31 -0
- behave_pool-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- behave_pool-1.0.0/.github/dependabot.yml +24 -0
- behave_pool-1.0.0/.github/workflows/ci.yml +62 -0
- behave_pool-1.0.0/.github/workflows/docs.yml +45 -0
- behave_pool-1.0.0/.github/workflows/release.yml +96 -0
- behave_pool-1.0.0/.gitignore +49 -0
- behave_pool-1.0.0/.pre-commit-config.yaml +18 -0
- behave_pool-1.0.0/CHANGELOG.md +78 -0
- behave_pool-1.0.0/CODE_OF_CONDUCT.md +135 -0
- behave_pool-1.0.0/CONTRIBUTING.md +53 -0
- behave_pool-1.0.0/LICENSE +21 -0
- behave_pool-1.0.0/Makefile +61 -0
- behave_pool-1.0.0/PKG-INFO +167 -0
- behave_pool-1.0.0/README.md +125 -0
- behave_pool-1.0.0/SECURITY.md +21 -0
- behave_pool-1.0.0/behave_pool/__init__.py +21 -0
- behave_pool-1.0.0/behave_pool/config.py +131 -0
- behave_pool-1.0.0/behave_pool/iterator.py +81 -0
- behave_pool-1.0.0/behave_pool/py.typed +0 -0
- behave_pool-1.0.0/behave_pool/result.py +32 -0
- behave_pool-1.0.0/behave_pool/runner.py +343 -0
- behave_pool-1.0.0/behave_pool/timing.py +148 -0
- behave_pool-1.0.0/behave_pool/work_unit.py +42 -0
- behave_pool-1.0.0/behave_pool/worker.py +364 -0
- behave_pool-1.0.0/docs/api-reference.md +15 -0
- behave_pool-1.0.0/docs/index.md +83 -0
- behave_pool-1.0.0/examples/calculator/README.md +37 -0
- behave_pool-1.0.0/examples/calculator/features/calculator.feature +17 -0
- behave_pool-1.0.0/examples/calculator/features/steps/calculator_steps.py +26 -0
- behave_pool-1.0.0/mkdocs.yml +74 -0
- behave_pool-1.0.0/pyproject.toml +97 -0
- behave_pool-1.0.0/tests/__init__.py +0 -0
- behave_pool-1.0.0/tests/fixtures/serial/environment.py +1 -0
- behave_pool-1.0.0/tests/fixtures/serial/features/mixed.feature +23 -0
- behave_pool-1.0.0/tests/fixtures/serial/steps/common_steps.py +28 -0
- behave_pool-1.0.0/tests/fixtures/simple/environment.py +25 -0
- behave_pool-1.0.0/tests/fixtures/simple/features/checkout.feature +10 -0
- behave_pool-1.0.0/tests/fixtures/simple/features/login.feature +10 -0
- behave_pool-1.0.0/tests/fixtures/simple/features/profile.feature +10 -0
- behave_pool-1.0.0/tests/fixtures/simple/features/search.feature +10 -0
- behave_pool-1.0.0/tests/fixtures/simple/steps/common_steps.py +103 -0
- behave_pool-1.0.0/tests/fixtures/timing/environment.py +1 -0
- behave_pool-1.0.0/tests/fixtures/timing/features/slow.feature +16 -0
- behave_pool-1.0.0/tests/fixtures/timing/steps/common_steps.py +22 -0
- behave_pool-1.0.0/tests/integration/__init__.py +0 -0
- behave_pool-1.0.0/tests/integration/test_lpt.py +118 -0
- behave_pool-1.0.0/tests/integration/test_runner_parallel.py +106 -0
- behave_pool-1.0.0/tests/integration/test_serial_tag.py +87 -0
- behave_pool-1.0.0/tests/unit/__init__.py +0 -0
- behave_pool-1.0.0/tests/unit/test_config.py +339 -0
- behave_pool-1.0.0/tests/unit/test_import.py +25 -0
- behave_pool-1.0.0/tests/unit/test_iterator.py +161 -0
- behave_pool-1.0.0/tests/unit/test_result.py +120 -0
- behave_pool-1.0.0/tests/unit/test_runner.py +907 -0
- behave_pool-1.0.0/tests/unit/test_timing.py +267 -0
- behave_pool-1.0.0/tests/unit/test_work_unit.py +123 -0
- behave_pool-1.0.0/tests/unit/test_worker_process.py +387 -0
- behave_pool-1.0.0/tests/unit/test_worker_runner.py +851 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
indent_style = space
|
|
9
|
+
indent_size = 4
|
|
10
|
+
|
|
11
|
+
[*.{yaml,yml,toml,json}]
|
|
12
|
+
indent_size = 2
|
|
13
|
+
|
|
14
|
+
[Makefile]
|
|
15
|
+
indent_style = tab
|
|
16
|
+
|
|
17
|
+
[*.md]
|
|
18
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a bug or unexpected behavior
|
|
3
|
+
title: "[bug] "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for taking the time to file a bug report!
|
|
10
|
+
Please fill out the information below to help us reproduce and fix the issue.
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: description
|
|
13
|
+
attributes:
|
|
14
|
+
label: Description
|
|
15
|
+
description: A clear description of the bug.
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: reproduce
|
|
20
|
+
attributes:
|
|
21
|
+
label: Steps to reproduce
|
|
22
|
+
description: |
|
|
23
|
+
Minimal steps to reproduce the behavior.
|
|
24
|
+
Include a feature file, step definitions, and the exact command you ran.
|
|
25
|
+
value: |
|
|
26
|
+
1.
|
|
27
|
+
2.
|
|
28
|
+
3.
|
|
29
|
+
validations:
|
|
30
|
+
required: true
|
|
31
|
+
- type: textarea
|
|
32
|
+
id: expected
|
|
33
|
+
attributes:
|
|
34
|
+
label: Expected behavior
|
|
35
|
+
description: What you expected to happen.
|
|
36
|
+
validations:
|
|
37
|
+
required: true
|
|
38
|
+
- type: textarea
|
|
39
|
+
id: actual
|
|
40
|
+
attributes:
|
|
41
|
+
label: Actual behavior
|
|
42
|
+
description: What actually happened. Include error output or logs if available.
|
|
43
|
+
validations:
|
|
44
|
+
required: true
|
|
45
|
+
- type: input
|
|
46
|
+
id: behave-version
|
|
47
|
+
attributes:
|
|
48
|
+
label: behave version
|
|
49
|
+
description: Output of `pip show behave | grep Version`
|
|
50
|
+
validations:
|
|
51
|
+
required: true
|
|
52
|
+
- type: input
|
|
53
|
+
id: python-version
|
|
54
|
+
attributes:
|
|
55
|
+
label: Python version
|
|
56
|
+
description: Output of `python --version`
|
|
57
|
+
validations:
|
|
58
|
+
required: true
|
|
59
|
+
- type: input
|
|
60
|
+
id: os
|
|
61
|
+
attributes:
|
|
62
|
+
label: Operating system
|
|
63
|
+
validations:
|
|
64
|
+
required: true
|
|
65
|
+
- type: textarea
|
|
66
|
+
id: config
|
|
67
|
+
attributes:
|
|
68
|
+
label: behave.ini or command line
|
|
69
|
+
description: Your behave configuration or the exact `behave` command you ran.
|
|
70
|
+
validations:
|
|
71
|
+
required: false
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Security vulnerability
|
|
4
|
+
url: https://github.com/MathiasPaulenko/behave-pool/security/policy
|
|
5
|
+
about: Please report security vulnerabilities privately per SECURITY.md.
|
|
6
|
+
- name: Discussions
|
|
7
|
+
url: https://github.com/MathiasPaulenko/behave-pool/discussions
|
|
8
|
+
about: Ask questions and discuss ideas in GitHub Discussions.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest a new feature or enhancement
|
|
3
|
+
title: "[feature] "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thanks for suggesting a feature!
|
|
10
|
+
Please describe what you'd like and why it would be useful.
|
|
11
|
+
- type: textarea
|
|
12
|
+
id: problem
|
|
13
|
+
attributes:
|
|
14
|
+
label: Problem
|
|
15
|
+
description: What problem does this feature solve?
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: solution
|
|
20
|
+
attributes:
|
|
21
|
+
label: Proposed solution
|
|
22
|
+
description: What you'd like to see happen.
|
|
23
|
+
validations:
|
|
24
|
+
required: true
|
|
25
|
+
- type: textarea
|
|
26
|
+
id: alternatives
|
|
27
|
+
attributes:
|
|
28
|
+
label: Alternatives considered
|
|
29
|
+
description: Any workarounds or alternative approaches you've considered.
|
|
30
|
+
validations:
|
|
31
|
+
required: false
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- Brief description of what this PR does -->
|
|
4
|
+
|
|
5
|
+
## Type of change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix
|
|
8
|
+
- [ ] New feature
|
|
9
|
+
- [ ] Breaking change
|
|
10
|
+
- [ ] Documentation
|
|
11
|
+
- [ ] Refactor
|
|
12
|
+
|
|
13
|
+
## Checklist
|
|
14
|
+
|
|
15
|
+
- [ ] `make check` passes (lint + format + test)
|
|
16
|
+
- [ ] `make test-cov` passes with >= 90% coverage
|
|
17
|
+
- [ ] New behavior is covered by tests
|
|
18
|
+
- [ ] `CHANGELOG.md` updated under `[Unreleased]`
|
|
19
|
+
- [ ] `mypy --strict` passes with no errors
|
|
20
|
+
- [ ] Code of Conduct compliance reviewed
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: pip
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: weekly
|
|
7
|
+
labels:
|
|
8
|
+
- dependencies
|
|
9
|
+
- python
|
|
10
|
+
groups:
|
|
11
|
+
dev-dependencies:
|
|
12
|
+
patterns:
|
|
13
|
+
- "pytest*"
|
|
14
|
+
- "ruff"
|
|
15
|
+
- "mypy"
|
|
16
|
+
- "build"
|
|
17
|
+
- "pre-commit"
|
|
18
|
+
- package-ecosystem: github-actions
|
|
19
|
+
directory: "/"
|
|
20
|
+
schedule:
|
|
21
|
+
interval: weekly
|
|
22
|
+
labels:
|
|
23
|
+
- dependencies
|
|
24
|
+
- github-actions
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v5
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: "3.13"
|
|
21
|
+
- run: pip install -e ".[dev]"
|
|
22
|
+
- run: ruff check .
|
|
23
|
+
- run: ruff format --check .
|
|
24
|
+
- run: mypy --strict behave_pool
|
|
25
|
+
|
|
26
|
+
test:
|
|
27
|
+
runs-on: ${{ matrix.os }}
|
|
28
|
+
strategy:
|
|
29
|
+
fail-fast: false
|
|
30
|
+
matrix:
|
|
31
|
+
os: [ubuntu-latest]
|
|
32
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
33
|
+
include:
|
|
34
|
+
- os: windows-latest
|
|
35
|
+
python-version: "3.13"
|
|
36
|
+
- os: macos-latest
|
|
37
|
+
python-version: "3.13"
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v5
|
|
40
|
+
- uses: actions/setup-python@v5
|
|
41
|
+
with:
|
|
42
|
+
python-version: ${{ matrix.python-version }}
|
|
43
|
+
- run: pip install -e ".[dev]"
|
|
44
|
+
- run: pytest tests/ -v --cov --cov-report=xml
|
|
45
|
+
- uses: codecov/codecov-action@v5
|
|
46
|
+
with:
|
|
47
|
+
files: ./coverage.xml
|
|
48
|
+
|
|
49
|
+
build:
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
needs: [lint, test]
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v5
|
|
54
|
+
- uses: actions/setup-python@v5
|
|
55
|
+
with:
|
|
56
|
+
python-version: "3.13"
|
|
57
|
+
- run: pip install build
|
|
58
|
+
- run: python -m build
|
|
59
|
+
- uses: actions/upload-artifact@v4
|
|
60
|
+
with:
|
|
61
|
+
name: dist
|
|
62
|
+
path: dist/
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
pages: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: pages
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build-deploy:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
environment:
|
|
21
|
+
name: github-pages
|
|
22
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v5
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
|
|
28
|
+
- uses: actions/setup-python@v5
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.13"
|
|
31
|
+
|
|
32
|
+
- name: Install docs dependencies
|
|
33
|
+
run: pip install -e ".[docs]"
|
|
34
|
+
|
|
35
|
+
- name: Build site
|
|
36
|
+
run: mkdocs build --strict
|
|
37
|
+
|
|
38
|
+
- uses: actions/configure-pages@v5
|
|
39
|
+
|
|
40
|
+
- uses: actions/upload-pages-artifact@v3
|
|
41
|
+
with:
|
|
42
|
+
path: ./site
|
|
43
|
+
|
|
44
|
+
- id: deployment
|
|
45
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "pyproject.toml"
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
name: Build distributions
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
outputs:
|
|
18
|
+
version: ${{ steps.version.outputs.version }}
|
|
19
|
+
bump: ${{ steps.version.outputs.bump }}
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v5
|
|
22
|
+
with:
|
|
23
|
+
fetch-depth: 0
|
|
24
|
+
- uses: actions/setup-python@v5
|
|
25
|
+
with:
|
|
26
|
+
python-version: "3.13"
|
|
27
|
+
- name: Detect version bump
|
|
28
|
+
id: version
|
|
29
|
+
run: |
|
|
30
|
+
NEW_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
31
|
+
echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
|
|
32
|
+
if git rev-parse "v$NEW_VERSION" >/dev/null 2>&1; then
|
|
33
|
+
echo "bump=false" >> "$GITHUB_OUTPUT"
|
|
34
|
+
else
|
|
35
|
+
echo "bump=true" >> "$GITHUB_OUTPUT"
|
|
36
|
+
fi
|
|
37
|
+
- name: Build distributions
|
|
38
|
+
if: steps.version.outputs.bump == 'true'
|
|
39
|
+
run: |
|
|
40
|
+
pip install build ruff mypy
|
|
41
|
+
ruff check .
|
|
42
|
+
ruff format --check .
|
|
43
|
+
mypy --strict behave_pool
|
|
44
|
+
python -m build
|
|
45
|
+
- uses: actions/upload-artifact@v4
|
|
46
|
+
if: steps.version.outputs.bump == 'true'
|
|
47
|
+
with:
|
|
48
|
+
name: dist
|
|
49
|
+
path: dist/
|
|
50
|
+
|
|
51
|
+
publish:
|
|
52
|
+
name: Publish to PyPI (Trusted Publishing)
|
|
53
|
+
needs: build
|
|
54
|
+
if: needs.build.outputs.bump == 'true'
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
environment: pypi
|
|
57
|
+
permissions:
|
|
58
|
+
id-token: write
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/download-artifact@v4
|
|
61
|
+
with:
|
|
62
|
+
name: dist
|
|
63
|
+
path: dist/
|
|
64
|
+
- name: Publish to PyPI
|
|
65
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
66
|
+
|
|
67
|
+
release:
|
|
68
|
+
name: Create GitHub Release
|
|
69
|
+
needs: [build, publish]
|
|
70
|
+
if: needs.build.outputs.bump == 'true'
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
permissions:
|
|
73
|
+
contents: write
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/checkout@v5
|
|
76
|
+
with:
|
|
77
|
+
fetch-depth: 0
|
|
78
|
+
- name: Create git tag
|
|
79
|
+
run: |
|
|
80
|
+
TAG="v${{ needs.build.outputs.version }}"
|
|
81
|
+
if git rev-parse "$TAG" >/dev/null 2>&1; then
|
|
82
|
+
echo "Tag $TAG already exists; skipping creation."
|
|
83
|
+
else
|
|
84
|
+
git tag "$TAG"
|
|
85
|
+
git push origin "$TAG"
|
|
86
|
+
fi
|
|
87
|
+
- uses: actions/download-artifact@v4
|
|
88
|
+
with:
|
|
89
|
+
name: dist
|
|
90
|
+
path: dist/
|
|
91
|
+
- name: Create GitHub Release
|
|
92
|
+
uses: softprops/action-gh-release@v2.3.2
|
|
93
|
+
with:
|
|
94
|
+
tag_name: "v${{ needs.build.outputs.version }}"
|
|
95
|
+
generate_release_notes: true
|
|
96
|
+
files: dist/*
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
dist/
|
|
11
|
+
dist_test/
|
|
12
|
+
build/
|
|
13
|
+
*.egg-info/
|
|
14
|
+
*.egg
|
|
15
|
+
|
|
16
|
+
# Virtual environments
|
|
17
|
+
.venv/
|
|
18
|
+
venv/
|
|
19
|
+
env/
|
|
20
|
+
|
|
21
|
+
# Environment variables
|
|
22
|
+
.env
|
|
23
|
+
.env.*
|
|
24
|
+
|
|
25
|
+
# Caches
|
|
26
|
+
.pytest_cache/
|
|
27
|
+
.mypy_cache/
|
|
28
|
+
.ruff_cache/
|
|
29
|
+
.coverage
|
|
30
|
+
htmlcov/
|
|
31
|
+
|
|
32
|
+
# Type checking
|
|
33
|
+
*.pyi.mypy-cache
|
|
34
|
+
|
|
35
|
+
# Internal design specs
|
|
36
|
+
ref/
|
|
37
|
+
site/
|
|
38
|
+
|
|
39
|
+
# IDE
|
|
40
|
+
.idea/
|
|
41
|
+
.vscode/
|
|
42
|
+
|
|
43
|
+
# OS
|
|
44
|
+
.DS_Store
|
|
45
|
+
Thumbs.db
|
|
46
|
+
|
|
47
|
+
# behave-pool temp files
|
|
48
|
+
.behave-pool-timing.json
|
|
49
|
+
tmp/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-toml
|
|
9
|
+
- id: check-json
|
|
10
|
+
- id: check-merge-conflict
|
|
11
|
+
- id: check-added-large-files
|
|
12
|
+
- id: detect-private-key
|
|
13
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
14
|
+
rev: v0.8.0
|
|
15
|
+
hooks:
|
|
16
|
+
- id: ruff
|
|
17
|
+
args: [--check]
|
|
18
|
+
- id: ruff-format
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2026-07-31
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial project setup: scaffold, CI/CD, pre-commit, MkDocs configuration.
|
|
13
|
+
- `ParallelRunner` stub that delegates to standard Behave `Runner` (passthrough mode).
|
|
14
|
+
- `TimingStore` for persisting historical work unit durations as JSON.
|
|
15
|
+
- LPT (Longest Processing Time) load balancing via `--parallel-balance lpt|fifo`.
|
|
16
|
+
- `--parallel-timing-file` CLI option for custom timing file path.
|
|
17
|
+
- `@serial` tag support: two-phase dispatch (parallel then serial).
|
|
18
|
+
- Behave runner entry point (`behave.runners`) for `--runner=` registration.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- `TimingStore.load()` now catches `TypeError` for non-numeric JSON values.
|
|
23
|
+
- `TimingStore.save()` now uses atomic writes (temp file + rename) to prevent corruption.
|
|
24
|
+
- `TimingStore.save()` narrowed `except Exception` to `except OSError`.
|
|
25
|
+
- `WorkerRunner._write_report()` now reflects actual feature pass/fail status.
|
|
26
|
+
- `WorkerRunner._write_report()` now catches all exceptions (not just `OSError`),
|
|
27
|
+
preventing non-serializable feature data from causing `TypeError` to propagate
|
|
28
|
+
and incorrectly marking a work unit as failed.
|
|
29
|
+
- `WorkerRunner.run_work_unit()` now resets `self.aborted` before each work unit,
|
|
30
|
+
preventing silent feature skips in subsequent work units after a KeyboardInterrupt
|
|
31
|
+
or other abort in a previous work unit.
|
|
32
|
+
- `WorkerRunner.teardown()` is now safe when `setup()` did not complete.
|
|
33
|
+
- `WorkerRunner.run_work_unit()` now parses feature files from `WorkUnit.feature_path`
|
|
34
|
+
via `parse_features` before running, fixing zero-feature execution in workers.
|
|
35
|
+
- `WorkerRunner.load_step_definitions()` now sets `self.step_registry` from the global
|
|
36
|
+
Behave step registry, fixing `feature.run()` crashes in worker processes.
|
|
37
|
+
- `WorkerRunner._worker_run_loop()` now catches `EOFError`/`OSError` on closed task
|
|
38
|
+
queue and exits gracefully instead of crashing.
|
|
39
|
+
- `WorkerRunner._worker_run_loop()` uses `task_queue.get(timeout=5)` instead of
|
|
40
|
+
blocking `get()` to allow periodic `stop_event` checks.
|
|
41
|
+
- `ParallelRunner._dispatch()` skips launching parallel workers when batch is empty.
|
|
42
|
+
- `ParallelRunner._dispatch()` sets `stop_event` for workers that exceed join timeout.
|
|
43
|
+
- `ParallelRunner._dispatch()` skips serial phase when `stop_event` is set during
|
|
44
|
+
parallel phase, preventing infinite block.
|
|
45
|
+
- `ParallelRunner._dispatch()` replaces `task_queue.join()` with `worker.join(timeout=300)`
|
|
46
|
+
and explicit queue drain, preventing deadlock when workers exit prematurely or hang indefinitely.
|
|
47
|
+
Workers that don't terminate within the timeout are now forcibly terminated via
|
|
48
|
+
`WorkerProcess.terminate()`.
|
|
49
|
+
- `ParallelRunner._collect()` detects missing results from crashed workers and treats
|
|
50
|
+
them as failures.
|
|
51
|
+
- `ParallelRunner._collect()` narrows `except` clause to `queue.Empty`/`EOFError`/`OSError`.
|
|
52
|
+
- `ParallelRunner._dispatch()` now returns the list of actually dispatched work units.
|
|
53
|
+
`_run_parallel()` passes only dispatched units to `_collect()`, preventing false
|
|
54
|
+
"missing results" warnings and a 30-second wait for serial units that were never
|
|
55
|
+
enqueued when `stop_event` was set during the parallel phase.
|
|
56
|
+
- `ParallelRunner._run_parallel()` cleans up queues in `finally` block.
|
|
57
|
+
- `ConfigSnapshot` now includes `parallel`, `parallel_scheme`, `parallel_balance`,
|
|
58
|
+
`parallel_timing_file`, `dry_run`, and `use_nested_step_modules` fields.
|
|
59
|
+
- `_make_config()` now sets all parallel-related fields from `ConfigSnapshot`.
|
|
60
|
+
- Entry point group corrected from `behave.plugins` to `behave.runners` in
|
|
61
|
+
`pyproject.toml`.
|
|
62
|
+
- `__init__.py` docstring corrected: feature-level parallelization, not scenario.
|
|
63
|
+
- `config.py` help text corrected: removed stale scenario reference.
|
|
64
|
+
- `iterator.py` error message corrected: removed stale F9 reference.
|
|
65
|
+
- `_worker_run_loop()` now sets `stop_event` when a worker aborts, ensuring other
|
|
66
|
+
workers stop cooperatively and the coordinator skips the serial phase. Without
|
|
67
|
+
this, the aborted worker's sentinel remained in the queue and another worker
|
|
68
|
+
could consume it and exit early, leaving work units unprocessed.
|
|
69
|
+
- Removed dead `TYPE_CHECKING` block in `work_unit.py`.
|
|
70
|
+
- Added picklability regression tests for `WorkerResult` and `WorkUnit`, both
|
|
71
|
+
of which are sent through `multiprocessing.Queue` / `JoinableQueue` and must
|
|
72
|
+
survive pickle round-trips.
|
|
73
|
+
- `ParallelRunner._collect()` now accepts a `deadline_seconds` parameter
|
|
74
|
+
(default 30s) so tests can exercise the missing-result path without waiting
|
|
75
|
+
the full 30-second deadline.
|
|
76
|
+
- Added regression test verifying `WorkerRunner.run_work_unit()` catches
|
|
77
|
+
`parse_features` exceptions and returns a failed `WorkerResult` instead of
|
|
78
|
+
propagating.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
- Demonstrating empathy and kindness toward other people
|
|
21
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
- Giving and gracefully accepting constructive feedback
|
|
23
|
+
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
- Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
- The use of sexualized language or imagery, and sexual attention or advances
|
|
31
|
+
of any kind
|
|
32
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
- Public or private harassment
|
|
34
|
+
- Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official email address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
**<mathias@paulenko.dev>**.
|
|
64
|
+
|
|
65
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
66
|
+
|
|
67
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
68
|
+
reporter of any incident.
|
|
69
|
+
|
|
70
|
+
## Enforcement Guidelines
|
|
71
|
+
|
|
72
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
73
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
74
|
+
|
|
75
|
+
### 1. Correction
|
|
76
|
+
|
|
77
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
78
|
+
unprofessional or unwelcome in the community.
|
|
79
|
+
|
|
80
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
81
|
+
clarity around the nature of the violation and an explanation of why the
|
|
82
|
+
behavior was inappropriate. A public apology may be requested.
|
|
83
|
+
|
|
84
|
+
### 2. Warning
|
|
85
|
+
|
|
86
|
+
**Community Impact**: A violation through a single incident or series of
|
|
87
|
+
actions.
|
|
88
|
+
|
|
89
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
90
|
+
interaction with the people involved, including unsolicited interaction with
|
|
91
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
92
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
93
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
94
|
+
ban.
|
|
95
|
+
|
|
96
|
+
### 3. Temporary Ban
|
|
97
|
+
|
|
98
|
+
**Community Impact**: A serious violation of community standards, including
|
|
99
|
+
sustained inappropriate behavior.
|
|
100
|
+
|
|
101
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
102
|
+
communication with the community for a specified period of time. No public or
|
|
103
|
+
private interaction with the people involved, including unsolicited interaction
|
|
104
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
105
|
+
Violating these terms may lead to a permanent ban.
|
|
106
|
+
|
|
107
|
+
### 4. Permanent Ban
|
|
108
|
+
|
|
109
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
110
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
111
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
112
|
+
|
|
113
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
114
|
+
community.
|
|
115
|
+
|
|
116
|
+
## Attribution
|
|
117
|
+
|
|
118
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
119
|
+
version 2.1, available at
|
|
120
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
121
|
+
|
|
122
|
+
Community Impact Guidelines were inspired by
|
|
123
|
+
[Mozilla's code of conduct enforcement ladder][mozilla-coc].
|
|
124
|
+
|
|
125
|
+
For answers to common questions about this code of conduct, see the
|
|
126
|
+
[FAQ][faq].
|
|
127
|
+
|
|
128
|
+
The translation is available at
|
|
129
|
+
[<https://www.contributor-covenant.org/translations/>][translations].
|
|
130
|
+
|
|
131
|
+
[homepage]: <https://www.contributor-covenant.org>
|
|
132
|
+
[v2.1]: <https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>
|
|
133
|
+
[mozilla-coc]: <https://www.mozilla.org/en-US/about/governance/policies/enforcement/>
|
|
134
|
+
[faq]: <https://www.contributor-covenant.org/faq>
|
|
135
|
+
[translations]: <https://www.contributor-covenant.org/translations>
|