TempestParser 0.2.80__tar.gz → 3.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.
Files changed (102) hide show
  1. tempestparser-3.0.0/.github/dependabot.yml +17 -0
  2. tempestparser-3.0.0/.github/workflows/bump-version.yml +122 -0
  3. tempestparser-3.0.0/.github/workflows/release.yml +169 -0
  4. tempestparser-3.0.0/.github/workflows/tests.yml +117 -0
  5. tempestparser-3.0.0/.github/workflows/version.yml +50 -0
  6. tempestparser-3.0.0/.gitignore +111 -0
  7. tempestparser-3.0.0/CLAUDE.md +61 -0
  8. tempestparser-3.0.0/LICENSE +201 -0
  9. tempestparser-3.0.0/PKG-INFO +320 -0
  10. tempestparser-3.0.0/README.md +289 -0
  11. tempestparser-3.0.0/TempestParser.egg-info/PKG-INFO +320 -0
  12. tempestparser-3.0.0/TempestParser.egg-info/SOURCES.txt +80 -0
  13. {TempestParser-0.2.80 → tempestparser-3.0.0}/TempestParser.egg-info/entry_points.txt +0 -1
  14. tempestparser-3.0.0/TempestParser.egg-info/requires.txt +4 -0
  15. tempestparser-3.0.0/TempestParser.egg-info/scm_file_list.json +76 -0
  16. tempestparser-3.0.0/TempestParser.egg-info/scm_version.json +8 -0
  17. tempestparser-3.0.0/changelog.md +195 -0
  18. tempestparser-3.0.0/documents/plan.md +126 -0
  19. tempestparser-3.0.0/documents/specs.md +205 -0
  20. tempestparser-3.0.0/examples/README.md +35 -0
  21. tempestparser-3.0.0/examples/errors_report_run_4.html +333 -0
  22. tempestparser-3.0.0/examples/errors_report_run_4_grid.html +333 -0
  23. tempestparser-3.0.0/examples/screenshots/errors_grid.png +0 -0
  24. tempestparser-3.0.0/examples/screenshots/trending_grid_dark.png +0 -0
  25. tempestparser-3.0.0/examples/screenshots/trending_table.png +0 -0
  26. tempestparser-3.0.0/examples/trending_report.html +696 -0
  27. tempestparser-3.0.0/examples/trending_report_brief.html +629 -0
  28. tempestparser-3.0.0/examples/trending_report_grid.html +706 -0
  29. tempestparser-3.0.0/pyproject.toml +119 -0
  30. tempestparser-3.0.0/scripts/check-test-tags.py +63 -0
  31. tempestparser-3.0.0/scripts/version.sh +263 -0
  32. tempestparser-3.0.0/tempest_parser/const.py +65 -0
  33. tempestparser-3.0.0/tempest_parser/manager/importers.py +600 -0
  34. tempestparser-3.0.0/tempest_parser/manager/models.py +100 -0
  35. tempestparser-3.0.0/tempest_parser/manager/test_manager.py +321 -0
  36. tempestparser-3.0.0/tempest_parser/parser/tempest_log_parser.py +346 -0
  37. tempestparser-3.0.0/tempest_parser/reports/csv_reporter.py +75 -0
  38. tempestparser-3.0.0/tempest_parser/reports/json_reporter.py +74 -0
  39. tempestparser-3.0.0/tempest_parser/reports/reporter.py +301 -0
  40. tempestparser-3.0.0/tempest_parser/templates/grid_base.html +119 -0
  41. tempestparser-3.0.0/tempest_parser/templates/tempest_errors_grid.html +202 -0
  42. {TempestParser-0.2.80 → tempestparser-3.0.0}/tempest_parser/templates/tempest_errors_report.html +4 -4
  43. tempestparser-3.0.0/tempest_parser/templates/tempest_trending_grid.html +267 -0
  44. tempestparser-3.0.0/tempest_parser/templates/tempest_trending_report.html +326 -0
  45. tempestparser-3.0.0/tempest_parser/tparser.py +327 -0
  46. tempestparser-3.0.0/tempest_parser/utils/__init__.py +0 -0
  47. {TempestParser-0.2.80 → tempestparser-3.0.0}/tempest_parser/utils/config.py +5 -8
  48. tempestparser-3.0.0/tests/__init__.py +0 -0
  49. tempestparser-3.0.0/tests/conftest.py +66 -0
  50. tempestparser-3.0.0/tests/data/baseline.list +4 -0
  51. tempestparser-3.0.0/tests/data/k8s.xml +19 -0
  52. tempestparser-3.0.0/tests/data/rally.json +33 -0
  53. tempestparser-3.0.0/tests/data/stestr.log +57 -0
  54. tempestparser-3.0.0/tests/data/tempest.log +22 -0
  55. tempestparser-3.0.0/tests/data/tempest.xml +14 -0
  56. tempestparser-3.0.0/tests/data/trending/run_1.log +61 -0
  57. tempestparser-3.0.0/tests/data/trending/run_2.log +58 -0
  58. tempestparser-3.0.0/tests/data/trending/run_3.log +56 -0
  59. tempestparser-3.0.0/tests/data/trending/run_4.log +67 -0
  60. tempestparser-3.0.0/tests/data/xunit.csv +4 -0
  61. tempestparser-3.0.0/tests/functional/__init__.py +0 -0
  62. tempestparser-3.0.0/tests/functional/test_importers.py +348 -0
  63. tempestparser-3.0.0/tests/functional/test_log_parser.py +270 -0
  64. tempestparser-3.0.0/tests/functional/test_reports.py +376 -0
  65. tempestparser-3.0.0/tests/functional/test_test_manager.py +209 -0
  66. tempestparser-3.0.0/tests/functional/test_version_script.py +186 -0
  67. tempestparser-3.0.0/tests/integration/__init__.py +0 -0
  68. tempestparser-3.0.0/tests/integration/test_wheel.py +100 -0
  69. tempestparser-3.0.0/tests/smoke/__init__.py +0 -0
  70. tempestparser-3.0.0/tests/smoke/test_cli.py +284 -0
  71. tempestparser-3.0.0/uv.lock +1522 -0
  72. TempestParser-0.2.80/MANIFEST.in +0 -4
  73. TempestParser-0.2.80/PKG-INFO +0 -113
  74. TempestParser-0.2.80/README +0 -100
  75. TempestParser-0.2.80/README.md +0 -90
  76. TempestParser-0.2.80/TempestParser.egg-info/PKG-INFO +0 -113
  77. TempestParser-0.2.80/TempestParser.egg-info/SOURCES.txt +0 -32
  78. TempestParser-0.2.80/TempestParser.egg-info/not-zip-safe +0 -1
  79. TempestParser-0.2.80/TempestParser.egg-info/requires.txt +0 -4
  80. TempestParser-0.2.80/setup.py +0 -53
  81. TempestParser-0.2.80/tempest_parser/const.py +0 -56
  82. TempestParser-0.2.80/tempest_parser/manager/importers.py +0 -621
  83. TempestParser-0.2.80/tempest_parser/manager/structs.py +0 -51
  84. TempestParser-0.2.80/tempest_parser/manager/test_manager.py +0 -453
  85. TempestParser-0.2.80/tempest_parser/parser/parser_strings.py +0 -21
  86. TempestParser-0.2.80/tempest_parser/parser/tempest_log_parser.py +0 -498
  87. TempestParser-0.2.80/tempest_parser/reports/csv_reporter.py +0 -117
  88. TempestParser-0.2.80/tempest_parser/reports/reporter.py +0 -234
  89. TempestParser-0.2.80/tempest_parser/templates/tempest_trending_report.html +0 -266
  90. TempestParser-0.2.80/tempest_parser/tparser.py +0 -352
  91. TempestParser-0.2.80/tempest_parser/utils/file.py +0 -35
  92. {TempestParser-0.2.80 → tempestparser-3.0.0}/TempestParser.egg-info/dependency_links.txt +0 -0
  93. {TempestParser-0.2.80 → tempestparser-3.0.0}/TempestParser.egg-info/top_level.txt +0 -0
  94. {TempestParser-0.2.80 → tempestparser-3.0.0}/setup.cfg +0 -0
  95. {TempestParser-0.2.80 → tempestparser-3.0.0}/tempest_parser/__init__.py +0 -0
  96. {TempestParser-0.2.80 → tempestparser-3.0.0}/tempest_parser/etc/tempest-parser.conf +0 -0
  97. {TempestParser-0.2.80 → tempestparser-3.0.0}/tempest_parser/manager/__init__.py +0 -0
  98. {TempestParser-0.2.80 → tempestparser-3.0.0}/tempest_parser/parser/__init__.py +0 -0
  99. /TempestParser-0.2.80/tempest_parser/reports/__init__.py → /tempestparser-3.0.0/tempest_parser/py.typed +0 -0
  100. {TempestParser-0.2.80/tempest_parser/utils → tempestparser-3.0.0/tempest_parser/reports}/__init__.py +0 -0
  101. {TempestParser-0.2.80 → tempestparser-3.0.0}/tempest_parser/res/all_sanity.list +0 -0
  102. {TempestParser-0.2.80 → tempestparser-3.0.0}/tempest_parser/res/all_tests_tag_18.list +0 -0
