()
| 154 | |
| 155 | |
| 156 | def main(): |
| 157 | base_dir = Path(__file__).parent.parent |
| 158 | results_dir = base_dir / "results" |
| 159 | results_file = results_dir / "pytest_results.json" |
| 160 | |
| 161 | if not results_file.exists(): |
| 162 | print(f"Results file not found: {results_file}") |
| 163 | return |
| 164 | |
| 165 | results = parse_results(results_file) |
| 166 | md_content = generate_markdown(results) |
| 167 | |
| 168 | # Write to results directory |
| 169 | md_file = results_dir / "compatibility_grid.md" |
| 170 | with open(md_file, "w") as f: |
| 171 | f.write(md_content) |
| 172 | print(f"Written: {md_file}") |
| 173 | |
| 174 | # Also write JSON summary |
| 175 | json_file = results_dir / "compatibility_grid.json" |
| 176 | summary = { |
| 177 | "generated": datetime.now().isoformat(), |
| 178 | "worker": "gunicorn.workers.gasgi.ASGIWorker", |
| 179 | "frameworks": { |
| 180 | fw: { |
| 181 | "name": FRAMEWORK_NAMES[fw], |
| 182 | "categories": results[fw], |
| 183 | "total_passed": sum(results[fw][c]["passed"] for c in CATEGORIES), |
| 184 | "total_tests": sum(results[fw][c]["total"] for c in CATEGORIES), |
| 185 | } |
| 186 | for fw in FRAMEWORKS |
| 187 | } |
| 188 | } |
| 189 | with open(json_file, "w") as f: |
| 190 | json.dump(summary, indent=2, fp=f) |
| 191 | print(f"Written: {json_file}") |
| 192 | |
| 193 | # Print the markdown |
| 194 | print("\n" + md_content) |
| 195 | |
| 196 | |
| 197 | if __name__ == "__main__": |
no test coverage detected