Skip to content
This repository was archived by the owner on Aug 13, 2024. It is now read-only.

Commit 853304c

Browse files
committed
Rename cil to code-indexer-loop
1 parent 6bb55ac commit 853304c

File tree

11 files changed

+25
-22
lines changed

11 files changed

+25
-22
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
all: clean build publish
22

33
build:
4-
python setup.py sdist bdist_wheel
4+
flit build
55

66
clean:
7-
rm -rf build dist my_project.egg-info
7+
rm -rf dist
8+
rm -rf build
89

910
publish: build
10-
twine upload dist/*
11+
flit publish
1112

12-
.PHONY: build clean publish all
13+
.PHONY: build clean publish all

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# CIL: Code Indexer Loop
1+
# Code Indexer Loop
22

3-
[![PyPI version](https://badge.fury.io/py/cil.svg)](https://pypi.org/project/cil/)
4-
[![License](https://img.shields.io/github/license/definitive-io/cil)](LICENSE)
5-
[![Forks](https://img.shields.io/github/forks/definitive-io/cil)](https://github.com/definitive-io/cil/network)
6-
[![Stars](https://img.shields.io/github/stars/definitive-io/cil)](https://github.com/definitive-io/cil/stargazers)
3+
[![PyPI version](https://badge.fury.io/py/code-indexer-loop.svg)](https://pypi.org/project/code-indexer-loop/)
4+
[![License](https://img.shields.io/github/license/definitive-io/code-indexer-loop)](LICENSE)
5+
[![Forks](https://img.shields.io/github/forks/definitive-io/code-indexer-loop)](https://github.com/definitive-io/code-indexer-loop/network)
6+
[![Stars](https://img.shields.io/github/stars/definitive-io/code-indexer-loop)](https://github.com/definitive-io/code-indexer-loop/stargazers)
77
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com?style=social&label=Follow%20%40DefinitiveIO)](https://twitter.com/definitiveio)
88
[![Discord](https://dcbadge.vercel.app/api/server/CPJJfq87Vx?compact=true&style=flat)](https://discord.gg/CPJJfq87Vx)
99

1010

11-
**CIL** is a Python library designed to index and retrieve code snippets.
11+
**Code Indexer Loop** is a Python library designed to index and retrieve code snippets.
1212

1313
It uses the useful indexing utilities of the **LlamaIndex** library and the multi-language **tree-sitter** library to parse the code from many popular programming languages. **tiktoken** is used to count tokens in a code snippet and **LangChain** to obtain embeddings (defaults to **OpenAI**'s `text-embedding-ada-002`) and store them in an embedded **ChromaDB** vector database. It uses **watchdog** for continuous updating of the index based on file system events.
1414

1515
## Installation:
1616
Use `pip` to install Code Indexer Loop from PyPI.
1717
```
18-
pip install cil
18+
pip install code_indexer_loop
1919
```
2020

2121
## Usage:
2222
1. Import necessary modules:
2323
```python
24-
from cil.api import CodeIndexer
24+
from code_indexer_loop.api import CodeIndexer
2525
```
2626
2. Create a CodeIndexer object and have it watch for changes:
2727
```python
@@ -76,4 +76,4 @@ Run the unit tests by invoking `pytest` in the root.
7676
Please see the LICENSE file provided with the source code.
7777

7878
## Attribution
79-
We'd like to thank the Sweep AI for publishing their ideas about code chunking. Read their blog posts about the topic [here](https://docs.sweep.dev/blogs/chunking-2m-files) and [here](https://docs.sweep.dev/blogs/chunking-improvements). The implementation in `cil` is modified from their original implementation mainly to limit based on tokens instead of characters and to achieve perfect document reconstruction (`"".join(chunks) == original_source_code`).
79+
We'd like to thank the Sweep AI for publishing their ideas about code chunking. Read their blog posts about the topic [here](https://docs.sweep.dev/blogs/chunking-2m-files) and [here](https://docs.sweep.dev/blogs/chunking-improvements). The implementation in `code_indexer_loop` is modified from their original implementation mainly to limit based on tokens instead of characters and to achieve perfect document reconstruction (`"".join(chunks) == original_source_code`).
File renamed without changes.

cil/api.py renamed to code_indexer_loop/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
from watchdog.events import FileSystemEventHandler
1212
from watchdog.observers import Observer
1313

14-
from cil.code_splitter import CodeSplitter
15-
from cil.constants import EXTENSION_TO_TREE_SITTER_LANGUAGE
16-
from cil.utils import hash_md5
14+
from code_indexer_loop.code_splitter import CodeSplitter
15+
from code_indexer_loop.constants import EXTENSION_TO_TREE_SITTER_LANGUAGE
16+
from code_indexer_loop.utils import hash_md5
1717

1818

1919
class CodeIndexer:
File renamed without changes.
File renamed without changes.

cil/test_api.py renamed to code_indexer_loop/test_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from cil.code_splitter import (CodeSplitter, MaxChunkLengthExceededError,
5+
from code_indexer_loop.code_splitter import (CodeSplitter, MaxChunkLengthExceededError,
66
TokenCounter)
77

88
THIS_FILE_DIR = os.path.dirname(os.path.realpath(__file__))
File renamed without changes.

pyproject.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
[build-system]
2+
build-backend = "flit_core.buildapi"
3+
requires = ["flit_core >=3.8.0,<4"]
4+
15
[project]
2-
name = "cil"
3-
description = "CIL: Code Indexer Loop"
6+
name = "code-indexer-loop"
7+
description = "Code Indexer Loop"
48
authors = [
59
{name = "Rick Lamers", email = "rick@definitive.io"}
610
]
@@ -27,9 +31,7 @@ dev = [
2731
"autoflake ~=2.2.0",
2832
"ruff ~=0.0.284",
2933
"pytest ~=7.4.1",
30-
"twine ~=4.0.2",
31-
"setuptools",
32-
"wheel",
34+
"flit >=3.8.0,<4",
3335
]
3436
test = [
3537
"pytest-cov ~=3.0.0",

0 commit comments

Comments
 (0)