Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
08ee1b5
Fix run_math_pipeline test import to use proper package path (#2308)
jucor Nov 25, 2025
ee24452
Replace NamedMatrix by DataFrame and add regression tests (#2282)
jucor Nov 25, 2025
1ce8660
Only run python-ci for delphi changes; minimize output (#2315)
ballPointPenguin Dec 1, 2025
af27bba
Revert "Merge branch 'stable' into edge" (#2305)
ballPointPenguin Dec 1, 2025
3019c78
add narrative pipelline test (#2307)
tevko Dec 3, 2025
f6ae1af
Alpha visualization (#2302)
ballPointPenguin Dec 3, 2025
3c3ecf6
Bump js-yaml from 4.1.0 to 4.1.1 in /e2e (#2292)
dependabot[bot] Dec 3, 2025
ba0a4dd
Bump js-yaml from 3.14.1 to 3.14.2 in /cdk (#2298)
dependabot[bot] Dec 3, 2025
fc426a6
Bump glob from 10.3.16 to 10.5.0 in /client-report (#2300)
dependabot[bot] Dec 3, 2025
ab4680c
Bump js-yaml in /client-admin (#2309)
dependabot[bot] Dec 3, 2025
7b605c6
Speed up repness 11x (#2316)
jucor Dec 4, 2025
ddd4e64
some lib updates (#2323)
ballPointPenguin Dec 4, 2025
fa45441
Bump js-yaml in /client-report (#2317)
dependabot[bot] Dec 4, 2025
29c7167
Bump nodemailer from 7.0.7 to 7.0.11 in /server (#2319)
dependabot[bot] Dec 4, 2025
b761252
Bump node-forge from 1.3.1 to 1.3.3 in /client-report (#2321)
dependabot[bot] Dec 4, 2025
3ce2410
Bump jws in /server (#2324)
dependabot[bot] Dec 4, 2025
8590224
Create CODE_OF_CONDUCT.md (#2327)
tevko Dec 8, 2025
d2f9b6d
Add auto-discovery for regression test datasets with --include-local …
jucor Dec 10, 2025
cd88a29
Fix users_uid_seq not reset after prodclone restore (#2328)
jucor Dec 10, 2025
1abd8d3
home2 draft (#2325)
ballPointPenguin Dec 10, 2025
b0a7a0b
fix py memory_usage_mb call (#2331)
tevko Dec 12, 2025
f0ebbdf
Bump jws from 3.2.2 to 3.2.3 in /oidc-simulator (#2329)
dependabot[bot] Dec 16, 2025
e66ed31
update home2 copy (#2332)
ballPointPenguin Dec 18, 2025
1b935e9
delphi data inversion fix (#2330)
ballPointPenguin Dec 18, 2025
b268159
add branch-workflow.md doc (#2334)
ballPointPenguin Dec 18, 2025
cebd9d2
refactor: remove legacy poller/system architecture
jucor Jan 5, 2026
cfc1518
refactor: remove dead code and archive outdated docs
jucor Jan 5, 2026
4c82531
docs: update RUNNING_THE_SYSTEM.md and archive more outdated docs
jucor Jan 5, 2026
0cc52a6
docs: add dead code cleanup report with vulture analysis
jucor Jan 6, 2026
c56beb2
fix: restore incorrectly deleted general.py and remove unused imports
jucor Jan 7, 2026
645894d
docs: unify dead code cleanup reports
jucor Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 63 additions & 14 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: Delphi Python Tests

on:
push:
branches: [ edge, stable ]
branches: &branches [ edge, stable ]
paths: &paths
- 'delphi/**/*.py'
- 'delphi/requirements*.txt'
- 'delphi/Dockerfile'
- '.github/workflows/python-ci.yml'
pull_request:
branches: [ edge, stable ]
branches: *branches
paths: *paths

jobs:
test:
Expand Down Expand Up @@ -70,6 +76,7 @@ jobs:
docker compose -f docker-compose.test.yml cp delphi/generate_coverage_md.py delphi:/app/generate_coverage_md.py
echo "Copying script to be tested into container..."
docker compose -f docker-compose.test.yml cp delphi/polismath/run_math_pipeline.py delphi:/app/run_math_pipeline.py
docker compose -f docker-compose.test.yml cp delphi/umap_narrative delphi:/app/umap_narrative

echo "Running tests and generating coverage report..."
docker compose \
Expand All @@ -90,7 +97,7 @@ jobs:
python create_dynamodb_tables.py --region us-east-1; \
echo '--- Running Pytest ---'; \
export PYTHONPATH=\$PYTHONPATH:/app; \
pytest --cov=polismath --cov=run_math_pipeline --cov-report=xml:/app/coverage.xml /app/tests --ignore=/app/tests/test_pakistan_conversation.py
pytest --cov=polismath --cov=run_math_pipeline --cov=./umap_narrative --cov-report=xml:/app/coverage.xml /app/tests --ignore=/app/tests/test_pakistan_conversation.py
echo '--- Generating Coverage Comment Text ---'; \
python /app/generate_coverage_md.py > /app/coverage-comment.md \
"
Expand All @@ -100,24 +107,66 @@ jobs:
run: |
echo "Copying coverage-comment.md from delphi container..."
docker compose -f docker-compose.test.yml cp delphi:/app/coverage-comment.md .
echo "=== Coverage Report ==="
cat coverage-comment.md

- name: 8. Post Coverage Comment
- name: 8. Upload Coverage Report
if: success()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage-comment.md

- name: 9. Post Coverage Comment
if: success() && github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const commentBody = fs.readFileSync('coverage-comment.md', 'utf8');

await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "## Coverage Report\n\n" + commentBody
});

- name: 9. Show service logs on failure
const marker = '<!-- delphi-coverage-report -->';
const body = `${marker}\n## Delphi Coverage Report\n\n${commentBody}`;

try {
// Find existing coverage comment
const { data: comments } = await github.rest.issues.listComments({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});

const existingComment = comments.find(c => c.body.includes(marker));

if (existingComment) {
// Delete existing comment so new one appears after latest commit
await github.rest.issues.deleteComment({
comment_id: existingComment.id,
owner: context.repo.owner,
repo: context.repo.repo,
});
console.log('Existing coverage comment deleted.');
}

// Always create a new comment
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
});
console.log('Coverage comment posted successfully.');
} catch (error) {
if (error.status === 403) {
console.log('Note: Could not post coverage comment to PR.');
console.log('This is expected for PRs from forks due to GitHub token permissions.');
console.log('Coverage report is available in the workflow logs (step 7) and as a downloadable artifact (step 8).');
} else {
console.log(`Unexpected error posting comment: ${error.message}`);
}
}

- name: 10. Show service logs on failure
if: failure()
run: |
echo "=== Delphi service logs ==="
Expand All @@ -127,7 +176,7 @@ jobs:
echo "=== DynamoDB service logs ==="
docker compose -f docker-compose.test.yml logs dynamodb || true

- name: 10. Clean up services
- name: 11. Clean up services
if: always()
run: |
echo "Cleaning up services..."
Expand Down
34 changes: 34 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,40 @@
"package": "${workspaceFolder}/server/package.json",
"localRoot": "${workspaceFolder}/server"
}
},
{
"name": "Python: Debug Regression Tests",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"regression_tests",
"-v"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/delphi",
"python": "${workspaceFolder}/.venv/bin/python",
"env": {
"PYTHONPATH": "${workspaceFolder}/delphi"
}
},
{
"name": "Python: Debug Current Test File",
"type": "debugpy",
"request": "launch",
"module": "pytest",
"args": [
"${relativeFile}",
"-v"
],
"console": "integratedTerminal",
"justMyCode": false,
"cwd": "${workspaceFolder}/delphi",
"python": "${workspaceFolder}/.venv/bin/python",
"env": {
"PYTHONPATH": "${workspaceFolder}/delphi"
}
}
]
}
46 changes: 45 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,51 @@
"node": {
"package": "${workspaceFolder}/server/package.json",
"enableDebugging": true
}
}
},
{
"label": "Run Regression Tests",
"type": "shell",
"command": "${workspaceFolder}/.venv/bin/python",
"args": [
"-m",
"pytest",
"regression_tests",
"-v"
],
"options": {
"cwd": "${workspaceFolder}/delphi"
},
"group": {
"kind": "build"
},
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
},
{
"label": "Run Regression Tests (Parallel)",
"type": "shell",
"command": "${workspaceFolder}/.venv/bin/python",
"args": [
"-m",
"pytest",
"regression_tests",
"-v",
"-n",
"auto"
],
"options": {
"cwd": "${workspaceFolder}/delphi"
},
"group": "build",
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": []
}
]
}
Loading