sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.41k stars 421 forks source link

Sweep: Debounce Sweep rules so that multiple rules are not called at the same time #1753

Closed lukejagg closed 1 year ago

lukejagg commented 1 year ago

Details

Modify sweepai/handlers/on_merge.py to debounce Sweep Rules calls in PR merge requests. There should be a function that calls on merge. Modify it there so that there is a delay of at least 30 seconds before calling rules again on the given repo. Create a dictionary that tracks the last time a rule was activated in on_merge. Since on_merge is pretty infrequent, simple define a dictionary in the on_merge class like:

merge_rule_debounce = {}
# Map from github repo to last time rule activated
Checklist - [X] `sweepai/handlers/on_merge.py` ✅ Commit [`353cdf6`](https://github.com/sweepai/sweep/commit/353cdf669c1c307cb83dd56c2622092979a767d8)
1. At the top of the file, after the imports, define a dictionary `merge_rule_debounce = {}`. This dictionary will map from github repo to the last time a rule was activated. 2. Before the line where `get_rules` function is called (line 37), add a check to see if the current repo is in the `merge_rule_debounce` dictionary and if the difference between the current time and the time stored in the dictionary is less than 30 seconds. If it is, return from the function to prevent the rules from being called. You can use the `time` module to get the current time and calculate the difference. The code would look something like this: ```python import time ... if repo in merge_rule_debounce and time.time() - merge_rule_debounce[repo] < 30: return ``` 3. After the `get_rules` function is called (line 37), update the `merge_rule_debounce` dictionary with the current time for the current repo. The code would look something like this: ```python merge_rule_debounce[repo] = time.time() ```
Sandbox Execution Logs
pre-commit install 1/4 ✓
pre-commit installed at .git/hooks/pre-commit
pip install poetry 2/4 ✓
Collecting poetry
  Downloading poetry-1.6.1-py3-none-any.whl (232 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.8/232.8 KB 4.4 MB/s eta 0:00:00
Requirement already satisfied: packaging>=20.4 in /usr/local/lib/python3.10/dist-packages (from poetry) (23.1)
Collecting keyring<25.0.0,>=24.0.0
  Downloading keyring-24.2.0-py3-none-any.whl (37 kB)
Collecting shellingham<2.0,>=1.5
  Downloading shellingham-1.5.3-py2.py3-none-any.whl (9.7 kB)
Collecting cachecontrol[filecache]<0.14.0,>=0.13.0
  Downloading cachecontrol-0.13.1-py3-none-any.whl (22 kB)
Collecting pkginfo<2.0.0,>=1.9.4
  Downloading pkginfo-1.9.6-py3-none-any.whl (30 kB)
Requirement already satisfied: tomli<3.0.0,>=2.0.1 in /usr/local/lib/python3.10/dist-packages (from poetry) (2.0.1)
Collecting requests-toolbelt<2,>=0.9.1
  Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 KB 4.8 MB/s eta 0:00:00
Collecting jsonschema<4.18.0,>=4.10.0
  Downloading jsonschema-4.17.3-py3-none-any.whl (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.4/90.4 KB 23.3 MB/s eta 0:00:00
Collecting build<0.11.0,>=0.10.0
  Downloading build-0.10.0-py3-none-any.whl (17 kB)
Collecting poetry-plugin-export<2.0.0,>=1.5.0
  Downloading poetry_plugin_export-1.5.0-py3-none-any.whl (10 kB)
Collecting cleo<3.0.0,>=2.0.0
  Downloading cleo-2.0.1-py3-none-any.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.3/77.3 KB 9.8 MB/s eta 0:00:00
Collecting crashtest<0.5.0,>=0.4.1
  Downloading crashtest-0.4.1-py3-none-any.whl (7.6 kB)
Collecting pexpect<5.0.0,>=4.7.0
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 KB 14.6 MB/s eta 0:00:00
Collecting trove-classifiers>=2022.5.19
  Downloading trove_classifiers-2023.9.19-py3-none-any.whl (13 kB)
Collecting poetry-core==1.7.0
  Downloading poetry_core-1.7.0-py3-none-any.whl (426 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 426.4/426.4 KB 34.5 MB/s eta 0:00:00
Collecting pyproject-hooks<2.0.0,>=1.0.0
  Downloading pyproject_hooks-1.0.0-py3-none-any.whl (9.3 kB)
Collecting tomlkit<1.0.0,>=0.11.4
  Downloading tomlkit-0.12.1-py3-none-any.whl (37 kB)
Requirement already satisfied: virtualenv<21.0.0,>=20.22.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (20.24.5)
Requirement already satisfied: platformdirs<4.0.0,>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (3.10.0)
Collecting dulwich<0.22.0,>=0.21.2
  Downloading dulwich-0.21.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (512 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 512.2/512.2 KB 62.0 MB/s eta 0:00:00
Collecting requests<3.0,>=2.26
  Downloading requests-2.31.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 KB 13.8 MB/s eta 0:00:00
Collecting installer<0.8.0,>=0.7.0
  Downloading installer-0.7.0-py3-none-any.whl (453 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 453.8/453.8 KB 41.2 MB/s eta 0:00:00
Collecting msgpack>=0.5.2
  Downloading msgpack-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (530 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 530.8/530.8 KB 48.3 MB/s eta 0:00:00
Requirement already satisfied: filelock>=3.8.0 in /usr/local/lib/python3.10/dist-packages (from cachecontrol[filecache]<0.14.0,>=0.13.0->poetry) (3.12.4)
Collecting rapidfuzz<3.0.0,>=2.2.0
  Downloading rapidfuzz-2.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 83.8 MB/s eta 0:00:00
Collecting urllib3>=1.25
  Downloading urllib3-2.0.5-py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.8/123.8 KB 29.9 MB/s eta 0:00:00
Collecting attrs>=17.4.0
  Downloading attrs-23.1.0-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 KB 12.1 MB/s eta 0:00:00
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Downloading pyrsistent-0.19.3-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 KB 13.3 MB/s eta 0:00:00
Collecting jaraco.classes
  Downloading jaraco.classes-3.3.0-py3-none-any.whl (5.9 kB)
Collecting SecretStorage>=3.2
  Downloading SecretStorage-3.3.3-py3-none-any.whl (15 kB)
Collecting jeepney>=0.4.2
  Downloading jeepney-0.8.0-py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.4/48.4 KB 12.5 MB/s eta 0:00:00
Collecting importlib-metadata>=4.11.4
  Downloading importlib_metadata-6.8.0-py3-none-any.whl (22 kB)
Collecting ptyprocess>=0.5
  Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting idna<4,>=2.5
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 KB 16.2 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
  Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 KB 38.4 MB/s eta 0:00:00
Collecting charset-normalizer<4,>=2
  Downloading charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (201 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 201.8/201.8 KB 26.8 MB/s eta 0:00:00
Requirement already satisfied: distlib<1,>=0.3.7 in /usr/local/lib/python3.10/dist-packages (from virtualenv<21.0.0,>=20.22.0->poetry) (0.3.7)
Collecting zipp>=0.5
  Downloading zipp-3.17.0-py3-none-any.whl (7.4 kB)
Collecting cryptography>=2.0
  Downloading cryptography-41.0.4-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 81.8 MB/s eta 0:00:00
Collecting more-itertools
  Downloading more_itertools-10.1.0-py3-none-any.whl (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.8/55.8 KB 8.4 MB/s eta 0:00:00
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.8/441.8 KB 74.9 MB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 KB 33.2 MB/s eta 0:00:00
Installing collected packages: trove-classifiers, ptyprocess, zipp, urllib3, tomlkit, shellingham, rapidfuzz, pyrsistent, pyproject-hooks, pycparser, poetry-core, pkginfo, pexpect, msgpack, more-itertools, jeepney, installer, idna, crashtest, charset-normalizer, certifi, attrs, requests, jsonschema, jaraco.classes, importlib-metadata, dulwich, cleo, cffi, build, requests-toolbelt, cryptography, cachecontrol, SecretStorage, keyring, poetry-plugin-export, poetry
Successfully installed SecretStorage-3.3.3 attrs-23.1.0 build-0.10.0 cachecontrol-0.13.1 certifi-2023.7.22 cffi-1.15.1 charset-normalizer-3.2.0 cleo-2.0.1 crashtest-0.4.1 cryptography-41.0.4 dulwich-0.21.6 idna-3.4 importlib-metadata-6.8.0 installer-0.7.0 jaraco.classes-3.3.0 jeepney-0.8.0 jsonschema-4.17.3 keyring-24.2.0 more-itertools-10.1.0 msgpack-1.0.6 pexpect-4.8.0 pkginfo-1.9.6 poetry-1.6.1 poetry-core-1.7.0 poetry-plugin-export-1.5.0 ptyprocess-0.7.0 pycparser-2.21 pyproject-hooks-1.0.0 pyrsistent-0.19.3 rapidfuzz-2.15.1 requests-2.31.0 requests-toolbelt-1.0.0 shellingham-1.5.3 tomlkit-0.12.1 trove-classifiers-2023.9.19 urllib3-2.0.5 zipp-3.17.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
poetry install 3/4 ✓
Creating virtualenv sweepai-gW_DSdP6-py3.10 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...
Package operations: 293 installs, 1 update, 0 removals
  • Installing attrs (23.1.0)
  • Installing rpds-py (0.10.3)
  • Installing referencing (0.30.2)
  • Installing six (1.16.0)
  • Installing jsonschema-specifications (2023.7.1)
  • Installing platformdirs (3.10.0)
  • Installing python-dateutil (2.8.2)
  • Installing traitlets (5.10.0)
  • Installing arrow (1.2.3)
  • Installing fastjsonschema (2.18.0)
  • Installing jsonschema (4.19.1)
  • Installing jupyter-core (5.3.1)
  • Installing pycparser (2.21)
  • Installing tornado (6.3.3)
  • Installing pyzmq (25.1.1)
  • Installing cffi (1.15.1)
  • Installing fqdn (1.5.1)
  • Installing idna (3.4)
  • Installing isoduration (20.11.0)
  • Installing jsonpointer (2.4)
  • Installing markupsafe (2.1.3)
  • Installing jupyter-client (8.3.1)
  • Installing nbformat (5.9.2)
  • Installing ptyprocess (0.7.0)
  • Installing rfc3339-validator (0.1.4)
  • Installing rfc3986-validator (0.1.1)
  • Installing soupsieve (2.5)
  • Installing uri-template (1.3.0)
  • Installing webcolors (1.13)
  • Installing webencodings (0.5.1)
  • Installing wrapt (1.15.0)
  • Installing zipp (3.17.0)
  • Installing argon2-cffi-bindings (21.2.0)
  • Installing asttokens (2.4.0)
  • Installing beautifulsoup4 (4.12.2)
  • Installing bleach (6.0.0)
  • Installing defusedxml (0.7.1)
  • Installing deprecated (1.2.14)
  • Installing exceptiongroup (1.1.3)
  • Installing executing (1.2.0)
  • Installing importlib-metadata (6.8.0)
  • Installing jinja2 (3.1.2)
  • Installing jmespath (1.0.1)
  • Installing jupyterlab-pygments (0.2.2)
  • Installing mistune (3.0.1)
  • Installing nbclient (0.8.0)
  • Installing packaging (23.1)
  • Installing pandocfilters (1.5.0)
  • Installing parso (0.8.3)
  • Installing protobuf (4.24.3)
  • Installing pure-eval (0.2.2)
  • Installing pygments (2.16.1)
  • Installing python-json-logger (2.0.7)
  • Installing pyyaml (6.0.1)
  • Installing sniffio (1.3.0)
  • Installing terminado (0.17.1)
  • Installing tinycss2 (1.2.1)
  • Installing urllib3 (1.26.16)
  • Installing wcwidth (0.2.6)
  • Installing anyio (3.7.1)
  • Installing argon2-cffi (23.1.0)
  • Installing backcall (0.2.0)
  • Installing botocore (1.31.17)
  • Installing certifi (2023.7.22)
  • Installing charset-normalizer (3.2.0)
  • Installing decorator (5.1.1)
  • Installing frozenlist (1.4.0)
  • Installing jedi (0.19.0)
  • Installing jupyter-events (0.7.0)
  • Installing jupyter-server-terminals (0.4.4)
  • Installing matplotlib-inline (0.1.6)
  • Installing multidict (6.0.4)
  • Installing nbconvert (7.8.0)
  • Installing opentelemetry-api (1.19.0)
  • Installing opentelemetry-proto (1.19.0)
  • Installing opentelemetry-semantic-conventions (0.40b0)
  • Installing overrides (7.4.0)
  • Installing pexpect (4.8.0)
  • Installing pickleshare (0.7.5)
  • Installing prometheus-client (0.17.1)
  • Installing prompt-toolkit (3.0.39)
  • Installing send2trash (1.8.2)
  • Installing stack-data (0.6.2)
  • Installing typing-extensions (4.8.0)
  • Installing websocket-client (1.6.3)
  • Installing aiosignal (1.3.1)
  • Installing async-timeout (4.0.3)
  • Installing babel (2.12.1)
  • Installing backoff (2.2.1)
  • Installing comm (0.1.4)
  • Installing debugpy (1.8.0)
  • Installing googleapis-common-protos (1.60.0)
  • Installing grpcio (1.58.0)
  • Installing h11 (0.14.0)
  • Installing hpack (4.0.0)
  • Installing hyperframe (6.0.1)
  • Installing ipython (8.15.0)
  • Installing json5 (0.9.14)
  • Installing jupyter-server (2.7.3)
  • Installing lazy-object-proxy (1.9.0)
  • Installing mdurl (0.1.2)
  • Installing mpmath (1.3.0)
  • Installing mypy-extensions (1.0.0)
  • Installing nest-asyncio (1.5.8)
  • Installing opentelemetry-exporter-otlp-proto-common (1.19.0)
  • Installing opentelemetry-sdk (1.19.0)
  • Installing psutil (5.9.5)
  • Installing requests (2.31.0)
  • Installing s3transfer (0.6.2)
  • Installing yarl (1.9.2)
  • Installing aiohttp (3.8.5)
  • Installing aioitertools (0.11.0)
  • Installing astroid (2.15.6)
  • Installing async-lru (2.0.4)
  • Installing boto3 (1.28.17)
  • Installing click (8.1.7)
  • Installing dill (0.3.7)
  • Installing filelock (3.12.4)
  • Installing fsspec (2023.9.2)
  • Installing greenlet (2.0.1)
  • Installing h2 (4.1.0)
  • Installing httpcore (0.18.0)
  • Installing ipykernel (6.25.2)
  • Installing isort (5.12.0)
  • Installing jupyter-lsp (2.2.0)
  • Installing jupyterlab-server (2.25.0)
  • Installing markdown-it-py (3.0.0)
  • Installing marshmallow (3.20.1)
  • Installing mccabe (0.7.0)
  • Installing networkx (3.1)
  • Installing notebook-shim (0.2.3)
  • Installing numpy (1.25.2)
  • Installing opentelemetry-exporter-otlp-proto-grpc (1.19.0)
  • Installing opentelemetry-exporter-otlp-proto-http (1.19.0)
  • Installing pydantic (1.10.12)
  • Installing pytz (2023.3.post1)
  • Updating setuptools (68.2.0 -> 68.2.2)
  • Installing sigtools (4.0.1)
  • Installing starlette (0.26.1)
  • Installing sympy (1.12)
  • Installing tomli (2.0.1)
  • Installing tomlkit (0.12.1)
  • Installing tqdm (4.66.1)
  • Installing typing-inspect (0.9.0)
  • Installing tzdata (2023.3)
  • Installing vine (5.0.0)
  • Installing aiobotocore (2.6.0)
  • Installing aiostream (0.4.5)
  • Installing amqp (5.1.1)
  • Installing asgiref (3.7.2)
  • Installing cloudpickle (2.0.0)
  • Installing contourpy (1.1.1)
  • Installing cryptography (41.0.4)
  • Installing cycler (0.11.0)
  • Installing dataclasses-json (0.6.0)
  • Installing distlib (0.3.7)
  • Installing entrypoints (0.4)
  • Installing fastapi (0.94.1)
  • Installing fonttools (4.42.1)
  • Installing grpclib (0.4.3)
  • Installing httpx (0.25.0)
  • Installing huggingface-hub (0.17.2)
  • Installing ipython-genutils (0.2.0)
  • Installing joblib (1.3.2)
  • Installing jsonpatch (1.33)
  • Installing jupyterlab (4.0.6)
  • Installing jupyterlab-widgets (3.0.9)
  • Installing kiwisolver (1.4.5)
  • Installing langsmith (0.0.40)
  • Installing multiprocess (0.70.15)
  • Installing numexpr (2.8.6)
  • Installing opentelemetry-exporter-otlp (1.19.0)
  • Installing opentelemetry-instrumentation (0.40b0)
  • Installing pandas (2.1.1)
  • Installing pillow (10.0.1)
  • Installing pox (0.3.3)
  • Installing ppft (1.7.6.7)
  • Installing pylint (2.17.5)
  • Installing pyparsing (3.1.1)
  • Installing qtpy (2.4.0)
  • Installing rapidfuzz (3.3.0)
  • Installing regex (2023.8.8)
  • Installing rich (13.5.3)
  • Installing safetensors (0.3.3)
  • Installing scipy (1.9.3)
  • Installing setuptools-scm (8.0.3)
  • Installing smmap (5.0.1)
  • Installing sqlalchemy (2.0.21)
  • Installing synchronicity (0.5.3)
  • Installing tblib (2.0.0)
  • Installing tenacity (8.2.3)
  • Installing threadpoolctl (3.2.0)
  • Installing tokenizers (0.13.3)
  • Installing toml (0.10.2)
  • Installing toolz (0.12.0)
  • Installing torch (2.0.1)
  • Installing typer (0.9.0)
  • Installing types-certifi (2021.10.8.3)
  • Installing types-toml (0.10.8.7)
  • Installing watchfiles (0.20.0)
  • Installing websockets (11.0.3)
  • Installing widgetsnbextension (4.0.9)
  • Installing aioboto3 (11.3.0)
  • Installing aiofiles (23.2.1)
  • Installing billiard (4.1.0)
  • Installing cfgv (3.4.0)
  • Installing click-didyoumean (0.3.0)
  • Installing altair (5.1.1)
  • Installing click-repl (0.3.0)
  • Installing click-plugins (1.1.1)
  • Installing dnspython (2.4.2)
  • Installing docker (6.1.3)
  • Installing ffmpy (0.3.1)
  • Installing geographiclib (2.0)
  • Installing gitdb (4.0.10)
  • Installing gradio-client (0.5.1)
  • Installing humbug (0.3.2)
  • Installing identify (2.5.29)
  • Installing importlib-resources (6.1.0)
  • Installing ipywidgets (8.1.1)
  • Installing jupyter-console (6.6.3)
  • Installing kombu (5.3.2)
  • Installing langchain (0.0.300)
  • Installing levenshtein (0.21.1)
  • Installing matplotlib (3.8.0)
  • Installing modal (0.51.3360)
  • Installing monotonic (1.6)
  • Installing msgpack (1.0.6)
  • Installing nltk (3.8.1)
  • Installing nodeenv (1.8.0)
  • Installing notebook (7.0.4)
  • Installing numcodecs (0.11.0)
  • Installing openai (0.27.10)
  • Installing opentelemetry-distro (0.40b0)
  • Installing opentelemetry-instrumentation-logging (0.40b0)
  • Installing orjson (3.9.7)
  • Installing pathos (0.3.1)
  • Installing pathspec (0.11.2)
  • Installing pycodestyle (2.11.0)
  • Installing pydub (0.25.1)
  • Installing pyee (9.0.4)
  • Installing pyflakes (3.1.0)
  • Installing pyjwt (2.8.0)
  • Installing pylint-plugin-utils (0.8.2)
  • Installing pynacl (1.5.0)
  • Installing pyproject-hooks (1.0.0)
  • Installing python-multipart (0.0.6)
  • Installing qtconsole (5.4.4)
  • Installing scikit-learn (1.3.1)
  • Installing semantic-version (2.10.0)
  • Installing sentencepiece (0.1.99)
  • Installing tiktoken (0.3.3)
  • Installing torchvision (0.15.2)
  • Installing transformers (4.33.2)
  • Installing tree-sitter (0.20.2)
  • Installing uvicorn (0.21.1)
  • Installing virtualenv (20.24.5)
  • Installing anthropic (0.2.10)
  • Installing black (23.9.1)
  • Installing build (0.10.0)
  • Installing commit5 (0.1.1)
  • Installing celery (5.3.4)
  • Installing config-path (1.0.3)
  • Installing deeplake (3.7.0)
  • Installing eventlet (0.33.3)
  • Installing flake8 (6.1.0)
  • Installing fuzzywuzzy (0.18.0)
  • Installing geopy (2.4.0)
  • Installing gitpython (3.1.37)
  • Installing gradio (3.44.4)
  • Installing highlight-io (0.6.0)
  • Installing jupyter (1.0.0)
  • Installing llama-index (0.7.24.post1)
  • Installing logtail-python (0.2.6)
  • Installing loguru (0.6.0)
  • Installing lxml (4.9.3)
  • Installing markdownify (0.11.6)
  • Installing modal-client (0.51.3360)
  • Installing nptyping (2.5.0)
  • Installing playwright (1.33.0)
  • Installing posthog (3.0.2)
  • Installing pre-commit (3.4.0)
  • Installing pygithub (1.58.2)
  • Installing pylint-pydantic (0.2.4)
  • Installing pymongo (4.5.0)
  • Installing python-dotenv (1.0.0)
  • Installing python-levenshtein (0.21.1)
  • Installing redis (5.0.0)
  • Installing replicate (0.11.0)
  • Installing robotexclusionrulesparser (1.7.1)
  • Installing sentence-transformers (2.2.2)
  • Installing tabulate (0.9.0)
  • Installing tree-sitter-languages (1.7.0)
  • Installing whoosh (2.7.4)
Writing lock file
Installing the current project: sweepai (0.5.2)
[[ "sweepai/handlers/on_merge.py" == *.py ]] && poetry run pylint --errors-only sweepai/handlers/on_merge.py 4/4 ✓
(nothing was outputted)
sweep-nightly[bot] commented 1 year ago

Here's the PR! https://github.com/sweepai/sweep/pull/1791.

💎 Sweep Pro: I'm creating this ticket using GPT-4. You have unlimited GPT-4 tickets.

Actions (click)


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/sweepai/sweep/blob/8e9327208bb79a23e7342806a77eaed34554fbd5/sweepai/handlers/on_merge.py#L1-L74

I also found some related docs:


Step 2: ⌨️ Coding

  1. Before the line where get_rules function is called (line 37), add a check to see if the current repo is in the merge_rule_debounce dictionary and if the difference between the current time and the time stored in the dictionary is less than 30 seconds. If it is, return from the function to prevent the rules from being called. You can use the time module to get the current time and calculate the difference. The code would look something like this:

    import time
    ...
    if repo in merge_rule_debounce and time.time() - merge_rule_debounce[repo] < 30:
    return
  2. After the get_rules function is called (line 37), update the merge_rule_debounce dictionary with the current time for the current repo. The code would look something like this:

    merge_rule_debounce[repo] = time.time()
    Sandbox Execution Logs
pre-commit install 1/4 ✓
pre-commit installed at .git/hooks/pre-commit
pip install poetry 2/4 ✓
Collecting poetry
  Downloading poetry-1.6.1-py3-none-any.whl (232 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.8/232.8 KB 4.4 MB/s eta 0:00:00
Requirement already satisfied: packaging>=20.4 in /usr/local/lib/python3.10/dist-packages (from poetry) (23.1)
Collecting keyring<25.0.0,>=24.0.0
  Downloading keyring-24.2.0-py3-none-any.whl (37 kB)
Collecting shellingham<2.0,>=1.5
  Downloading shellingham-1.5.3-py2.py3-none-any.whl (9.7 kB)
Collecting cachecontrol[filecache]<0.14.0,>=0.13.0
  Downloading cachecontrol-0.13.1-py3-none-any.whl (22 kB)
Collecting pkginfo<2.0.0,>=1.9.4
  Downloading pkginfo-1.9.6-py3-none-any.whl (30 kB)
Requirement already satisfied: tomli<3.0.0,>=2.0.1 in /usr/local/lib/python3.10/dist-packages (from poetry) (2.0.1)
Collecting requests-toolbelt<2,>=0.9.1
  Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 KB 4.8 MB/s eta 0:00:00
Collecting jsonschema<4.18.0,>=4.10.0
  Downloading jsonschema-4.17.3-py3-none-any.whl (90 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 90.4/90.4 KB 23.3 MB/s eta 0:00:00
Collecting build<0.11.0,>=0.10.0
  Downloading build-0.10.0-py3-none-any.whl (17 kB)
Collecting poetry-plugin-export<2.0.0,>=1.5.0
  Downloading poetry_plugin_export-1.5.0-py3-none-any.whl (10 kB)
Collecting cleo<3.0.0,>=2.0.0
  Downloading cleo-2.0.1-py3-none-any.whl (77 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.3/77.3 KB 9.8 MB/s eta 0:00:00
Collecting crashtest<0.5.0,>=0.4.1
  Downloading crashtest-0.4.1-py3-none-any.whl (7.6 kB)
Collecting pexpect<5.0.0,>=4.7.0
  Downloading pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.0/59.0 KB 14.6 MB/s eta 0:00:00
Collecting trove-classifiers>=2022.5.19
  Downloading trove_classifiers-2023.9.19-py3-none-any.whl (13 kB)
Collecting poetry-core==1.7.0
  Downloading poetry_core-1.7.0-py3-none-any.whl (426 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 426.4/426.4 KB 34.5 MB/s eta 0:00:00
Collecting pyproject-hooks<2.0.0,>=1.0.0
  Downloading pyproject_hooks-1.0.0-py3-none-any.whl (9.3 kB)
Collecting tomlkit<1.0.0,>=0.11.4
  Downloading tomlkit-0.12.1-py3-none-any.whl (37 kB)
Requirement already satisfied: virtualenv<21.0.0,>=20.22.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (20.24.5)
Requirement already satisfied: platformdirs<4.0.0,>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (3.10.0)
Collecting dulwich<0.22.0,>=0.21.2
  Downloading dulwich-0.21.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (512 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 512.2/512.2 KB 62.0 MB/s eta 0:00:00
Collecting requests<3.0,>=2.26
  Downloading requests-2.31.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 KB 13.8 MB/s eta 0:00:00
Collecting installer<0.8.0,>=0.7.0
  Downloading installer-0.7.0-py3-none-any.whl (453 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 453.8/453.8 KB 41.2 MB/s eta 0:00:00
Collecting msgpack>=0.5.2
  Downloading msgpack-1.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (530 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 530.8/530.8 KB 48.3 MB/s eta 0:00:00
Requirement already satisfied: filelock>=3.8.0 in /usr/local/lib/python3.10/dist-packages (from cachecontrol[filecache]<0.14.0,>=0.13.0->poetry) (3.12.4)
Collecting rapidfuzz<3.0.0,>=2.2.0
  Downloading rapidfuzz-2.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 83.8 MB/s eta 0:00:00
Collecting urllib3>=1.25
  Downloading urllib3-2.0.5-py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.8/123.8 KB 29.9 MB/s eta 0:00:00
Collecting attrs>=17.4.0
  Downloading attrs-23.1.0-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 KB 12.1 MB/s eta 0:00:00
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Downloading pyrsistent-0.19.3-py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.5/57.5 KB 13.3 MB/s eta 0:00:00
Collecting jaraco.classes
  Downloading jaraco.classes-3.3.0-py3-none-any.whl (5.9 kB)
Collecting SecretStorage>=3.2
  Downloading SecretStorage-3.3.3-py3-none-any.whl (15 kB)
Collecting jeepney>=0.4.2
  Downloading jeepney-0.8.0-py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.4/48.4 KB 12.5 MB/s eta 0:00:00
Collecting importlib-metadata>=4.11.4
  Downloading importlib_metadata-6.8.0-py3-none-any.whl (22 kB)
Collecting ptyprocess>=0.5
  Downloading ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting idna<4,>=2.5
  Downloading idna-3.4-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.5/61.5 KB 16.2 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
  Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 KB 38.4 MB/s eta 0:00:00
Collecting charset-normalizer<4,>=2
  Downloading charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (201 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 201.8/201.8 KB 26.8 MB/s eta 0:00:00
Requirement already satisfied: distlib<1,>=0.3.7 in /usr/local/lib/python3.10/dist-packages (from virtualenv<21.0.0,>=20.22.0->poetry) (0.3.7)
Collecting zipp>=0.5
  Downloading zipp-3.17.0-py3-none-any.whl (7.4 kB)
Collecting cryptography>=2.0
  Downloading cryptography-41.0.4-cp37-abi3-manylinux_2_28_x86_64.whl (4.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 81.8 MB/s eta 0:00:00
Collecting more-itertools
  Downloading more_itertools-10.1.0-py3-none-any.whl (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.8/55.8 KB 8.4 MB/s eta 0:00:00
Collecting cffi>=1.12
  Downloading cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 441.8/441.8 KB 74.9 MB/s eta 0:00:00
Collecting pycparser
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 KB 33.2 MB/s eta 0:00:00
Installing collected packages: trove-classifiers, ptyprocess, zipp, urllib3, tomlkit, shellingham, rapidfuzz, pyrsistent, pyproject-hooks, pycparser, poetry-core, pkginfo, pexpect, msgpack, more-itertools, jeepney, installer, idna, crashtest, charset-normalizer, certifi, attrs, requests, jsonschema, jaraco.classes, importlib-metadata, dulwich, cleo, cffi, build, requests-toolbelt, cryptography, cachecontrol, SecretStorage, keyring, poetry-plugin-export, poetry
Successfully installed SecretStorage-3.3.3 attrs-23.1.0 build-0.10.0 cachecontrol-0.13.1 certifi-2023.7.22 cffi-1.15.1 charset-normalizer-3.2.0 cleo-2.0.1 crashtest-0.4.1 cryptography-41.0.4 dulwich-0.21.6 idna-3.4 importlib-metadata-6.8.0 installer-0.7.0 jaraco.classes-3.3.0 jeepney-0.8.0 jsonschema-4.17.3 keyring-24.2.0 more-itertools-10.1.0 msgpack-1.0.6 pexpect-4.8.0 pkginfo-1.9.6 poetry-1.6.1 poetry-core-1.7.0 poetry-plugin-export-1.5.0 ptyprocess-0.7.0 pycparser-2.21 pyproject-hooks-1.0.0 pyrsistent-0.19.3 rapidfuzz-2.15.1 requests-2.31.0 requests-toolbelt-1.0.0 shellingham-1.5.3 tomlkit-0.12.1 trove-classifiers-2023.9.19 urllib3-2.0.5 zipp-3.17.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
poetry install 3/4 ✓
Creating virtualenv sweepai-gW_DSdP6-py3.10 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...
Package operations: 293 installs, 1 update, 0 removals
  • Installing attrs (23.1.0)
  • Installing rpds-py (0.10.3)
  • Installing referencing (0.30.2)
  • Installing six (1.16.0)
  • Installing jsonschema-specifications (2023.7.1)
  • Installing platformdirs (3.10.0)
  • Installing python-dateutil (2.8.2)
  • Installing traitlets (5.10.0)
  • Installing arrow (1.2.3)
  • Installing fastjsonschema (2.18.0)
  • Installing jsonschema (4.19.1)
  • Installing jupyter-core (5.3.1)
  • Installing pycparser (2.21)
  • Installing tornado (6.3.3)
  • Installing pyzmq (25.1.1)
  • Installing cffi (1.15.1)
  • Installing fqdn (1.5.1)
  • Installing idna (3.4)
  • Installing isoduration (20.11.0)
  • Installing jsonpointer (2.4)
  • Installing markupsafe (2.1.3)
  • Installing jupyter-client (8.3.1)
  • Installing nbformat (5.9.2)
  • Installing ptyprocess (0.7.0)
  • Installing rfc3339-validator (0.1.4)
  • Installing rfc3986-validator (0.1.1)
  • Installing soupsieve (2.5)
  • Installing uri-template (1.3.0)
  • Installing webcolors (1.13)
  • Installing webencodings (0.5.1)
  • Installing wrapt (1.15.0)
  • Installing zipp (3.17.0)
  • Installing argon2-cffi-bindings (21.2.0)
  • Installing asttokens (2.4.0)
  • Installing beautifulsoup4 (4.12.2)
  • Installing bleach (6.0.0)
  • Installing defusedxml (0.7.1)
  • Installing deprecated (1.2.14)
  • Installing exceptiongroup (1.1.3)
  • Installing executing (1.2.0)
  • Installing importlib-metadata (6.8.0)
  • Installing jinja2 (3.1.2)
  • Installing jmespath (1.0.1)
  • Installing jupyterlab-pygments (0.2.2)
  • Installing mistune (3.0.1)
  • Installing nbclient (0.8.0)
  • Installing packaging (23.1)
  • Installing pandocfilters (1.5.0)
  • Installing parso (0.8.3)
  • Installing protobuf (4.24.3)
  • Installing pure-eval (0.2.2)
  • Installing pygments (2.16.1)
  • Installing python-json-logger (2.0.7)
  • Installing pyyaml (6.0.1)
  • Installing sniffio (1.3.0)
  • Installing terminado (0.17.1)
  • Installing tinycss2 (1.2.1)
  • Installing urllib3 (1.26.16)
  • Installing wcwidth (0.2.6)
  • Installing anyio (3.7.1)
  • Installing argon2-cffi (23.1.0)
  • Installing backcall (0.2.0)
  • Installing botocore (1.31.17)
  • Installing certifi (2023.7.22)
  • Installing charset-normalizer (3.2.0)
  • Installing decorator (5.1.1)
  • Installing frozenlist (1.4.0)
  • Installing jedi (0.19.0)
  • Installing jupyter-events (0.7.0)
  • Installing jupyter-server-terminals (0.4.4)
  • Installing matplotlib-inline (0.1.6)
  • Installing multidict (6.0.4)
  • Installing nbconvert (7.8.0)
  • Installing opentelemetry-api (1.19.0)
  • Installing opentelemetry-proto (1.19.0)
  • Installing opentelemetry-semantic-conventions (0.40b0)
  • Installing overrides (7.4.0)
  • Installing pexpect (4.8.0)
  • Installing pickleshare (0.7.5)
  • Installing prometheus-client (0.17.1)
  • Installing prompt-toolkit (3.0.39)
  • Installing send2trash (1.8.2)
  • Installing stack-data (0.6.2)
  • Installing typing-extensions (4.8.0)
  • Installing websocket-client (1.6.3)
  • Installing aiosignal (1.3.1)
  • Installing async-timeout (4.0.3)
  • Installing babel (2.12.1)
  • Installing backoff (2.2.1)
  • Installing comm (0.1.4)
  • Installing debugpy (1.8.0)
  • Installing googleapis-common-protos (1.60.0)
  • Installing grpcio (1.58.0)
  • Installing h11 (0.14.0)
  • Installing hpack (4.0.0)
  • Installing hyperframe (6.0.1)
  • Installing ipython (8.15.0)
  • Installing json5 (0.9.14)
  • Installing jupyter-server (2.7.3)
  • Installing lazy-object-proxy (1.9.0)
  • Installing mdurl (0.1.2)
  • Installing mpmath (1.3.0)
  • Installing mypy-extensions (1.0.0)
  • Installing nest-asyncio (1.5.8)
  • Installing opentelemetry-exporter-otlp-proto-common (1.19.0)
  • Installing opentelemetry-sdk (1.19.0)
  • Installing psutil (5.9.5)
  • Installing requests (2.31.0)
  • Installing s3transfer (0.6.2)
  • Installing yarl (1.9.2)
  • Installing aiohttp (3.8.5)
  • Installing aioitertools (0.11.0)
  • Installing astroid (2.15.6)
  • Installing async-lru (2.0.4)
  • Installing boto3 (1.28.17)
  • Installing click (8.1.7)
  • Installing dill (0.3.7)
  • Installing filelock (3.12.4)
  • Installing fsspec (2023.9.2)
  • Installing greenlet (2.0.1)
  • Installing h2 (4.1.0)
  • Installing httpcore (0.18.0)
  • Installing ipykernel (6.25.2)
  • Installing isort (5.12.0)
  • Installing jupyter-lsp (2.2.0)
  • Installing jupyterlab-server (2.25.0)
  • Installing markdown-it-py (3.0.0)
  • Installing marshmallow (3.20.1)
  • Installing mccabe (0.7.0)
  • Installing networkx (3.1)
  • Installing notebook-shim (0.2.3)
  • Installing numpy (1.25.2)
  • Installing opentelemetry-exporter-otlp-proto-grpc (1.19.0)
  • Installing opentelemetry-exporter-otlp-proto-http (1.19.0)
  • Installing pydantic (1.10.12)
  • Installing pytz (2023.3.post1)
  • Updating setuptools (68.2.0 -> 68.2.2)
  • Installing sigtools (4.0.1)
  • Installing starlette (0.26.1)
  • Installing sympy (1.12)
  • Installing tomli (2.0.1)
  • Installing tomlkit (0.12.1)
  • Installing tqdm (4.66.1)
  • Installing typing-inspect (0.9.0)
  • Installing tzdata (2023.3)
  • Installing vine (5.0.0)
  • Installing aiobotocore (2.6.0)
  • Installing aiostream (0.4.5)
  • Installing amqp (5.1.1)
  • Installing asgiref (3.7.2)
  • Installing cloudpickle (2.0.0)
  • Installing contourpy (1.1.1)
  • Installing cryptography (41.0.4)
  • Installing cycler (0.11.0)
  • Installing dataclasses-json (0.6.0)
  • Installing distlib (0.3.7)
  • Installing entrypoints (0.4)
  • Installing fastapi (0.94.1)
  • Installing fonttools (4.42.1)
  • Installing grpclib (0.4.3)
  • Installing httpx (0.25.0)
  • Installing huggingface-hub (0.17.2)
  • Installing ipython-genutils (0.2.0)
  • Installing joblib (1.3.2)
  • Installing jsonpatch (1.33)
  • Installing jupyterlab (4.0.6)
  • Installing jupyterlab-widgets (3.0.9)
  • Installing kiwisolver (1.4.5)
  • Installing langsmith (0.0.40)
  • Installing multiprocess (0.70.15)
  • Installing numexpr (2.8.6)
  • Installing opentelemetry-exporter-otlp (1.19.0)
  • Installing opentelemetry-instrumentation (0.40b0)
  • Installing pandas (2.1.1)
  • Installing pillow (10.0.1)
  • Installing pox (0.3.3)
  • Installing ppft (1.7.6.7)
  • Installing pylint (2.17.5)
  • Installing pyparsing (3.1.1)
  • Installing qtpy (2.4.0)
  • Installing rapidfuzz (3.3.0)
  • Installing regex (2023.8.8)
  • Installing rich (13.5.3)
  • Installing safetensors (0.3.3)
  • Installing scipy (1.9.3)
  • Installing setuptools-scm (8.0.3)
  • Installing smmap (5.0.1)
  • Installing sqlalchemy (2.0.21)
  • Installing synchronicity (0.5.3)
  • Installing tblib (2.0.0)
  • Installing tenacity (8.2.3)
  • Installing threadpoolctl (3.2.0)
  • Installing tokenizers (0.13.3)
  • Installing toml (0.10.2)
  • Installing toolz (0.12.0)
  • Installing torch (2.0.1)
  • Installing typer (0.9.0)
  • Installing types-certifi (2021.10.8.3)
  • Installing types-toml (0.10.8.7)
  • Installing watchfiles (0.20.0)
  • Installing websockets (11.0.3)
  • Installing widgetsnbextension (4.0.9)
  • Installing aioboto3 (11.3.0)
  • Installing aiofiles (23.2.1)
  • Installing billiard (4.1.0)
  • Installing cfgv (3.4.0)
  • Installing click-didyoumean (0.3.0)
  • Installing altair (5.1.1)
  • Installing click-repl (0.3.0)
  • Installing click-plugins (1.1.1)
  • Installing dnspython (2.4.2)
  • Installing docker (6.1.3)
  • Installing ffmpy (0.3.1)
  • Installing geographiclib (2.0)
  • Installing gitdb (4.0.10)
  • Installing gradio-client (0.5.1)
  • Installing humbug (0.3.2)
  • Installing identify (2.5.29)
  • Installing importlib-resources (6.1.0)
  • Installing ipywidgets (8.1.1)
  • Installing jupyter-console (6.6.3)
  • Installing kombu (5.3.2)
  • Installing langchain (0.0.300)
  • Installing levenshtein (0.21.1)
  • Installing matplotlib (3.8.0)
  • Installing modal (0.51.3360)
  • Installing monotonic (1.6)
  • Installing msgpack (1.0.6)
  • Installing nltk (3.8.1)
  • Installing nodeenv (1.8.0)
  • Installing notebook (7.0.4)
  • Installing numcodecs (0.11.0)
  • Installing openai (0.27.10)
  • Installing opentelemetry-distro (0.40b0)
  • Installing opentelemetry-instrumentation-logging (0.40b0)
  • Installing orjson (3.9.7)
  • Installing pathos (0.3.1)
  • Installing pathspec (0.11.2)
  • Installing pycodestyle (2.11.0)
  • Installing pydub (0.25.1)
  • Installing pyee (9.0.4)
  • Installing pyflakes (3.1.0)
  • Installing pyjwt (2.8.0)
  • Installing pylint-plugin-utils (0.8.2)
  • Installing pynacl (1.5.0)
  • Installing pyproject-hooks (1.0.0)
  • Installing python-multipart (0.0.6)
  • Installing qtconsole (5.4.4)
  • Installing scikit-learn (1.3.1)
  • Installing semantic-version (2.10.0)
  • Installing sentencepiece (0.1.99)
  • Installing tiktoken (0.3.3)
  • Installing torchvision (0.15.2)
  • Installing transformers (4.33.2)
  • Installing tree-sitter (0.20.2)
  • Installing uvicorn (0.21.1)
  • Installing virtualenv (20.24.5)
  • Installing anthropic (0.2.10)
  • Installing black (23.9.1)
  • Installing build (0.10.0)
  • Installing commit5 (0.1.1)
  • Installing celery (5.3.4)
  • Installing config-path (1.0.3)
  • Installing deeplake (3.7.0)
  • Installing eventlet (0.33.3)
  • Installing flake8 (6.1.0)
  • Installing fuzzywuzzy (0.18.0)
  • Installing geopy (2.4.0)
  • Installing gitpython (3.1.37)
  • Installing gradio (3.44.4)
  • Installing highlight-io (0.6.0)
  • Installing jupyter (1.0.0)
  • Installing llama-index (0.7.24.post1)
  • Installing logtail-python (0.2.6)
  • Installing loguru (0.6.0)
  • Installing lxml (4.9.3)
  • Installing markdownify (0.11.6)
  • Installing modal-client (0.51.3360)
  • Installing nptyping (2.5.0)
  • Installing playwright (1.33.0)
  • Installing posthog (3.0.2)
  • Installing pre-commit (3.4.0)
  • Installing pygithub (1.58.2)
  • Installing pylint-pydantic (0.2.4)
  • Installing pymongo (4.5.0)
  • Installing python-dotenv (1.0.0)
  • Installing python-levenshtein (0.21.1)
  • Installing redis (5.0.0)
  • Installing replicate (0.11.0)
  • Installing robotexclusionrulesparser (1.7.1)
  • Installing sentence-transformers (2.2.2)
  • Installing tabulate (0.9.0)
  • Installing tree-sitter-languages (1.7.0)
  • Installing whoosh (2.7.4)
Writing lock file
Installing the current project: sweepai (0.5.2)
[[ "sweepai/handlers/on_merge.py" == *.py ]] && poetry run pylint --errors-only sweepai/handlers/on_merge.py 4/4 ✓
(nothing was outputted)


Step 3: 🔁 Code Review

Here are my self-reviews of my changes at sweep/debounce-sweep-rules_1.

Here is the 1st review

Hi there, great job on implementing the debounce functionality. However, there's a small issue that needs to be addressed: - In the file `sweepai/handlers/on_merge.py`, the `CHANGE_THRESHOLD` is defined twice (lines 9 and 12). Please remove one of the definitions to avoid confusion. Keep up the good work!

I finished incorporating these changes.


🎉 Latest improvements to Sweep:


💡 To recreate the pull request edit the issue title or description. To tweak the pull request, leave a comment on the pull request. Join Our Discord