Skip to content

Conversation

@tbhb
Copy link
Contributor

@tbhb tbhb commented Dec 28, 2025

Summary

  • Complete Python reference implementation of the JSONLT specification
  • Table API with CRUD operations, transactions, and compaction
  • Comprehensive unit test suite

Test plan

  • CI passes (lint, type check, tests)
  • Coverage meets threshold

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 28, 2025

CodSpeed Performance Report

Merging #4 will degrade performance by 29.93%

Comparing initial-implementation (3ed046f) with main (4b29f51)

Summary

❌ 1 (👁 1) regression

Benchmarks breakdown

Benchmark BASE HEAD Efficiency
👁 test_import_time 1.2 ms 1.7 ms -29.93%

@tbhb tbhb force-pushed the initial-implementation branch from 5804599 to 54451ab Compare December 28, 2025 04:49
@codecov
Copy link

codecov bot commented Dec 28, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@tbhb tbhb force-pushed the initial-implementation branch 2 times, most recently from 65393ef to 96af110 Compare December 28, 2025 05:05
@tbhb tbhb force-pushed the initial-implementation branch from 96af110 to 4fc3049 Compare December 28, 2025 05:14
tbhb added 6 commits December 28, 2025 00:21
On Windows, LockFileEx prevents renaming to a locked file.
Move atomic_replace calls outside lock contexts in clear() and
compact() methods. Simplify file creation cases since atomic_replace
handles races via temp file pattern.
Windows doesn't support opening directories with os.open(). Skip the
directory fsync step on Windows since NTFS handles atomic renames
differently. Also fix test_repr to use path.name to avoid Windows
path separator differences in assertions.
Same fix as table repr test - use path.name to avoid Windows
path separator differences between str(path) and repr(path).
The greenlet dependency can't be built on Windows with free-threaded
Python 3.14t. Mutation testing with cosmic-ray is only run on Linux
anyway.
Regenerate lockfile after adding sys_platform != 'win32' constraint
to cosmic-ray. This removes Windows-specific wheels for cosmic-ray's
transitive dependencies.
Refactor Table class to use FileSystem protocol for better testability:
- Add _filesystem.py with FileSystem protocol and RealFileSystem implementation
- Inject FileSystem dependency into Table via _fs parameter
- Create FakeFileSystem test double for edge case testing

Add comprehensive tests for previously uncovered code paths:
- Surrogate pair validation in encoding
- append_lines function in writer module
- Header serialization edge cases
- Transaction repr and edge cases
- Table filesystem error handling paths

Mark legitimately untestable code with pragma comments:
- Protocol method stubs (abstract definitions)
- Defensive unreachable code paths
- Windows-specific lock implementation
@tbhb tbhb merged commit f7fc709 into main Dec 28, 2025
23 of 24 checks passed
@tbhb tbhb deleted the initial-implementation branch December 28, 2025 18:25
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