Skip to content
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

Initial Development #1

Merged
merged 62 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
35bb733
Initial development
EmilyMatt May 19, 2024
1005d12
Add licensing, delete main rs
EmilyMatt May 19, 2024
bb036a5
More work done
EmilyMatt May 20, 2024
aca71cf
Sync is mostly working now, some call procedures are failing
EmilyMatt May 21, 2024
c29dcea
some more pub fields
EmilyMatt May 21, 2024
c2ac93d
Expanded error handling and parsing
EmilyMatt May 22, 2024
5d4ed38
Update visibilities, begin impl asynchronous
EmilyMatt May 22, 2024
64f65f2
naive async works
EmilyMatt May 22, 2024
69d818e
Documented all public functions
EmilyMatt May 22, 2024
a472f0b
Docs, fixes, github actions, clippy
EmilyMatt May 23, 2024
d820f02
update deny and libc yanked crate
EmilyMatt May 23, 2024
dfa1069
It workssss finally
EmilyMatt May 23, 2024
36fa261
Current tests
EmilyMatt May 23, 2024
297cf71
Work towards indices
EmilyMatt May 26, 2024
43df208
Fixed tests
EmilyMatt May 26, 2024
a972d41
merge uses
EmilyMatt May 26, 2024
2085f10
Start working on async
EmilyMatt May 26, 2024
3fa48e6
Matched the blocking API
EmilyMatt May 27, 2024
828cda1
Weird things in async
EmilyMatt May 27, 2024
9265d71
clippy and fixes
EmilyMatt May 27, 2024
92052c8
separate tokio
EmilyMatt May 27, 2024
701386c
Sync part is better and simpler now
EmilyMatt May 27, 2024
d77c744
Fixed docs
EmilyMatt May 27, 2024
1f87290
Fully sync safe
EmilyMatt May 28, 2024
bbb682f
Sync versions are much cleaner now
EmilyMatt May 28, 2024
cdbcc96
Work towards async
EmilyMatt May 28, 2024
30e9d75
Ensure passing checks
EmilyMatt May 28, 2024
907993f
Add readme
EmilyMatt May 28, 2024
b6fd292
Add readme
EmilyMatt May 28, 2024
f0ba829
tiny improvement
EmilyMatt May 28, 2024
f10ea03
Cleaner sync, but with regression on async
EmilyMatt May 28, 2024
49f83b5
Cleaner sync but async is in bad shape tbh
EmilyMatt May 28, 2024
8a07cb7
Add falkor container for tests
EmilyMatt May 28, 2024
fac3a4c
Try local path
EmilyMatt May 28, 2024
9923657
Use prebuilt deny
EmilyMatt May 28, 2024
621fff1
Cargo deny
EmilyMatt May 28, 2024
cb1ef4f
Removed volumes
EmilyMatt May 28, 2024
6a7f87e
Docs finished, reverted to original schema logic
EmilyMatt May 29, 2024
b68f846
No async
EmilyMatt May 29, 2024
ded8220
Execution plan
EmilyMatt May 29, 2024
e356b47
Add sentinel support, rename to execute command, fix url parsing bug
EmilyMatt May 30, 2024
3ceffff
Try setting up tests again
EmilyMatt Jun 4, 2024
5d23331
Much cleaner parsing, new test suite
EmilyMatt Jun 4, 2024
e7cdc42
Test, deny should work now
EmilyMatt Jun 4, 2024
218d520
Crates io stages
EmilyMatt Jun 4, 2024
cddc83d
Move conn into graph schema as well, much nicer now
EmilyMatt Jun 4, 2024
8e40bd2
Remove anyhow
EmilyMatt Jun 4, 2024
ac97fd4
Remove unused exts
EmilyMatt Jun 4, 2024
cffbea0
Support refreshing connection pool on connection errors
EmilyMatt Jun 4, 2024
23b888d
Working nicely with strum
EmilyMatt Jun 5, 2024
0edc166
Allow sentinel tls
EmilyMatt Jun 5, 2024
fbb431d
Convert tx to RwLock for better reponse
EmilyMatt Jun 5, 2024
ede07c9
Various clippy, coderabbit suggestions
EmilyMatt Jun 5, 2024
c17c3da
typo
EmilyMatt Jun 5, 2024
1850044
More various fixes
EmilyMatt Jun 5, 2024
1d63b55
Couple more tests
EmilyMatt Jun 5, 2024
a60b6c2
More tests
EmilyMatt Jun 5, 2024
8e8a903
Ignore warnings for None variant
EmilyMatt Jun 5, 2024
d9959a1
More tests
EmilyMatt Jun 5, 2024
07d9b80
More tests
EmilyMatt Jun 5, 2024
3ccc462
More tests, better parse function
EmilyMatt Jun 5, 2024
cbc796a
more tests
EmilyMatt Jun 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
# This is mostly for actions/checkout
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "main"

