Skip to content

Conversation

@tbhb
Copy link
Contributor

@tbhb tbhb commented Jan 2, 2026

Summary

  • Add Table.from_records(path, records, key) for creating tables with initial data
  • Add Table.from_file(path) for loading existing files with automatic key detection
  • Update README quick start and examples to use the new factory methods

Test plan

  • Unit tests for both factory methods (30 tests)
  • Type checking passes
  • Linting passes

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 2, 2026

CodSpeed Performance Report

Merging #14 will not alter performance

Comparing factory (f284789) with main (46d2228)

Summary

✅ 173 untouched
⏩ 1 skipped1

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Add two factory classmethods to Table for convenient initialization:

- Table.from_records(path, records, key): Create a table with initial
  records. Validates all records before writing, writes atomically with
  a header, and provides indexed error messages for debugging.

- Table.from_file(path, key=None): Load an existing file with automatic
  key detection from the header. Raises FileError if file doesn't exist.

Update README quick start and examples to use the new factory methods.
@tbhb tbhb merged commit 8c044a7 into main Jan 2, 2026
29 checks passed
@tbhb tbhb deleted the factory branch January 2, 2026 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants