Skip to content

Commit 0d1c199

Browse files
authored
Merge branch 'main' into dependabot/pip/staging/tree-sitter-python-0.23.4
2 parents f611da6 + d021576 commit 0d1c199

34 files changed

+169
-43
lines changed

.github/workflows/pylint.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/python-app.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
# stop the build if there are Python syntax errors or undefined names
3434
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3535
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
36-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37-
- name: Test with pytest
38-
run: |
39-
pytest
36+
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
37+
38+
# - name: Test with pytest
39+
# run: |
40+
# pytest

.gitignore

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,44 @@
1+
# Byte-compiled files
2+
*.pyc
3+
*.pyo
4+
*.pyd
5+
__pycache__/
6+
7+
# Virtual environments
8+
venv/
9+
env/
10+
.virtualenv/
11+
12+
# Distribution/build files
13+
build/
14+
dist/
15+
*.egg-info/
16+
.eggs/
17+
18+
# IDE settings
19+
.vscode/
20+
.idea/
21+
*.swp
22+
23+
# Logs and debugging
24+
*.log
25+
*.trace
26+
27+
# OS-specific files
28+
.DS_Store
29+
Thumbs.db
30+
31+
# Testing and coverage
32+
htmlcov/
33+
*.cover
34+
.coverage
35+
.cache/
36+
pytest_cache/
37+
38+
# Jupyter Notebook checkpoints
39+
.ipynb_checkpoints/
40+
41+
# Custom settings
142
.env
43+
*.sqlite3
244
.vercel

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 FalkorDB
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,48 @@
1-
```bash
2-
flask --app code_graph run --debug
3-
```
1+
[![Try Free](https://img.shields.io/badge/Try%20Free-FalkorDB%20Cloud-FF8101?labelColor=FDE900&link=https://app.falkordb.cloud)](https://app.falkordb.cloud)
2+
[![Dockerhub](https://img.shields.io/docker/pulls/falkordb/falkordb?label=Docker)](https://hub.docker.com/r/falkordb/falkordb/)
3+
[![Discord](https://img.shields.io/discord/1146782921294884966?style=flat-square)](https://discord.com/invite/6M4QwDXn2w)
4+
5+
## Getting Started
6+
[Live Demo](https://code-graph.falkordb.com/)
7+
8+
## Running locally
49

5-
Process local git repository, ignoring specific folder(s)
10+
### Run FalkorDB
11+
Free cloud instance: https://app.falkordb.cloud/signup
612

13+
Or by running locally with docker:
714
```bash
8-
curl -X POST http://127.0.0.1:5000/process_local_repo -H "Content-Type: application/json" -d '{"repo": "/Users/roilipman/Dev/FalkorDB", "ignore": ["./.github", "./sbin", "./.git","./deps", "./bin", "./build"]}'
15+
docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest
916
```
1017

11-
Process code coverage
18+
### Config
19+
Create your own `.env` file from the `.env.template` file
1220

21+
Start the server:
1322
```bash
14-
curl -X POST http://127.0.0.1:5000/process_code_coverage -H "Content-Type: application/json" -d '{"lcov": "/Users/roilipman/Dev/code_graph/code_graph/code_coverage/lcov/falkordb.lcov", "repo": "FalkorDB"}'
23+
flask --app api/index.py run --debug
1524
```
1625

17-
Process git information
26+
### Creating a graph
27+
Process a local source folder:
28+
```bash
29+
curl -X POST http://127.0.0.1:5000/analyze_folder -H "Content-Type: application/json" -d '{"path": "<FULL_PATH_TO_FOLDER>", "ignore": [<OPTIONAL_IGNORE_LIST>]}' -H "Authorization: <.ENV_SECRET_TOKEN>"
30+
```
1831

32+
For example:
1933
```bash
20-
curl -X POST http://127.0.0.1:5000/process_git_history -H "Content-Type: application/json" -d '{"repo": "/Users/roilipman/Dev/falkorDB"}'
34+
curl -X POST http://127.0.0.1:5000/analyze_folder -H "Content-Type: application/json" -d '{"path": "/Users/roilipman/Dev/GraphRAG-SDK", "ignore": ["./.github", "./build"]}' -H "Authorization: OpenSesame"
2135
```
36+
## Working with your graph
37+
Once the source code analysis completes your FalkorDB DB will be populated with
38+
a graph representation of your source code, the graph name should be the same as
39+
the name of the folder you've requested to analyze, for the example above a graph named:
40+
"GraphRAG-SDK".
41+
42+
At the moment only the Python and C languages are supported, we do intend to support additional languages.
43+
44+
At this point you can explore and query your source code using various tools
45+
Here are several options:
46+
1. FalkorDB built-in UI
47+
2. One of FalkorDB's [clients](https://docs.falkordb.com/clients.html)
48+
3. Use FalkorDB [GraphRAG-SDK](https://github.com/FalkorDB/GraphRAG-SDK) to connect an LLM for natural language exploration.
-456 Bytes
Binary file not shown.

api/__pycache__/app.cpython-312.pyc

-16.5 KB
Binary file not shown.
-458 Bytes
Binary file not shown.

api/__pycache__/graph.cpython-312.pyc

-30.9 KB
Binary file not shown.

api/__pycache__/info.cpython-312.pyc

-4.61 KB
Binary file not shown.

0 commit comments

Comments
 (0)