# This is actually for cargo crates
- package-ecosystem: cargo
directory: "/"
schedule:
interval: "weekly"
target-branch: "main"
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Linux Build + Tests

on:
push:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
- uses: taiki-e/install-action@nextest
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a virtual environment for Python dependencies to avoid potential conflicts with system packages.


Tip

Codebase Verification

The populate_graph.py script does not contain any explicit error handling mechanisms such as try-except blocks or logging. This could lead to the build failing unexpectedly if any errors occur during its execution.

  • Consider adding try-except blocks around critical sections of the code, such as file operations and database interactions.
  • Implement logging to capture and report errors for easier debugging.
Analysis chain

Ensure that the populate_graph.py script handles errors gracefully to prevent the build from failing unexpectedly.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Check error handling in populate_graph.py script.
cat ./resources/populate_graph.py | grep -i "try"

Length of output: 49



Script:

#!/bin/bash
# Description: Check for error handling mechanisms in populate_graph.py script.
grep -Ei "try|except|raise|logging" ./resources/populate_graph.py

Length of output: 67



Script:

#!/bin/bash
# Description: Display the entire content of populate_graph.py script for review.
cat ./resources/populate_graph.py

Length of output: 1924

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using a virtual environment for Python dependencies to avoid potential conflicts with system packages.


Tip

Codebase Verification

The populate_graph.py script does not contain any explicit error handling mechanisms such as try-except blocks or logging. This could lead to the build failing unexpectedly if any errors occur during its execution.

  • Consider adding try-except blocks around critical sections of the code, such as file operations and database interactions.
  • Implement logging to capture and report errors for easier debugging.
Analysis chain

Ensure that the populate_graph.py script handles errors gracefully to prevent the build from failing unexpectedly.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Check error handling in populate_graph.py script.
cat ./resources/populate_graph.py | grep -i "try"

Length of output: 49



Script:

#!/bin/bash
# Description: Check for error handling mechanisms in populate_graph.py script.
grep -Ei "try|except|raise|logging" ./resources/populate_graph.py

Length of output: 67



Script:

#!/bin/bash
# Description: Display the entire content of populate_graph.py script for review.
cat ./resources/populate_graph.py

Length of output: 1924

- name: Test
run: cargo nextest run --all
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379
31 changes: 31 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Code Coverage

on:
push:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
coverage:
runs-on: linux-latest
steps:
- uses: actions/checkout@v4
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
- uses: taiki-e/install-action@cargo-llvm-cov
- uses: taiki-e/install-action@nextest
- name: Generate Code Coverage
run: cargo llvm-cov nextest --all --codecov --output-path codecov.json
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
fail_ci_if_error: true
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379
16 changes: 16 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Documentation

on:
push:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Doc
run: cargo doc --all
53 changes: 53 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Mandatory Pull Request Checks

on:
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
check-clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Clippy
run: cargo clippy --all

check-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

check-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Doc
run: cargo doc --all

check-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Rustfmt
run: cargo fmt --all --check

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
- uses: taiki-e/install-action@nextest
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
- name: Test
run: cargo nextest run --all
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Publish on crates.io

on:
push:
tags: [ '*' ]

env:
CARGO_TERM_COLOR: always

jobs:
# Ensure formatting
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Rustfmt
run: cargo fmt --all --check

# Make sure no unwanted licenses or yanked crates have slipped in
deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v1

# Make sure the release's build works
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build
- uses: taiki-e/install-action@nextest
- name: Populate test graph
run: pip install falkordb && ./resources/populate_graph.py
- name: Test
run: cargo nextest run --all
services:
falkordb:
image: falkordb/falkordb:edge
ports:
- 6379:6379

# Ensure no clippy warnings
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check Clippy
run: cargo clippy --all

# Make sure the release's docs are full
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Doc
run: cargo doc --all

# Actually publish to crates.io
crates-io:
needs:
- fmt
- deny
- build
- clippy
- doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Cargo Release
run: cargo install cargo-release
- name: Login
run: cargo login ${{ secrets.CRATES_IO_API_TOKEN }}
- name: Publish
run: |-
cargo release \
publish \
--all-features \
--allow-branch HEAD \
--no-confirm \
--no-verify \
--execute
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
target/
/target
.idea/
.vscode/
.vs/
/codecov.json
/dump.rdb
Loading