From 2293f5c907821c450e079873b5ed0aa5d83ab80d Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:18:03 +0000 Subject: [PATCH 01/12] Update sweepai/utils/utils.py --- sweepai/utils/utils.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/sweepai/utils/utils.py b/sweepai/utils/utils.py index 026c9a1b2d..cca23bf0ba 100644 --- a/sweepai/utils/utils.py +++ b/sweepai/utils/utils.py @@ -215,6 +215,24 @@ def __enter__(self): @method() def chunk( + self, + file_content: Union[str, List[str]], + file_path: str, + score: float = 1.0, + additional_metadata: dict[str, str] = {}, + max_chunk_size: int = 512 * 3, + chunk_size: int = 30, + overlap: int = 15 + ) -> tuple[list[str], list[dict[str, str]]]: + if isinstance(file_content, list): + results = [] + for content in file_content: + result = self._chunk_single(content, file_path, score, additional_metadata, max_chunk_size, chunk_size, overlap) + results.append(result) + return results + else: + return self._chunk_single(file_content, file_path, score, additional_metadata, max_chunk_size, chunk_size, overlap) + def _chunk_single( self, file_content: str, file_path: str, From 4fb7dcdfa1c1535253bee9d957ba237a19fcb84b Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:17:23 +0000 Subject: [PATCH 02/12] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 08222cf28f..8a503e94bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,7 @@ Homepage = "https://sweep.dev" [tool.poetry.dependencies] python = "^3.10" -PyGithub = "1.58.2" +PyGithub = "1.59.0" loguru = "^0.6.0" requests = "^2.28.2" urllib3 = "<2.0.0" From 0d4a69bec16d3cdf0256fbbd04c23efb2704a53d Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:22:03 +0000 Subject: [PATCH 03/12] sweep: Create GitHub Actions workflow for Poetry installa --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..5072db8c20 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: Python Poetry CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: 3.10 + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + - name: Install dependencies + run: | + poetry install \ No newline at end of file From 77157aec9404c715f5f9a71fc1c9b73da6d7a46e Mon Sep 17 00:00:00 2001 From: Kevin Lu Date: Thu, 3 Aug 2023 15:47:04 -0700 Subject: [PATCH 04/12] Delete ci.yml --- .github/workflows/ci.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 5072db8c20..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Python Poetry CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.10 - uses: actions/setup-python@v2 - with: - python-version: 3.10 - - name: Install Poetry - run: | - curl -sSL https://install.python-poetry.org | python3 - - - name: Install dependencies - run: | - poetry install \ No newline at end of file From aa3aa3a1254129063edeac0d312c3ed5542a9760 Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:47:07 +0000 Subject: [PATCH 05/12] Revert file to previous commit From bbee7ecd61357962a7d015765e384d104ccd2768 Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:49:30 +0000 Subject: [PATCH 06/12] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8a503e94bd..c40993b150 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,8 +15,8 @@ Homepage = "https://sweep.dev" "Bug Tracker" = "https://github.com/sweepai/sweep/issues" [tool.poetry.dependencies] -python = "^3.10" -PyGithub = "1.59.0" +python = "^3.11" # or another compatible version +PyGithub = "1.60.0" # or another compatible version loguru = "^0.6.0" requests = "^2.28.2" urllib3 = "<2.0.0" From 35e10bebdce1e31a48a10736507d2274c27e54e4 Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 22:51:59 +0000 Subject: [PATCH 07/12] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c40993b150..6046226c8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,8 +15,8 @@ Homepage = "https://sweep.dev" "Bug Tracker" = "https://github.com/sweepai/sweep/issues" [tool.poetry.dependencies] -python = "^3.11" # or another compatible version -PyGithub = "1.60.0" # or another compatible version +python = "^3.10" # or another compatible version +PyGithub = "1.58.2" # or another compatible version loguru = "^0.6.0" requests = "^2.28.2" urllib3 = "<2.0.0" From cc3b4476dbb0adb0570c7e68c5e90d61055f7b84 Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:26:55 +0000 Subject: [PATCH 08/12] Update pyproject.toml --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6046226c8e..6974dcbabe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,8 +16,8 @@ Homepage = "https://sweep.dev" [tool.poetry.dependencies] python = "^3.10" # or another compatible version -PyGithub = "1.58.2" # or another compatible version -loguru = "^0.6.0" +PyGithub = "1.58.3" # or another compatible version +loguru = "^0.6.1" requests = "^2.28.2" urllib3 = "<2.0.0" gradio = "^3.35.2" From 3283b1819288b4f917bec170245bff60feda2e1c Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:48:39 +0000 Subject: [PATCH 09/12] Revert file to previous commit --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6974dcbabe..08222cf28f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,9 +15,9 @@ Homepage = "https://sweep.dev" "Bug Tracker" = "https://github.com/sweepai/sweep/issues" [tool.poetry.dependencies] -python = "^3.10" # or another compatible version -PyGithub = "1.58.3" # or another compatible version -loguru = "^0.6.1" +python = "^3.10" +PyGithub = "1.58.2" +loguru = "^0.6.0" requests = "^2.28.2" urllib3 = "<2.0.0" gradio = "^3.35.2" From 165a78dff9585c53bfa0caa731819213f777ddb4 Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 23:53:18 +0000 Subject: [PATCH 10/12] sweep: Create .github/workflows/ci.yml --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000..5951a3f593 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.10 + - name: Install Poetry + run: | + curl -sSL https://install.python-poetry.org | python3 - + - name: Install dependencies + run: poetry install \ No newline at end of file From f62fd99a279b44e10f2b3355f127b0e534c24364 Mon Sep 17 00:00:00 2001 From: Kevin Lu Date: Thu, 3 Aug 2023 17:06:00 -0700 Subject: [PATCH 11/12] Delete ci.yml --- .github/workflows/ci.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 5951a3f593..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.10 - - name: Install Poetry - run: | - curl -sSL https://install.python-poetry.org | python3 - - - name: Install dependencies - run: poetry install \ No newline at end of file From 672c4a65ce734ce134fbfcbb2fe45a9579e3bcc2 Mon Sep 17 00:00:00 2001 From: "sweep-nightly[bot]" <131841235+sweep-nightly[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 00:07:45 +0000 Subject: [PATCH 12/12] Update sweepai/utils/utils.py --- sweepai/utils/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sweepai/utils/utils.py b/sweepai/utils/utils.py index cca23bf0ba..b216e1ac38 100644 --- a/sweepai/utils/utils.py +++ b/sweepai/utils/utils.py @@ -216,7 +216,7 @@ def __enter__(self): @method() def chunk( self, - file_content: Union[str, List[str]], + file_content: str | list[str], file_path: str, score: float = 1.0, additional_metadata: dict[str, str] = {},