@@ -0,0 +1,17 @@
1
+ # Weekly update pull requests for the GitHub Actions in .github/workflows and the packages in uv.lock.
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: github-actions
5
+ directory: /
6
+ schedule:
7
+ interval: weekly
8
+ groups:
9
+ actions:
10
+ patterns: ["*"]
11
+ - package-ecosystem: uv
12
+ directory: /
13
+ schedule:
14
+ interval: weekly
15
+ groups:
16
+ python:
17
+ patterns: ["*"]
@@ -0,0 +1,122 @@
1
+ # Manual: picks the next version after the highest one known (latest tag, changelog.md), turns the
2
+ # changelog's Unreleased section into it, commits "Release vX.Y.Z" to master, tags it and starts the
3
+ # Release workflow (the package takes its version from the tag). Warns when the two versions
4
+ # disagree and refuses a version that isn't newer than both.
5
+ name: Bump version
6
+
7
+ on:
8
+ workflow_dispatch:
9
+ inputs:
10
+ bump:
11
+ description: "Part to bump (ignored when 'version' is set)"
12
+ type: choice
13
+ options: [patch, minor, major]
14
+ default: minor
15
+ prerelease:
16
+ description: "Optional pre-release label, e.g. rc.1 or beta.2"
17
+ type: string
18
+ required: false
19
+ version:
20
+ description: "Explicit version instead of a bump, e.g. 1.0.0 (must be newer than every known version)"
21
+ type: string
22
+ required: false
23
+ dry_run:
24
+ description: "Only show what would happen"
25
+ type: boolean
26
+ default: false
27
+
28
+ permissions:
29
+ contents: write
30
+ actions: write
31
+
32
+ concurrency:
33
+ group: bump-version
34
+ cancel-in-progress: false
35
+
36
+ jobs:
37
+ bump:
38
+ runs-on: ubuntu-latest
39
+ env:
40
+ GH_TOKEN: ${{ github.token }}
41
+ steps:
42
+ - uses: actions/checkout@v7
43
+ with:
44
+ ref: master
45
+ fetch-depth: 0
46
+
47
+ - uses: actions/setup-python@v7
48
+ with:
49
+ python-version: "3.15"
50
+
51
+ - uses: astral-sh/setup-uv@v10.4.0
52
+
53
+ - name: Fetch every tag
54
+ run: git fetch --tags --force origin
55
+
56
+ - name: Compare tag and changelog versions
57
+ run: |
58
+ report=$(scripts/version.sh versions) && synced=1 || synced=""
59
+ echo "$report"
60
+ {
61
+ echo "### Versions before the bump"
62
+ echo '```'
63
+ echo "$report"
64
+ echo '```'
65
+ } >> "$GITHUB_STEP_SUMMARY"
66
+ if [[ -z $synced ]]; then
67
+ while IFS= read -r line; do
68
+ [[ $line == "out of sync:"* ]] && echo "::warning title=Versions out of sync::${line#out of sync: }"
69
+ done <<< "$report"
70
+ echo "The next version is worked out from the highest of them: $(scripts/version.sh highest)." >> "$GITHUB_STEP_SUMMARY"
71
+ fi
72
+
73
+ - name: Work out the version
74
+ id: version
75
+ env:
76
+ INPUT_VERSION: ${{ inputs.version }}
77
+ INPUT_BUMP: ${{ inputs.bump }}
78
+ INPUT_PRE: ${{ inputs.prerelease }}
79
+ run: |
80
+ if [[ -n "$INPUT_VERSION" ]]; then
81
+ version=${INPUT_VERSION#v}
82
+ else
83
+ version=$(scripts/version.sh next "$INPUT_BUMP" "$INPUT_PRE") \
84
+ || { echo "::error::cannot work out the next version"; exit 1; }
85
+ fi
86
+ scripts/version.sh newer "$version" || { echo "::error::$version is not newer than $(scripts/version.sh highest) or is already tagged"; exit 1; }
87
+ git ls-remote --exit-code --tags origin "refs/tags/v$version" >/dev/null \
88
+ && { echo "::error::tag v$version already exists on origin"; exit 1; }
89
+ echo "Highest known: $(scripts/version.sh highest) -> new version: $version"
90
+ echo "version=$version" >> "$GITHUB_OUTPUT"
91
+
92
+ - name: Update changelog.md
93
+ env:
94
+ VERSION: ${{ steps.version.outputs.version }}
95
+ run: |
96
+ scripts/version.sh changelog "$VERSION"
97
+ scripts/version.sh notes "$VERSION" > /dev/null \
98
+ || { echo "::error::changelog.md has no entries for $VERSION"; exit 1; }
99
+ # the package must still build; its version comes from the tag made below
100
+ uv build --sdist --out-dir dist > /dev/null
101
+ git diff
102
+
103
+ - name: Commit and tag
104
+ if: ${{ !inputs.dry_run }}
105
+ env:
106
+ VERSION: ${{ steps.version.outputs.version }}
107
+ run: |
108
+ git config user.name "github-actions[bot]"
109
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
110
+ if ! git diff --quiet; then
111
+ git commit -am "Release v$VERSION"
112
+ fi
113
+ git tag -a "v$VERSION" -m "tempest-parser $VERSION"
114
+ git push --atomic origin HEAD:master "refs/tags/v$VERSION"
115
+
116
+ - name: Start release
117
+ if: ${{ !inputs.dry_run }}
118
+ env:
119
+ VERSION: ${{ steps.version.outputs.version }}
120
+ run: |
121
+ gh workflow run release.yml --ref "v$VERSION" -f tag="v$VERSION"
122
+ echo "Tagged v$VERSION and started the Release workflow." >> "$GITHUB_STEP_SUMMARY"
@@ -0,0 +1,169 @@
1
+ # Automatic: builds and publishes a GitHub Release for every pushed version tag.
2
+ # Also dispatched by "Bump version" (pushes made with GITHUB_TOKEN don't trigger tag events),
3
+ # and can be re-run by hand for an existing tag.
4
+ # Uploading to PyPI is off until the repository variable PYPI_PUBLISH is "true" and PyPI has a
5
+ # trusted publisher for this repository, workflow release.yml and environment "pypi".
6
+ name: Release
7
+
8
+ on:
9
+ push:
10
+ tags: ["v[0-9]+.[0-9]+.[0-9]+*"]
11
+ workflow_dispatch:
12
+ inputs:
13
+ tag:
14
+ description: "Existing tag to release, e.g. v0.3.0"
15
+ required: true
16
+ type: string
17
+
18
+ permissions:
19
+ contents: write
20
+
21
+ concurrency:
22
+ group: release-${{ inputs.tag || github.ref_name }}
23
+ cancel-in-progress: false
24
+
25
+ env:
26
+ TAG: ${{ inputs.tag || github.ref_name }}
27
+ UV_PYTHON_DOWNLOADS: never
28
+
29
+ jobs:
30
+ verify:
31
+ name: Verify tag
32
+ runs-on: ubuntu-latest
33
+ outputs:
34
+ version: ${{ steps.version.outputs.version }}
35
+ prerelease: ${{ steps.version.outputs.prerelease }}
36
+ steps:
37
+ - uses: actions/checkout@v7
38
+ with:
39
+ ref: ${{ env.TAG }}
40
+ fetch-depth: 0
41
+
42
+ - name: Check tag, changelog and branch
43
+ id: version
44
+ run: |
45
+ git rev-parse -q --verify "refs/tags/$TAG" >/dev/null || { echo "::error::tag $TAG not found"; exit 1; }
46
+ version=${TAG#v}
47
+ scripts/version.sh validate "$version"
48
+ scripts/version.sh check "$TAG"
49
+ git fetch --quiet origin master
50
+ git merge-base --is-ancestor "$TAG^{commit}" origin/master \
51
+ || { echo "::error::$TAG is not on master"; exit 1; }
52
+ echo "version=$version" >> "$GITHUB_OUTPUT"
53
+ if [[ $version == *-* ]]; then echo "prerelease=true"; else echo "prerelease=false"; fi >> "$GITHUB_OUTPUT"
54
+
55
+ - uses: actions/setup-python@v7
56
+ with:
57
+ python-version: "3.15"
58
+
59
+ - uses: astral-sh/setup-uv@v10.4.0
60
+
61
+ - name: Tests
62
+ run: |
63
+ uv sync --locked
64
+ uv run pytest
65
+
66
+ build:
67
+ name: Build and smoke-test the package
68
+ needs: verify
69
+ runs-on: ubuntu-latest
70
+ env:
71
+ VERSION: ${{ needs.verify.outputs.version }}
72
+ steps:
73
+ - uses: actions/checkout@v7
74
+ with:
75
+ ref: ${{ env.TAG }}
76
+ # setuptools-scm reads the version from the tag
77
+ fetch-depth: 0
78
+
79
+ - uses: actions/setup-python@v7
80
+ with:
81
+ python-version: "3.15"
82
+
83
+ - uses: astral-sh/setup-uv@v10.4.0
84
+
85
+ - name: Build
86
+ run: |
87
+ uv build --out-dir dist
88
+ uvx twine check --strict dist/*
89
+
90
+ - name: Smoke test (clean venv)
91
+ run: |
92
+ uv venv /tmp/venv
93
+ uv pip install --python /tmp/venv dist/*.whl packaging
94
+ # the package version is the tag in PEP 440 form (0.4.0-rc.1 -> 0.4.0rc1)
95
+ /tmp/venv/bin/python - "$VERSION" <<'PY' || { echo "::error::package version does not match $VERSION"; exit 1; }
96
+ import importlib.metadata as m, sys
97
+ from packaging.version import Version
98
+ got = m.version("TempestParser")
99
+ print("package version:", got)
100
+ sys.exit(Version(got) != Version(sys.argv[1]))
101
+ PY
102
+ cd /tmp
103
+ /tmp/venv/bin/tparser --help > /dev/null
104
+ /tmp/venv/bin/tparser -i -d -r report.html -c report.csv "$GITHUB_WORKSPACE/tests/data/tempest.xml"
105
+ /tmp/venv/bin/tparser -e errors.html "$GITHUB_WORKSPACE/tests/data/tempest.xml"
106
+ grep -q test_create_server report.html
107
+ grep -q AssertionError errors.html
108
+
109
+ - uses: actions/upload-artifact@v7
110
+ with:
111
+ name: dist
112
+ path: dist/*
113
+ if-no-files-found: error
114
+
115
+ publish:
116
+ name: Publish GitHub release
117
+ needs: [verify, build]
118
+ runs-on: ubuntu-latest
119
+ env:
120
+ GH_TOKEN: ${{ github.token }}
121
+ GH_REPO: ${{ github.repository }}
122
+ VERSION: ${{ needs.verify.outputs.version }}
123
+ steps:
124
+ - uses: actions/checkout@v7
125
+ with:
126
+ ref: ${{ env.TAG }}
127
+
128
+ - uses: actions/download-artifact@v8
129
+ with:
130
+ name: dist
131
+ path: dist
132
+
133
+ - name: Checksums
134
+ working-directory: dist
135
+ run: sha256sum -- * > SHA256SUMS && cat SHA256SUMS
136
+
137
+ - name: Create or update release
138
+ run: |
139
+ flags=()
140
+ [[ "${{ needs.verify.outputs.prerelease }}" == "true" ]] && flags+=(--prerelease)
141
+ if gh release view "$TAG" >/dev/null 2>&1; then
142
+ gh release upload "$TAG" dist/* --clobber
143
+ else
144
+ if scripts/version.sh notes "$VERSION" > notes.md; then
145
+ flags+=(--notes-file notes.md)
146
+ else
147
+ flags+=(--generate-notes)
148
+ fi
149
+ gh release create "$TAG" dist/* --verify-tag --title "tempest-parser $VERSION" "${flags[@]}"
150
+ fi
151
+ echo "### Released tempest-parser $VERSION" >> "$GITHUB_STEP_SUMMARY"
152
+ echo "https://github.com/$GH_REPO/releases/tag/$TAG" >> "$GITHUB_STEP_SUMMARY"
153
+
154
+ pypi:
155
+ name: Upload to PyPI
156
+ needs: [verify, publish]
157
+ if: ${{ vars.PYPI_PUBLISH == 'true' }}
158
+ runs-on: ubuntu-latest
159
+ environment:
160
+ name: pypi
161
+ url: https://pypi.org/project/TempestParser/${{ needs.verify.outputs.version }}/
162
+ permissions:
163
+ id-token: write
164
+ steps:
165
+ - uses: actions/download-artifact@v8
166
+ with:
167
+ name: dist
168
+ path: dist
169
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,117 @@
1
+ # Automatic on pull requests and pushes to master; also manual.
2
+ # Lint, package and version checks, then the tests by tag: smoke first, then functional,
3
+ # and integration against the built wheel.
4
+ name: Tests
5
+
6
+ on:
7
+ push:
8
+ branches: [master]
9
+ pull_request:
10
+ workflow_dispatch:
11
+ inputs:
12
+ os:
13
+ description: "Operating systems for the test matrix"
14
+ type: choice
15
+ options: [all, ubuntu, macos, windows]
16
+ default: all
17
+
18
+ permissions:
19
+ contents: read
20
+
21
+ concurrency:
22
+ group: tests-${{ github.ref }}
23
+ cancel-in-progress: true
24
+
25
+ env:
26
+ UV_PYTHON_DOWNLOADS: never
27
+
28
+ jobs:
29
+ lint:
30
+ name: Lint, package, version
31
+ runs-on: ubuntu-latest
32
+ steps:
33
+ - uses: actions/checkout@v7
34
+ with:
35
+ fetch-depth: 0
36
+ - uses: actions/setup-python@v7
37
+ with:
38
+ python-version: "3.15"
39
+ - uses: astral-sh/setup-uv@v10.4.0
40
+ with:
41
+ enable-cache: true
42
+ - name: Install (locked)
43
+ run: uv sync --locked
44
+ - name: Ruff
45
+ run: uv run ruff check --output-format=github .
46
+ - name: Type check (mypy)
47
+ run: uv run mypy
48
+ - name: actionlint
49
+ run: uv run actionlint
50
+ - name: Build and check the package
51
+ run: |
52
+ uv build --out-dir dist
53
+ uv run twine check --strict dist/*
54
+ - name: Version consistency
55
+ run: |
56
+ scripts/version.sh check
57
+ scripts/version.sh versions || echo "::warning::latest tag and changelog.md versions differ (see above)"
58
+ - name: Every test has one tag (smoke / functional / integration)
59
+ run: uv run python scripts/check-test-tags.py
60
+
61
+ test:
62
+ name: Test (${{ matrix.os }}, Python ${{ matrix.python }})
63
+ runs-on: ${{ matrix.os }}
64
+ defaults:
65
+ run:
66
+ # Git Bash on Windows, so every OS runs the same commands
67
+ shell: bash
68
+ strategy:
69
+ fail-fast: false
70
+ matrix:
71
+ os: ${{ fromJSON((github.event_name != 'workflow_dispatch' || inputs.os == 'all') && '["ubuntu-latest","macos-latest","windows-latest"]' || format('["{0}-latest"]', inputs.os)) }}
72
+ python: ["3.11", "3.12", "3.13", "3.14", "3.15"]
73
+ steps:
74
+ - uses: actions/checkout@v7
75
+ with:
76
+ fetch-depth: 0
77
+ - uses: actions/setup-python@v7
78
+ with:
79
+ python-version: ${{ matrix.python }}
80
+ - uses: astral-sh/setup-uv@v10.4.0
81
+ with:
82
+ enable-cache: true
83
+ - name: Install (locked)
84
+ run: uv sync --locked --python "${{ matrix.python }}"
85
+ # coverage of both steps together is checked against fail_under in pyproject.toml
86
+ - name: Smoke tests
87
+ run: uv run pytest -m smoke --junitxml=junit-smoke.xml --cov --cov-report= --cov-fail-under=0
88
+ - name: Functional tests
89
+ run: uv run pytest -m functional --junitxml=junit-functional.xml --cov --cov-append --cov-report= --cov-fail-under=0
90
+ - name: Coverage
91
+ run: uv run coverage report
92
+ - uses: actions/upload-artifact@v7
93
+ if: always()
94
+ with:
95
+ name: junit-${{ matrix.os }}-py${{ matrix.python }}
96
+ path: junit-*.xml
97
+
98
+ integration:
99
+ name: Integration (built wheel)
100
+ runs-on: ubuntu-latest
101
+ steps:
102
+ - uses: actions/checkout@v7
103
+ - uses: actions/setup-python@v7
104
+ with:
105
+ python-version: "3.15"
106
+ - uses: astral-sh/setup-uv@v10.4.0
107
+ with:
108
+ enable-cache: true
109
+ - name: Install dependencies, not the project (the test builds and installs the wheel)
110
+ run: uv sync --locked --no-install-project
111
+ - name: Integration tests
112
+ run: uv run --no-sync pytest -m integration --junitxml=junit-integration.xml
113
+ - uses: actions/upload-artifact@v7
114
+ if: always()
115
+ with:
116
+ name: junit-integration
117
+ path: junit-integration.xml
@@ -0,0 +1,50 @@
1
+ # Automatic: tracks the version on every push to master.
2
+ # Fails if changelog.md is behind the latest release tag; reports what the next releases would be.
3
+ name: Version tracking
4
+
5
+ on:
6
+ push:
7
+ branches: [master]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ track:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v7
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Check changelog.md against tags
21
+ run: scripts/version.sh check
22
+
23
+ - name: Report
24
+ run: |
25
+ current=$(scripts/version.sh current)
26
+ tag=$(scripts/version.sh latest-tag)
27
+ since="n/a"
28
+ [[ -n $tag ]] && since=$(git rev-list --count "$tag..HEAD")
29
+ {
30
+ echo "### Version"
31
+ echo "| | |"
32
+ echo "|---|---|"
33
+ echo "| This commit | \`$current\` |"
34
+ echo "| Latest release tag (highest) | \`${tag:-none}\` |"
35
+ echo "| changelog.md | \`$(scripts/version.sh changelog-version)\` |"
36
+ echo "| Commits since release | $since |"
37
+ echo "| Next patch / minor / major | \`$(scripts/version.sh next patch)\` / \`$(scripts/version.sh next minor)\` / \`$(scripts/version.sh next major)\` |"
38
+ } >> "$GITHUB_STEP_SUMMARY"
39
+ if ! report=$(scripts/version.sh versions); then
40
+ while IFS= read -r line; do
41
+ [[ $line == "out of sync:"* ]] && echo "::warning title=Versions out of sync::${line#out of sync: }"
42
+ done <<< "$report"
43
+ echo "Bump version continues from the highest: $(scripts/version.sh highest)." >> "$GITHUB_STEP_SUMMARY"
44
+ fi
45
+ echo "$current" > version.txt
46
+
47
+ - uses: actions/upload-artifact@v7
48
+ with:
49
+ name: version
50
+ path: version.txt
@@ -0,0 +1,111 @@
1
+ .DS_Store
2
+ I# Byte-compiled / optimized / DLL files
3
+ __pycache__/
4
+ *.py[cod]
5
+ *$py.class
6
+
7
+ # Examples and xmls
8
+ *.xml
9
+ *.html
10
+
11
+ # Mac's common
12
+ .DS_Store
13
+
14
+ # C extensions
15
+ *.so
16
+
17
+ # Distribution / packaging
18
+ .Python
19
+ env/
20
+ build/
21
+ develop-eggs/
22
+ dist/
23
+ downloads/
24
+ eggs/
25
+ .eggs/
26
+ lib/
27
+ lib64/
28
+ parts/
29
+ sdist/
30
+ var/
31
+ *.egg-info/
32
+ .installed.cfg
33
+ *.egg
34
+
35
+ # PyInstaller
36
+ # Usually these files are written by a python script from a template
37
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
38
+ *.manifest
39
+ *.spec
40
+
41
+ # Installer logs
42
+ pip-log.txt
43
+ pip-delete-this-directory.txt
44
+
45
+ # Unit test / coverage reports
46
+ htmlcov/
47
+ .tox/
48
+ .coverage
49
+ .coverage.*
50
+ .cache
51
+ nosetests.xml
52
+ coverage.xml
53
+ *,cover
54
+ .hypothesis/
55
+
56
+ # Translations
57
+ *.mo
58
+ *.pot
59
+
60
+ # Django stuff:
61
+ *.log
62
+ local_settings.py
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ target/
76
+
77
+ # IPython Notebook
78
+ .ipynb_checkpoints
79
+
80
+ # pyenv
81
+ .python-version
82
+
83
+ # celery beat schedule file
84
+ celerybeat-schedule
85
+
86
+ # dotenv
87
+ .env
88
+
89
+ # virtualenv
90
+ venv/
91
+ .venv/
92
+ ENV/
93
+
94
+ # Spyder project settings
95
+ .spyderproject
96
+
97
+ # Rope project settings
98
+ .ropeproject
99
+
100
+ # PyCharm
101
+ .idea
102
+
103
+ # Visual Studio Code
104
+ .vscode
105
+
106
+ # Test samples are tracked despite the *.xml / *.log rules above
107
+ !tests/data/*
108
+ !tests/data/**/*.log
109
+ !examples/*.html
110
+ # package templates: the wheel takes only files git tracks
111
+ !tempest_parser/templates/*.html
@@ -0,0 +1,61 @@
1
+ # tempest-parser
2
+
3
+ CLI (`tparser`) that imports test results (Tempest log, subunit, jUnit XML, Rally JSON, CSV) from many runs,
4
+ matches tests across them and writes HTML trending / errors reports and CSV. Usage in `README.md`; behaviour in
5
+ `documents/specs.md`; the CI plan in `documents/plan.md`; changes in `changelog.md`.
6
+
7
+ ## Layout
8
+
9
+ - `tempest_parser/tparser.py`: CLI. `manager/importers.py`: XML, JSON, CSV and subunit importers.
10
+ `parser/tempest_log_parser.py`: `.log` parser. `manager/test_manager.py`: the shared results
11
+ (`TestsManager`), made of the dataclasses in `manager/models.py` (times in seconds, UTC dates).
12
+ `const.py`: `Status`, `Column` and `InputFormat` enums. `reports/`: HTML (Jinja2 templates in
13
+ `templates/`), CSV reports and the JSON summary; they take the `TestsManager`.
14
+ - Package data: `etc/tempest-parser.conf`, `res/*.list` (baseline test lists), `templates/*.html`.
15
+ - `tests/smoke`, `tests/functional`, `tests/integration`; sample inputs in `tests/data`
16
+ (`tests/data/trending`: four `.log` runs for trending reports). `examples/`: reports rendered from
17
+ them (commands in `examples/README.md`); regenerate them when report output changes.
18
+ - `pyproject.toml`: package metadata, dependencies, dependency groups (`test`, `lint`, `release`, `dev`)
19
+ and tool settings; `uv.lock` pins the development environment.
20
+ - `scripts/version.sh` (versions), `scripts/check-test-tags.py` (test tags); `.github/workflows/` (CI),
21
+ `.github/dependabot.yml`.
22
+
23
+ ## Rules
24
+
25
+ - Python 3.11+ (`requires-python` in `pyproject.toml`, ruff `target-version`); CI tests 3.11–3.15 on
26
+ ubuntu, macOS and Windows, and builds and releases on the newest. The minimum is the oldest CPython still supported upstream:
27
+ raise it when that version reaches end of life (or earlier if a dependency needs it), add each new
28
+ release to CI and the classifiers, and say why in the changelog.
29
+ - Every commit that changes behaviour, configuration, interfaces, tooling or documents adds a line to
30
+ `changelog.md` under **Unreleased**, in the right section (Added, Changed, Fixed, ...).
31
+ - Dependencies live in `pyproject.toml` only. After changing them, run `uv lock` and commit `uv.lock`;
32
+ CI installs with `uv sync --locked`.
33
+ - Before committing: `uv run ruff check .`, `uv run mypy`, `uv run pytest`,
34
+ `uv run python scripts/check-test-tags.py`. Workflow changes must pass `uv run actionlint`. CI also
35
+ checks that the smoke and functional tests together cover at least `fail_under` in `pyproject.toml`.
36
+ - Open text files with `encoding="utf-8"`: before Python 3.15, Windows uses the locale's code page.
37
+ - `tempest_parser` is fully annotated and checked with `mypy --strict` (it ships `py.typed`): annotate
38
+ new functions; avoid `Any` and `type: ignore` unless a dependency has no types (say why).
39
+ - Every test has exactly one tag, given by its folder: `smoke` (the `tparser` command end to end, in a
40
+ subprocess), `functional` (one module or class), `integration` (the built and installed wheel). No tests
41
+ outside these folders.
42
+ - A bug fix comes with a test that fails before the fix. Behaviour that isn't fixed yet goes into
43
+ `documents/specs.md` section 8 (known limitations), not into a test that expects it.
44
+ - Tests work in their own temp dir (`tmp_path`, the `data_file` fixture) and never write into `tests/data`
45
+ or the repo.
46
+ - Test data is made up: sample test names and messages only, never real results, hostnames, credentials or
47
+ customer data. Subunit streams are generated in `tests/conftest.py`, not committed.
48
+ - Keep `documents/specs.md` in step with the code when CLI options, input formats, statuses, reports or
49
+ config keys change.
50
+ - Reports only read the `TestsManager` results they are given; they never change them.
51
+ HTML escaping is Jinja2 autoescaping in the reporter and templates, never in stored results; mark
52
+ trusted markup with `markupsafe.Markup`.
53
+ - The wheel holds only `tempest_parser`. New data file types need a `[tool.setuptools.package-data]`
54
+ entry and a check in `tests/integration/test_wheel.py`.
55
+ - Versions come from `v*` git tags through setuptools-scm; there is no version in the source. Release with
56
+ the **Bump version** workflow (it updates `changelog.md`, tags and starts **Release**), not by tagging
57
+ by hand. Releases come from `master` only. PyPI upload runs only when the repository variable
58
+ `PYPI_PUBLISH` is `true`.
59
+ - Scripts in `scripts/` run on the bash 3.2 that ships with macOS.
60
+ - `README.md` is also the PyPI page: use absolute links in it.
61
+ - Work on a branch and fast-forward `master`; `master` is the default branch.