eranheres / ultra_type

0 stars 0 forks source link

Sweep: show stats as a table #35

Open eranheres opened 11 months ago

eranheres commented 11 months ago

Show stat as a table and not as a json

Checklist - [ ] ``ultra_type/view.py`` ![35_flowchart.svg](https://raw.githubusercontent.com/eranheres/ultra_type/sweep/assets/6f19af4ecf55ec2012514415a5b5303a98c243ce5dd45b70fdd7b1bc94df3e82_35_flowchart.svg)
sweep-mine[bot] commented 11 months ago
Sweeping

50%
💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: 6d7d175d84)

![Docker Version Updated](https://img.shields.io/badge/Docker%20Version%20Updated-36%20minutes%20ago-blue)

Actions (click)

Sandbox Execution X

Here are the sandbox execution logs prior to making any changes:

Sandbox logs for b133ff1
pre-commit install 1/8 ✓
pre-commit installed at .git/hooks/pre-commit
pre-commit run --file sweepai/api.py || exit 0 2/8 ✓
An error has occurred: InvalidConfigError: 
=====> .pre-commit-config.yaml is not a file
Check the log at /root/.cache/pre-commit/pre-commit.log
pip install poetry 3/8 ✓
Requirement already satisfied: poetry in /usr/local/lib/python3.10/dist-packages (1.7.1)
Requirement already satisfied: crashtest<0.5.0,>=0.4.1 in /usr/local/lib/python3.10/dist-packages (from poetry) (0.4.1)
Requirement already satisfied: tomlkit<1.0.0,>=0.11.4 in /usr/local/lib/python3.10/dist-packages (from poetry) (0.12.3)
Requirement already satisfied: platformdirs<4.0.0,>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (3.11.0)
Requirement already satisfied: dulwich<0.22.0,>=0.21.2 in /usr/local/lib/python3.10/dist-packages (from poetry) (0.21.6)
Requirement already satisfied: shellingham<2.0,>=1.5 in /usr/local/lib/python3.10/dist-packages (from poetry) (1.5.4)
Requirement already satisfied: cachecontrol[filecache]<0.14.0,>=0.13.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (0.13.1)
Requirement already satisfied: pexpect<5.0.0,>=4.7.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (4.8.0)
Requirement already satisfied: fastjsonschema<3.0.0,>=2.18.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (2.19.0)
Requirement already satisfied: trove-classifiers>=2022.5.19 in /usr/local/lib/python3.10/dist-packages (from poetry) (2023.11.14)
Requirement already satisfied: tomli<3.0.0,>=2.0.1 in /usr/local/lib/python3.10/dist-packages (from poetry) (2.0.1)
Requirement already satisfied: pkginfo<2.0.0,>=1.9.4 in /usr/local/lib/python3.10/dist-packages (from poetry) (1.9.6)
Requirement already satisfied: requests<3.0,>=2.26 in /usr/local/lib/python3.10/dist-packages (from poetry) (2.31.0)
Requirement already satisfied: requests-toolbelt<2,>=0.9.1 in /usr/local/lib/python3.10/dist-packages (from poetry) (1.0.0)
Requirement already satisfied: virtualenv<21.0.0,>=20.23.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (20.24.7)
Requirement already satisfied: cleo<3.0.0,>=2.1.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (2.1.0)
Requirement already satisfied: installer<0.8.0,>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (0.7.0)
Requirement already satisfied: build<2.0.0,>=1.0.3 in /usr/local/lib/python3.10/dist-packages (from poetry) (1.0.3)
Requirement already satisfied: keyring<25.0.0,>=24.0.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (24.3.0)
Requirement already satisfied: packaging>=20.5 in /usr/local/lib/python3.10/dist-packages (from poetry) (23.2)
Requirement already satisfied: poetry-plugin-export<2.0.0,>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (1.6.0)
Requirement already satisfied: poetry-core==1.8.1 in /usr/local/lib/python3.10/dist-packages (from poetry) (1.8.1)
Requirement already satisfied: pyproject-hooks<2.0.0,>=1.0.0 in /usr/local/lib/python3.10/dist-packages (from poetry) (1.0.0)
Requirement already satisfied: msgpack>=0.5.2 in /usr/local/lib/python3.10/dist-packages (from cachecontrol[filecache]<0.14.0,>=0.13.0->poetry) (1.0.7)
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.13.1)
Requirement already satisfied: rapidfuzz<4.0.0,>=3.0.0 in /usr/local/lib/python3.10/dist-packages (from cleo<3.0.0,>=2.1.0->poetry) (3.5.2)
Requirement already satisfied: urllib3>=1.25 in /usr/local/lib/python3.10/dist-packages (from dulwich<0.22.0,>=0.21.2->poetry) (2.1.0)
Requirement already satisfied: jeepney>=0.4.2 in /usr/local/lib/python3.10/dist-packages (from keyring<25.0.0,>=24.0.0->poetry) (0.8.0)
Requirement already satisfied: importlib-metadata>=4.11.4 in /usr/local/lib/python3.10/dist-packages (from keyring<25.0.0,>=24.0.0->poetry) (6.8.0)
Requirement already satisfied: jaraco.classes in /usr/local/lib/python3.10/dist-packages (from keyring<25.0.0,>=24.0.0->poetry) (3.3.0)
Requirement already satisfied: SecretStorage>=3.2 in /usr/local/lib/python3.10/dist-packages (from keyring<25.0.0,>=24.0.0->poetry) (3.3.3)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.10/dist-packages (from pexpect<5.0.0,>=4.7.0->poetry) (0.7.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests<3.0,>=2.26->poetry) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests<3.0,>=2.26->poetry) (2023.11.17)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests<3.0,>=2.26->poetry) (3.3.2)
Requirement already satisfied: distlib<1,>=0.3.7 in /usr/local/lib/python3.10/dist-packages (from virtualenv<21.0.0,>=20.23.0->poetry) (0.3.7)
Requirement already satisfied: zipp>=0.5 in /usr/local/lib/python3.10/dist-packages (from importlib-metadata>=4.11.4->keyring<25.0.0,>=24.0.0->poetry) (3.17.0)
Requirement already satisfied: cryptography>=2.0 in /usr/local/lib/python3.10/dist-packages (from SecretStorage>=3.2->keyring<25.0.0,>=24.0.0->poetry) (41.0.5)
Requirement already satisfied: more-itertools in /usr/local/lib/python3.10/dist-packages (from jaraco.classes->keyring<25.0.0,>=24.0.0->poetry) (10.1.0)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.10/dist-packages (from cryptography>=2.0->SecretStorage>=3.2->keyring<25.0.0,>=24.0.0->poetry) (1.16.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.12->cryptography>=2.0->SecretStorage>=3.2->keyring<25.0.0,>=24.0.0->poetry) (2.21)
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 4/8 ✓
Creating virtualenv ultra-type-gW_DSdP6-py3.10 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies...
Package operations: 14 installs, 0 updates, 0 removals
  • Installing typing-extensions (4.8.0)
  • Installing astroid (3.0.1)
  • Installing dill (0.3.7)
  • Installing exceptiongroup (1.2.0)
  • Installing iniconfig (2.0.0)
  • Installing isort (5.12.0)
  • Installing mccabe (0.7.0)
  • Installing packaging (23.2)
  • Installing platformdirs (4.0.0)
  • Installing pluggy (1.3.0)
  • Installing tomli (2.0.1)
  • Installing tomlkit (0.12.3)
  • Installing pylint (3.0.2)
  • Installing pytest (7.4.3)
