MCPcopy
hub / github.com/benoitc/gunicorn / main

Function main

tests/docker/asgi_framework_compat/scripts/generate_grid.py:156–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154
155
156def 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
197if __name__ == "__main__":

Callers 1

generate_grid.pyFile · 0.70

Calls 5

parse_resultsFunction · 0.85
generate_markdownFunction · 0.85
existsMethod · 0.80
nowMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected