debugbrief 1.3.0__tar.gz → 1.4.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.
- debugbrief-1.4.0/.github/CODEOWNERS +5 -0
- debugbrief-1.4.0/.github/ISSUE_TEMPLATE/bug_report.yml +41 -0
- debugbrief-1.4.0/.github/ISSUE_TEMPLATE/feature_request.yml +25 -0
- debugbrief-1.4.0/.github/workflows/ci.yml +122 -0
- debugbrief-1.4.0/.github/workflows/pages.yml +46 -0
- debugbrief-1.4.0/.github/workflows/release.yml +65 -0
- debugbrief-1.4.0/.github/workflows/site.yml +45 -0
- debugbrief-1.4.0/CHANGELOG.md +434 -0
- debugbrief-1.4.0/CONTRIBUTING.md +98 -0
- debugbrief-1.4.0/MANIFEST.in +15 -0
- debugbrief-1.4.0/PKG-INFO +174 -0
- debugbrief-1.4.0/README.md +134 -0
- debugbrief-1.4.0/SECURITY.md +97 -0
- debugbrief-1.4.0/docs/COMMANDS.md +494 -0
- debugbrief-1.4.0/docs/PLATFORM_VERIFICATION.md +171 -0
- debugbrief-1.4.0/docs/REAL_PROJECT_VERIFICATION.md +83 -0
- debugbrief-1.4.0/docs/SAFARI_ACCESSIBILITY_VERIFICATION.md +94 -0
- debugbrief-1.4.0/docs/TRANSFORMATION.md +145 -0
- debugbrief-1.4.0/docs/demo.gif +0 -0
- debugbrief-1.4.0/docs/demo.tape +45 -0
- debugbrief-1.4.0/docs/maintainers.md +69 -0
- debugbrief-1.4.0/examples/sample-handoff.md +69 -0
- debugbrief-1.4.0/examples/sample-incident.md +54 -0
- debugbrief-1.4.0/examples/sample-pr.md +60 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/pyproject.toml +8 -8
- debugbrief-1.4.0/scripts/check_site.py +81 -0
- debugbrief-1.4.0/scripts/generate_samples.py +137 -0
- debugbrief-1.4.0/scripts/serve_site.py +36 -0
- debugbrief-1.4.0/scripts/verify_wheel.py +81 -0
- debugbrief-1.4.0/site/.nojekyll +0 -0
- debugbrief-1.4.0/site/data/sample-handoff.json +194 -0
- debugbrief-1.4.0/site/data/sample-handoff.md +67 -0
- debugbrief-1.4.0/site/data/sample-incident.json +205 -0
- debugbrief-1.4.0/site/data/sample-incident.md +70 -0
- debugbrief-1.4.0/site/data/sample-pr.json +194 -0
- debugbrief-1.4.0/site/data/sample-pr.md +72 -0
- debugbrief-1.4.0/site/docs.html +305 -0
- debugbrief-1.4.0/site/explorer.html +122 -0
- debugbrief-1.4.0/site/explorer.js +823 -0
- debugbrief-1.4.0/site/favicon.svg +1 -0
- debugbrief-1.4.0/site/index.html +413 -0
- debugbrief-1.4.0/site/sample-handoff.html +4 -0
- debugbrief-1.4.0/site/sample-incident.html +4 -0
- debugbrief-1.4.0/site/sample-report.html +4 -0
- debugbrief-1.4.0/site/site.css +674 -0
- debugbrief-1.4.0/site/site.js +653 -0
- debugbrief-1.4.0/site/social-preview.png +0 -0
- debugbrief-1.4.0/site/stage.js +631 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/__init__.py +2 -2
- debugbrief-1.4.0/src/debugbrief/_process_guard.py +188 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/cli.py +573 -204
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/command_runner.py +35 -15
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/derive.py +226 -38
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/doctor.py +51 -5
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/filters.py +105 -5
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/git_utils.py +410 -28
- debugbrief-1.4.0/src/debugbrief/markdown.py +145 -0
- debugbrief-1.4.0/src/debugbrief/models.py +696 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/paths.py +52 -3
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/redaction.py +23 -6
- debugbrief-1.4.0/src/debugbrief/redo_safety.py +1095 -0
- debugbrief-1.4.0/src/debugbrief/reporters/__init__.py +258 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/reporters/base.py +234 -51
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/reporters/handoff.py +14 -7
- debugbrief-1.4.0/src/debugbrief/reporters/html.py +479 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/reporters/incident.py +15 -8
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/reporters/pr.py +12 -7
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/reports_index.py +41 -18
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/session_manager.py +183 -34
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/sessions_index.py +25 -7
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/utils.py +22 -3
- debugbrief-1.4.0/src/debugbrief.egg-info/PKG-INFO +174 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief.egg-info/SOURCES.txt +60 -1
- debugbrief-1.4.0/tests/conftest.py +50 -0
- debugbrief-1.4.0/tests/snapshots/failing_incident_report.md +63 -0
- debugbrief-1.4.0/tests/snapshots/failing_pr_report.md +58 -0
- debugbrief-1.4.0/tests/snapshots/handoff_report.md +61 -0
- debugbrief-1.4.0/tests/snapshots/incident_report.md +62 -0
- debugbrief-1.4.0/tests/snapshots/no_test_pr_report.md +36 -0
- debugbrief-1.4.0/tests/snapshots/pr_report.md +73 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_cancel.py +1 -1
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_ci_workflow.py +16 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_cli_ergonomics.py +8 -5
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_command_runner.py +20 -8
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_derive.py +261 -1
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_doctor.py +38 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_e2e_cli.py +66 -4
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_filters.py +57 -0
- debugbrief-1.4.0/tests/test_git_utils.py +583 -0
- debugbrief-1.4.0/tests/test_html_report.py +251 -0
- debugbrief-1.4.0/tests/test_json_report.py +233 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_last_open.py +82 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_list_show.py +115 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_markdown_safety.py +41 -2
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_paths.py +40 -0
- debugbrief-1.4.0/tests/test_process_guard.py +164 -0
- debugbrief-1.4.0/tests/test_product_trust.py +617 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_redaction.py +14 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_reporters.py +40 -2
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_runner_robustness.py +5 -9
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_session_lifecycle.py +49 -1
- debugbrief-1.4.0/tests/test_site.py +85 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_state_file_safety.py +55 -1
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_v12_features.py +25 -0
- debugbrief-1.3.0/PKG-INFO +0 -171
- debugbrief-1.3.0/README.md +0 -131
- debugbrief-1.3.0/src/debugbrief/markdown.py +0 -49
- debugbrief-1.3.0/src/debugbrief/models.py +0 -424
- debugbrief-1.3.0/src/debugbrief/reporters/__init__.py +0 -114
- debugbrief-1.3.0/src/debugbrief.egg-info/PKG-INFO +0 -171
- debugbrief-1.3.0/tests/test_git_utils.py +0 -280
- debugbrief-1.3.0/tests/test_json_report.py +0 -118
- {debugbrief-1.3.0 → debugbrief-1.4.0}/LICENSE +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/setup.cfg +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/__main__.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief/config.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief.egg-info/dependency_links.txt +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief.egg-info/entry_points.txt +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief.egg-info/requires.txt +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/src/debugbrief.egg-info/top_level.txt +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_autostart.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_command_lease.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_config.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_run_passthrough.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_snapshots.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_state_dir_safety.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_state_integrity.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_utils.py +0 -0
- {debugbrief-1.3.0 → debugbrief-1.4.0}/tests/test_version.py +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report something that does not work as documented.
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: what-happened
|
|
7
|
+
attributes:
|
|
8
|
+
label: What happened
|
|
9
|
+
description: What you did, what you expected, and what occurred instead.
|
|
10
|
+
placeholder: |
|
|
11
|
+
Steps:
|
|
12
|
+
1. debugbrief run -- ...
|
|
13
|
+
2. ...
|
|
14
|
+
|
|
15
|
+
Expected: ...
|
|
16
|
+
Actual: ...
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: input
|
|
20
|
+
id: version
|
|
21
|
+
attributes:
|
|
22
|
+
label: DebugBrief version
|
|
23
|
+
description: Output of `debugbrief --version`.
|
|
24
|
+
placeholder: debugbrief 1.3.0
|
|
25
|
+
validations:
|
|
26
|
+
required: true
|
|
27
|
+
- type: input
|
|
28
|
+
id: environment
|
|
29
|
+
attributes:
|
|
30
|
+
label: OS and Python version
|
|
31
|
+
placeholder: macOS 14, Python 3.12
|
|
32
|
+
validations:
|
|
33
|
+
required: true
|
|
34
|
+
- type: textarea
|
|
35
|
+
id: output
|
|
36
|
+
attributes:
|
|
37
|
+
label: Relevant output
|
|
38
|
+
description: Command output or a report excerpt. Remove anything sensitive.
|
|
39
|
+
render: text
|
|
40
|
+
validations:
|
|
41
|
+
required: false
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest a change or addition.
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: Problem
|
|
9
|
+
description: What are you trying to do that DebugBrief does not support today?
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: proposal
|
|
14
|
+
attributes:
|
|
15
|
+
label: Proposed change
|
|
16
|
+
description: What you would like it to do, and how you imagine using it.
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: textarea
|
|
20
|
+
id: alternatives
|
|
21
|
+
attributes:
|
|
22
|
+
label: Alternatives considered
|
|
23
|
+
description: Workarounds you have tried or other approaches you weighed.
|
|
24
|
+
validations:
|
|
25
|
+
required: false
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v6
|
|
13
|
+
- uses: actions/setup-python@v6
|
|
14
|
+
with:
|
|
15
|
+
python-version: "3.12"
|
|
16
|
+
- name: Install dev dependencies
|
|
17
|
+
run: |
|
|
18
|
+
python -m pip install --upgrade pip
|
|
19
|
+
python -m pip install -e ".[dev]"
|
|
20
|
+
- name: Ruff
|
|
21
|
+
run: python -m ruff check src tests
|
|
22
|
+
- name: mypy
|
|
23
|
+
run: python -m mypy src/debugbrief
|
|
24
|
+
|
|
25
|
+
test:
|
|
26
|
+
# Unix-only by design. DebugBrief does not support Windows/PowerShell,
|
|
27
|
+
# so CI runs on Linux and macOS only and never on a Windows runner.
|
|
28
|
+
runs-on: ${{ matrix.os }}
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
matrix:
|
|
32
|
+
os: [ubuntu-latest, macos-latest]
|
|
33
|
+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
34
|
+
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v6
|
|
37
|
+
|
|
38
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
39
|
+
uses: actions/setup-python@v6
|
|
40
|
+
with:
|
|
41
|
+
python-version: ${{ matrix.python-version }}
|
|
42
|
+
|
|
43
|
+
- name: Install with dev dependencies
|
|
44
|
+
run: |
|
|
45
|
+
python -m pip install --upgrade pip
|
|
46
|
+
python -m pip install -e ".[dev]"
|
|
47
|
+
|
|
48
|
+
- name: Run tests
|
|
49
|
+
run: python -m pytest -q
|
|
50
|
+
|
|
51
|
+
- name: Build sdist and wheel
|
|
52
|
+
run: python -m build
|
|
53
|
+
|
|
54
|
+
- name: Install the built wheel into a clean environment
|
|
55
|
+
shell: bash
|
|
56
|
+
run: |
|
|
57
|
+
set -euo pipefail
|
|
58
|
+
python -m venv /tmp/wheelenv
|
|
59
|
+
/tmp/wheelenv/bin/python -m pip install --upgrade pip
|
|
60
|
+
/tmp/wheelenv/bin/python -m pip install dist/*.whl
|
|
61
|
+
/tmp/wheelenv/bin/python -m pip check
|
|
62
|
+
|
|
63
|
+
- name: Versions agree (package, metadata, pyproject)
|
|
64
|
+
shell: bash
|
|
65
|
+
run: |
|
|
66
|
+
set -euo pipefail
|
|
67
|
+
py=/tmp/wheelenv/bin/python
|
|
68
|
+
pkg=$("$py" -c "import debugbrief; print(debugbrief.__version__)")
|
|
69
|
+
meta=$("$py" -c "from importlib.metadata import version; print(version('debugbrief'))")
|
|
70
|
+
proj=$(grep -m1 -E '^version = ' pyproject.toml | sed -E 's/.*"([^"]+)".*/\1/')
|
|
71
|
+
echo "package=$pkg metadata=$meta pyproject=$proj"
|
|
72
|
+
test "$pkg" = "$meta"
|
|
73
|
+
test "$pkg" = "$proj"
|
|
74
|
+
|
|
75
|
+
- name: CLI smoke checks from the installed wheel
|
|
76
|
+
shell: bash
|
|
77
|
+
run: |
|
|
78
|
+
set -euo pipefail
|
|
79
|
+
db=/tmp/wheelenv/bin/debugbrief
|
|
80
|
+
tmp="$(mktemp -d)"
|
|
81
|
+
cd "$tmp"
|
|
82
|
+
git init -q
|
|
83
|
+
git config user.email "ci@example.com"
|
|
84
|
+
git config user.name "CI"
|
|
85
|
+
git checkout -q -b main
|
|
86
|
+
echo "seed" > seed.txt
|
|
87
|
+
git add seed.txt
|
|
88
|
+
git commit -qm "init"
|
|
89
|
+
|
|
90
|
+
"$db" --version
|
|
91
|
+
"$db" --help
|
|
92
|
+
|
|
93
|
+
# doctor: warnings (exit 1) are acceptable in a fresh repo;
|
|
94
|
+
# only blocking issues (exit 2) should fail the smoke check.
|
|
95
|
+
rc=0
|
|
96
|
+
"$db" doctor || rc=$?
|
|
97
|
+
if [ "$rc" -gt 1 ]; then
|
|
98
|
+
echo "doctor reported blocking issues (exit $rc)"
|
|
99
|
+
exit 1
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
"$db" start "ci smoke"
|
|
103
|
+
"$db" note ci note without quotes
|
|
104
|
+
"$db" run -- python -c "print('ok')"
|
|
105
|
+
"$db" run -- python -c "import sys; sys.exit(1)" || true
|
|
106
|
+
"$db" redo || true
|
|
107
|
+
"$db" preview > /dev/null
|
|
108
|
+
"$db" end
|
|
109
|
+
"$db" last
|
|
110
|
+
"$db" list
|
|
111
|
+
|
|
112
|
+
# A broken downstream pipe must stop the command promptly, not hang to
|
|
113
|
+
# the timeout.
|
|
114
|
+
"$db" start "pipe smoke"
|
|
115
|
+
start=$(date +%s)
|
|
116
|
+
"$db" run --timeout 30 -- yes | head -n 1 > /dev/null || true
|
|
117
|
+
elapsed=$(( $(date +%s) - start ))
|
|
118
|
+
if [ "$elapsed" -gt 10 ]; then
|
|
119
|
+
echo "broken-pipe run did not stop promptly (${elapsed}s)"
|
|
120
|
+
exit 1
|
|
121
|
+
fi
|
|
122
|
+
"$db" cancel --yes
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
name: Deploy website (manual)
|
|
2
|
+
|
|
3
|
+
# Local work does not deploy. Once reviewed and pushed, an authorized maintainer
|
|
4
|
+
# must explicitly run this workflow on main. Pull requests cannot deploy.
|
|
5
|
+
on:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: github-pages
|
|
13
|
+
cancel-in-progress: false
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
validate:
|
|
17
|
+
if: github.ref == 'refs/heads/main' && github.repository == 'hari-kancharla/Debug-Brief'
|
|
18
|
+
uses: ./.github/workflows/site.yml
|
|
19
|
+
|
|
20
|
+
build:
|
|
21
|
+
needs: validate
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
pages: read
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v6
|
|
28
|
+
- uses: actions/configure-pages@v5
|
|
29
|
+
- name: Package static website
|
|
30
|
+
uses: actions/upload-pages-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
path: site
|
|
33
|
+
|
|
34
|
+
deploy:
|
|
35
|
+
needs: build
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
permissions:
|
|
38
|
+
pages: write
|
|
39
|
+
id-token: write
|
|
40
|
+
environment:
|
|
41
|
+
name: github-pages
|
|
42
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
43
|
+
steps:
|
|
44
|
+
- name: Deploy reviewed website artifact
|
|
45
|
+
id: deployment
|
|
46
|
+
uses: actions/deploy-pages@v5
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Builds the tagged source and publishes through the existing PyPI project's
|
|
4
|
+
# GitHub Trusted Publisher for this repository, release.yml and environment pypi.
|
|
5
|
+
# No long-lived publishing token is stored in the repository.
|
|
6
|
+
|
|
7
|
+
on:
|
|
8
|
+
release:
|
|
9
|
+
types: [published]
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
name: Build distributions
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v6
|
|
20
|
+
- uses: actions/setup-python@v6
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.12"
|
|
23
|
+
- name: Verify the release tag matches the package version
|
|
24
|
+
run: |
|
|
25
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
26
|
+
project_version=$(python -c '
|
|
27
|
+
import tomllib
|
|
28
|
+
with open("pyproject.toml", "rb") as f:
|
|
29
|
+
print(tomllib.load(f)["project"]["version"])
|
|
30
|
+
')
|
|
31
|
+
if [ "$tag" != "$project_version" ]; then
|
|
32
|
+
echo "Release tag '$tag' does not match pyproject version '$project_version'." >&2
|
|
33
|
+
echo "Update the version in pyproject.toml or retag the release, then try again." >&2
|
|
34
|
+
exit 1
|
|
35
|
+
fi
|
|
36
|
+
echo "Release tag matches package version: $project_version"
|
|
37
|
+
- name: Install build tooling
|
|
38
|
+
run: python -m pip install --upgrade pip build twine
|
|
39
|
+
- name: Build wheel and sdist
|
|
40
|
+
run: python -m build
|
|
41
|
+
- name: Check distributions
|
|
42
|
+
run: twine check dist/*
|
|
43
|
+
- name: Upload distributions
|
|
44
|
+
uses: actions/upload-artifact@v4
|
|
45
|
+
with:
|
|
46
|
+
name: dist
|
|
47
|
+
path: dist/
|
|
48
|
+
|
|
49
|
+
publish:
|
|
50
|
+
name: Publish to PyPI
|
|
51
|
+
needs: build
|
|
52
|
+
runs-on: ubuntu-latest
|
|
53
|
+
permissions:
|
|
54
|
+
id-token: write
|
|
55
|
+
environment:
|
|
56
|
+
name: pypi
|
|
57
|
+
url: https://pypi.org/project/debugbrief/
|
|
58
|
+
steps:
|
|
59
|
+
- name: Download distributions
|
|
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
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Website checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_call:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
website:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
timeout-minutes: 15
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v6
|
|
18
|
+
- uses: actions/setup-python@v6
|
|
19
|
+
with:
|
|
20
|
+
python-version: '3.12'
|
|
21
|
+
- uses: actions/setup-node@v6
|
|
22
|
+
with:
|
|
23
|
+
node-version: '22'
|
|
24
|
+
cache: npm
|
|
25
|
+
- name: Install verification tools
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install -e '.[dev]'
|
|
28
|
+
npm ci
|
|
29
|
+
npx playwright install --with-deps chromium
|
|
30
|
+
- name: Verify site links and generated fixtures
|
|
31
|
+
run: |
|
|
32
|
+
python scripts/check_site.py
|
|
33
|
+
python scripts/generate_samples.py --check
|
|
34
|
+
python -m pytest -q tests/test_site.py
|
|
35
|
+
- name: Test browser interactions, imports, accessibility and reflow
|
|
36
|
+
run: npm run test:site
|
|
37
|
+
- name: Retain browser evidence
|
|
38
|
+
if: always()
|
|
39
|
+
uses: actions/upload-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: website-verification
|
|
42
|
+
path: |
|
|
43
|
+
artifacts/verification/
|
|
44
|
+
test-results/
|
|
45
|
+
retention-days: 7
|