-
Notifications
You must be signed in to change notification settings - Fork 0
feat: support streaming processing of binary search tree #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
19a0391
wip: cause integer overflow error in packedrtree
HideBa e5d590f
feat: add coding guidelines for TypeScript and JavaScript, including …
HideBa b49e72e
add d1 spec
HideBa 28f9ba0
docs: fix docs about attribute indexing
HideBa 141e746
fix docs about attribute indexing over http
HideBa cf87458
update specs
HideBa 227c84a
add diagram
HideBa a6257e0
docs: update productContext
HideBa 7fc8ff7
update product context
HideBa 212b1d1
update progress
HideBa 888e41c
update docs
HideBa 01cccb8
Merge branch 'main' into massive-dataset
HideBa 6ef72fa
update docs
HideBa 7ab67f6
update docs
HideBa 2884e37
calc geographical extent as option
HideBa ee03857
fix cli
HideBa b7730f7
wip: impl stream attr index
HideBa 6a4d18f
wip: impl stream search for bst
HideBa f7147fc
wip: add http stream search
HideBa 8129c1a
add stream search over the web on sorted index
HideBa f9622fd
http stream search
HideBa 9d7dca8
wip: add test case for single condition query
HideBa 709c4c2
update rule
HideBa de688a3
add tdd guide
HideBa 1422f37
update docs
HideBa c00a108
remove rtree deps from bst
HideBa 57ef38f
wip: test cases for multi steam index
HideBa 7e9bcac
fix regression on normal query
HideBa 135c9ae
fix range query
HideBa 34394df
simplify query conditions
HideBa c9a72ad
add value type func on byteserializable trait
HideBa 4d3e0a5
refactor any index trait
HideBa 38daa2d
remove http for now
HideBa d3844d0
simplify cmp
HideBa 31d5162
remove http test
HideBa 07f20a6
fix com for float
HideBa 8e36493
clean up
HideBa 9fe4c93
fix `from_reader`
HideBa ef868df
fix test for stream query
HideBa 4c02da5
remove unsed print
HideBa 74097a1
add readme of bst
HideBa d525340
refactor to_byte in attr_query
HideBa 6c35fc8
pass stream query test but wip for date time
HideBa 942abcf
impl and pass all test for stream query (still need to clean up and r…
HideBa 37547fc
comment out wasm
HideBa 23a5df9
benchmark
HideBa 94d1f4f
remove print output
HideBa ffc6ef1
docs: update readme of bst
HideBa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
# Test-Driven Development (TDD) Basics in Rust | ||
|
||
## Core Concepts | ||
|
||
Test-Driven Development (TDD) follows this development cycle: | ||
|
||
1. **Red**: Write a failing test first. | ||
2. **Green**: Implement the minimum necessary code to pass the test. | ||
3. **Refactor**: Improve the code while ensuring tests still pass. | ||
|
||
## Key Principles | ||
|
||
- **Tests define the specification**: Test code expresses the expected behavior of the implementation. | ||
- **Follow the Arrange-Act-Assert pattern**: | ||
1. **Arrange**: Set up the necessary test environment. | ||
2. **Act**: Execute the functionality under test. | ||
3. **Assert**: Verify the expected result. | ||
- **Test names should follow a "Condition → Action → Expected Result" format**. Example: | ||
- `"Given a valid token, retrieving user information should succeed"` | ||
|
||
## Essential Tools for the Refactoring Phase | ||
|
||
Once tests pass, use the following tools to refine your code: | ||
|
||
### 1. **Static Analysis & Linting** | ||
- Run `cargo check` for type checking and borrow checking. | ||
- Use `cargo clippy` to detect potential issues and enforce best practices. | ||
|
||
### 2. **Dead Code Detection & Removal** | ||
- Run `cargo deadlinks` to check for dead documentation links. | ||
- Use `cargo udeps` to find unused dependencies. | ||
- Run `cargo rustc -- -W dead_code` to detect unused functions. | ||
|
||
### 3. **Code Coverage Analysis** | ||
- Install `cargo-tarpaulin` for test coverage measurement: | ||
```bash | ||
cargo install cargo-tarpaulin | ||
cargo tarpaulin --out html | ||
``` | ||
- Open the generated HTML report to review coverage. | ||
|
||
### 4. **Version Control with Git** | ||
- Commit after each phase (test creation → implementation → refactoring). | ||
- Review changes before committing: | ||
```bash | ||
git status # Check modified files | ||
git add <relevant files> | ||
git commit -m "<appropriate commit message>" | ||
``` | ||
- Use commit prefixes for clarity: | ||
- `test:` - Adding or modifying tests | ||
- `feat:` - Implementing new features | ||
- `refactor:` - Code refactoring | ||
|
||
## Further Reading | ||
|
||
For more details on TDD practices in Rust, naming conventions for tests, and best practices for refactoring, refer to: | ||
|
||
``` | ||
.docs/tdd-rust-guidelines.md | ||
``` | ||
|
||
This file includes step-by-step instructions for test-first development, structuring test cases, and leveraging Rust’s testing framework efficiently. |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,3 +64,5 @@ src/rust/fcb_core/tests/data/ | |
.cursorrules | ||
|
||
*.fcb | ||
|
||
.cursor/mcp.json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix Markdown list indentation issues.
The current indentation of unordered lists doesn't follow standard Markdown formatting conventions, which is causing linting errors.
📝 Committable suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
27-27: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
28-28: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
31-31: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
32-32: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
33-33: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
36-36: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
41-41: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
44-44: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
45-45: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
51-51: Unordered list indentation
Expected: 0; Actual: 3
(MD007, ul-indent)
52-52: Unordered list indentation
Expected: 2; Actual: 5
(MD007, ul-indent)
53-53: Unordered list indentation
Expected: 2; Actual: 5
(MD007, ul-indent)
54-54: Unordered list indentation
Expected: 2; Actual: 5
(MD007, ul-indent)