Skip to content

Commit 8e52f84

Browse files
authored
Merge pull request #12 from Ganymede-Bio/try-visualization
Update documentation and code formatting
2 parents b474546 + 072f8b6 commit 8e52f84

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,3 +212,4 @@ test_venv
212212

213213
examples/proprietary/
214214
parsing_answer_guide.xlsx
215+
.crush/

examples/debug_large_file_bottleneck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_file_reading():
4141
print(f"Read time: {read_time:.3f}s")
4242
print(f"Dimensions: {sheet_data.max_row + 1} x {sheet_data.max_column + 1}")
4343
print(f"Total cells: {cells:,}")
44-
print(f"Read rate: {cells/read_time:,.0f} cells/sec")
44+
print(f"Read rate: {cells / read_time:,.0f} cells/sec")
4545

4646
return sheet_data
4747

@@ -64,7 +64,7 @@ def test_simple_detection(sheet_data):
6464
cells = (sheet_data.max_row + 1) * (sheet_data.max_column + 1)
6565

6666
print(f"Detection time: {detection_time:.3f}s")
67-
print(f"Detection rate: {cells/detection_time:,.0f} cells/sec")
67+
print(f"Detection rate: {cells / detection_time:,.0f} cells/sec")
6868
print(f"Is simple table: {result.is_simple_table}")
6969
print(f"Confidence: {result.confidence}")
7070
print(f"Range: {result.table_range}")

examples/parse_ground_truth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ def display_ground_truth(ground_truth):
7272
print(f" Tab: {tab_name}")
7373
print(f" Expected tables: {len(ranges)}")
7474
for i, range_str in enumerate(ranges):
75-
print(f" {i+1}. {range_str}")
75+
print(f" {i + 1}. {range_str}")
7676

77-
print(f"\n{'='*80}")
77+
print(f"\n{'=' * 80}")
7878
print(f"Total files: {total_files}")
7979
print(f"Total expected tables: {total_tables}")
8080
print("=" * 80)

examples/test_format_detection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ async def test_format_detection():
8686
print(f"❌ Error processing {file_path}: {e}")
8787

8888
# Summary
89-
print(f"\n{'='*50}")
89+
print(f"\n{'=' * 50}")
9090
print("DETECTION SUMMARY")
91-
print(f"{'='*50}")
91+
print(f"{'=' * 50}")
9292

9393
if results:
9494
print(
@@ -116,7 +116,7 @@ async def test_format_detection():
116116
for method, count in detection_methods.items():
117117
print(f" - {method}: {count}")
118118

119-
print(f"\n{'='*50}")
119+
print(f"\n{'=' * 50}")
120120
print("✅ Format detection test completed!")
121121

122122
if any(r["mismatch"] for r in results):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "gridgulp"
7-
version = "0.3.4"
7+
version = "0.3.5"
88
description = "Simplified intelligent spreadsheet ingestion framework with automatic table detection"
99
readme = "README.md"
1010
requires-python = ">=3.10"

scripts/extract_dataframes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def save_results(self, results: list[FileExtractionResult], format: str = "json"
237237
f.write(f"- Tables detected: {total_detected}\n")
238238
f.write(f"- Tables extracted: {total_extracted}\n")
239239
f.write(f"- High quality tables (score > 0.7): {total_high_quality}\n")
240-
f.write(f"- Overall success rate: {total_extracted/total_detected:.1%}\n\n")
240+
f.write(f"- Overall success rate: {total_extracted / total_detected:.1%}\n\n")
241241

242242
# File details
243243
f.write("## File Details\n\n")
@@ -256,7 +256,7 @@ def save_results(self, results: list[FileExtractionResult], format: str = "json"
256256
f.write(f"- Tables detected: {sheet.total_tables_detected}\n")
257257
f.write(f"- Tables extracted: {sheet.tables_extracted}\n")
258258
f.write(
259-
f"- Success rate: {sheet.tables_extracted/sheet.total_tables_detected:.1%}\n\n"
259+
f"- Success rate: {sheet.tables_extracted / sheet.total_tables_detected:.1%}\n\n"
260260
)
261261

262262
# High quality tables for this sheet
@@ -370,7 +370,7 @@ async def main():
370370
print(f"Tables extracted: {total_extracted}")
371371
print(f"High quality tables: {total_high_quality}")
372372
if total_detected > 0:
373-
print(f"Overall success rate: {total_extracted/total_detected:.1%}")
373+
print(f"Overall success rate: {total_extracted / total_detected:.1%}")
374374

375375

376376
if __name__ == "__main__":

scripts/save_extracted_csvs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def save_dataframes_as_csv():
6969
# Convert to Excel-style range
7070
start_col_letter = chr(ord("A") + start_col)
7171
end_col_letter = chr(ord("A") + end_col)
72-
range_str = f"{start_col_letter}{start_row+1}_{end_col_letter}{end_row+1}"
72+
range_str = f"{start_col_letter}{start_row + 1}_{end_col_letter}{end_row + 1}"
7373

7474
quality_score = table.get("quality_score", 0)
7575
csv_filename = f"{file_name}_{sheet_name}_{range_str}_q{quality_score:.2f}.csv"

scripts/testing/run_tests_with_capture.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,10 @@ async def run_performance_benchmarks(self):
250250
elapsed = time.time() - start
251251
times.append(elapsed)
252252

253-
print(f" Run {i+1}: {elapsed:.3f}s")
253+
print(f" Run {i + 1}: {elapsed:.3f}s")
254254

255255
except Exception as e:
256-
print(f" Run {i+1}: Failed - {e}")
256+
print(f" Run {i + 1}: Failed - {e}")
257257

258258
if times:
259259
avg_time = sum(times) / len(times)

0 commit comments

Comments
 (0)