Writing lock file
Installing the current project: ultra-type (0.1.0)
poetry run pip install torch --index-url https://download.pytorch.org/whl/cpu 5/8 ✓
Looking in indexes: https://download.pytorch.org/whl/cpu
Collecting torch
  Downloading https://download.pytorch.org/whl/cpu/torch-2.1.1%2Bcpu-cp310-cp310-linux_x86_64.whl (184.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 184.9/184.9 MB 7.2 MB/s eta 0:00:00
Collecting filelock (from torch)
  Downloading https://download.pytorch.org/whl/filelock-3.9.0-py3-none-any.whl (9.7 kB)
Requirement already satisfied: typing-extensions in /root/.cache/pypoetry/virtualenvs/ultra-type-gW_DSdP6-py3.10/lib/python3.10/site-packages (from torch) (4.8.0)
Collecting sympy (from torch)
  Downloading https://download.pytorch.org/whl/sympy-1.12-py3-none-any.whl (5.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 80.8 MB/s eta 0:00:00
Collecting networkx (from torch)
  Downloading https://download.pytorch.org/whl/networkx-3.0-py3-none-any.whl (2.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 56.1 MB/s eta 0:00:00
Collecting jinja2 (from torch)
  Downloading https://download.pytorch.org/whl/Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.1/133.1 kB 12.0 MB/s eta 0:00:00
Collecting fsspec (from torch)
  Downloading https://download.pytorch.org/whl/fsspec-2023.4.0-py3-none-any.whl (153 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.0/154.0 kB 14.0 MB/s eta 0:00:00
Collecting MarkupSafe>=2.0 (from jinja2->torch)
  Downloading https://download.pytorch.org/whl/MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting mpmath>=0.19 (from sympy->torch)
  Downloading https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 34.4 MB/s eta 0:00:00
Installing collected packages: mpmath, sympy, networkx, MarkupSafe, fsspec, filelock, jinja2, torch
Successfully installed MarkupSafe-2.1.3 filelock-3.9.0 fsspec-2023.4.0 jinja2-3.1.2 mpmath-1.3.0 networkx-3.0 sympy-1.12 torch-2.1.1+cpu
git add . && pre-commit run --files ultra_type/view.py || exit 0 6/8 ✓
An error has occurred: InvalidConfigError: 
=====> .pre-commit-config.yaml is not a file
Check the log at /root/.cache/pre-commit/pre-commit.log
if [[ "ultra_type/view.py" == *.py ]]; then PYTHONPATH=. poetry run pylint --errors-only ultra_type/view.py; else exit 0; fi 7/8 ✓
(nothing was outputted)
./run_tests.sh 8/8 ❌ (`1`)
basename: missing operand
Try 'basename --help' for more information.
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: argument -k: expected one argument

Sandbox failed, so all sandbox checks will be disabled for this issue.


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/eranheres/ultra_type/blob/b133ff16b07a3ce7c8b799504d9cb6b8ccdb173f/ultra_type/controller.py#L1-L33 https://github.com/eranheres/ultra_type/blob/b133ff16b07a3ce7c8b799504d9cb6b8ccdb173f/ultra_type/database.py#L1-L32 https://github.com/eranheres/ultra_type/blob/b133ff16b07a3ce7c8b799504d9cb6b8ccdb173f/tests/test_language.py#L1-L79 https://github.com/eranheres/ultra_type/blob/b133ff16b07a3ce7c8b799504d9cb6b8ccdb173f/tests/test_statistics.py#L1-L69 https://github.com/eranheres/ultra_type/blob/b133ff16b07a3ce7c8b799504d9cb6b8ccdb173f/ultra_type/main.py#L1-L11

Step 2: ⌨️ Coding


Step 3: 🔁 Code Review

Working on it...


🎉 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