total: 66, pass: 61, fail: 5
fix korean-related tests
Some tests included running tfidf on korean corpus. There was no problem
because the korean tokenizer was always enabled.
Now that "korean" feature is not enabled by default, those tests behave
differently. I removed korean corpus from tests that are not related to
korean and added a new test dedicated to korean.
elapsed time: 3,783,199 ms
elapsed time: 1,909,063 ms
elapsed time: 93,997 ms
elapsed time: 29,964 ms
elapsed time: 8,699 ms
elapsed time: 7,687 ms
elapsed time: 575,582 ms
elapsed time: 8,015 ms
elapsed time: 11,968 ms
elapsed time: 264,464 ms
elapsed time: 1,781 ms
'readme'
Traceback (most recent call last):
File "/home/ubuntu/Documents/ragit/tests/tests.py", line 701, in <module>
test()
File "/home/ubuntu/Documents/ragit/tests/server_permission.py", line 46, in server_permission
assert repo_info1["readme"] == "hello, world"
~~~~~~~~~~^^^^^^^^^^
KeyError: 'readme'
elapsed time: 15,265 ms
elapsed time: 7,002 ms
elapsed time: 595,603 ms
elapsed time: 2,379,880 ms
elapsed time: 613,168 ms
elapsed time: 273,769 ms
elapsed time: 4,692 ms
elapsed time: 7,215 ms
elapsed time: 5,660 ms
elapsed time: 721,007 ms
tfidf result on term 'search gpg annot select correspond' is not close enough. error: `approximation[2] not in answer`, answer: ['3e0d93ece16c10490435c08b7b755db9a57e53b818a9e62c0000000100000fa3', 'c5719c769542cb0cde49558784948082703f2da9618c29d80000000100000fb3', '6d1b2eeef26e5ce9672e62a7ca43412c66b86ad0e48d27620000000100000fa0', '606389435f969a017ad1cf63a7a30eba0d1a08c743efea9f0000000100000318', 'f386d96798aad5baf548b6985b367932bdc89483b756b515000000010000081f', 'c66345d5ab119b4cf05a6899472b54a4fd0041ee2b83b9f80000000100000fa2', 'bf8735875031f53ccd50e48e6674d9ac64c90f68bb0c7edb0000000100000fa0', '509b4b369f9f9729365a6947ce43335209d934562feeb7220000000100000fa2', '82ad9747a31109a3ef965e4168a0968cb56a448390416e290000000100000bf5', 'b632241f25a98c9320097079669e1acd10afd534e67ec2600000000100000fa2'], approximation: ['3e0d93ece16c10490435c08b7b755db9a57e53b818a9e62c0000000100000fa3', 'b632241f25a98c9320097079669e1acd10afd534e67ec2600000000100000fa2', '90a25e1efdafffab6369490140eecabb90ab0649108feeff0000000100000cd4', 'bf8735875031f53ccd50e48e6674d9ac64c90f68bb0c7edb0000000100000fa0', '5cdbfe828a4a84a4129bda3cc32bb8376914275561fa6a1a0000000100000da8', 'c5719c769542cb0cde49558784948082703f2da9618c29d80000000100000fb3', '0833e100c47da17ca6a2d202310483ed3c08f75ec2cfbf4a0000000100000c67', '1ff3d753fa4b857385f748c5d02a7371332241a8579211f9000000010000075c', '6f305111c4ab2bb2243ce34889afb4f72dff498303da56890000000100000c1e', '6d1b2eeef26e5ce9672e62a7ca43412c66b86ad0e48d27620000000100000fa0']
Traceback (most recent call last):
File "/home/ubuntu/Documents/ragit/tests/ii.py", line 103, in ii_worker
raise AssertionError(f"approximation[{i}] not in answer")
AssertionError: approximation[2] not in answer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/ubuntu/Documents/ragit/tests/tests.py", line 701, in <module>
test()
File "/home/ubuntu/Documents/ragit/tests/ii.py", line 49, in ii
ii_worker()
File "/home/ubuntu/Documents/ragit/tests/ii.py", line 116, in ii_worker
raise AssertionError(f"tfidf result on term '{term}' is not close enough. error: `{e}`, answer: {answer}, approximation: {approximation}")
AssertionError: tfidf result on term 'search gpg annot select correspond' is not close enough. error: `approximation[2] not in answer`, answer: ['3e0d93ece16c10490435c08b7b755db9a57e53b818a9e62c0000000100000fa3', 'c5719c769542cb0cde49558784948082703f2da9618c29d80000000100000fb3', '6d1b2eeef26e5ce9672e62a7ca43412c66b86ad0e48d27620000000100000fa0', '606389435f969a017ad1cf63a7a30eba0d1a08c743efea9f0000000100000318', 'f386d96798aad5baf548b6985b367932bdc89483b756b515000000010000081f', 'c66345d5ab119b4cf05a6899472b54a4fd0041ee2b83b9f80000000100000fa2', 'bf8735875031f53ccd50e48e6674d9ac64c90f68bb0c7edb0000000100000fa0', '509b4b369f9f9729365a6947ce43335209d934562feeb7220000000100000fa2', '82ad9747a31109a3ef965e4168a0968cb56a448390416e290000000100000bf5', 'b632241f25a98c9320097079669e1acd10afd534e67ec2600000000100000fa2'], approximation: ['3e0d93ece16c10490435c08b7b755db9a57e53b818a9e62c0000000100000fa3', 'b632241f25a98c9320097079669e1acd10afd534e67ec2600000000100000fa2', '90a25e1efdafffab6369490140eecabb90ab0649108feeff0000000100000cd4', 'bf8735875031f53ccd50e48e6674d9ac64c90f68bb0c7edb0000000100000fa0', '5cdbfe828a4a84a4129bda3cc32bb8376914275561fa6a1a0000000100000da8', 'c5719c769542cb0cde49558784948082703f2da9618c29d80000000100000fb3', '0833e100c47da17ca6a2d202310483ed3c08f75ec2cfbf4a0000000100000c67', '1ff3d753fa4b857385f748c5d02a7371332241a8579211f9000000010000075c', '6f305111c4ab2bb2243ce34889afb4f72dff498303da56890000000100000c1e', '6d1b2eeef26e5ce9672e62a7ca43412c66b86ad0e48d27620000000100000fa0']
elapsed time: 52,765 ms
elapsed time: 1,579,155 ms
elapsed time: 3,277 ms
elapsed time: 8,430 ms
elapsed time: 10,638 ms
elapsed time: 8,442 ms
elapsed time: 1,135,854 ms
Command '['git', 'clone', 'https://git.postgresql.org/git/postgresql.git', '--depth=1']' returned non-zero exit status 128.
Traceback (most recent call last):
File "/home/ubuntu/Documents/ragit/tests/tests.py", line 701, in <module>
test()
File "/home/ubuntu/Documents/ragit/tests/real_repos.py", line 161, in real_repos
subprocess.run(["git", "clone", r["git-url"], "--depth=1"], check=True)
File "/usr/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'clone', 'https://git.postgresql.org/git/postgresql.git', '--depth=1']' returned non-zero exit status 128.
elapsed time: 16,908 ms
elapsed time: 20,640 ms
elapsed time: 22,798 ms
elapsed time: 6,157 ms
elapsed time: 35,577 ms
elapsed time: 333,060 ms
elapsed time: 87,369 ms
elapsed time: 80,303 ms
elapsed time: 11,171 ms
elapsed time: 6,720 ms
elapsed time: 8,383 ms
elapsed time: 59,941 ms
elapsed time: 39,047 ms
elapsed time: 72,866 ms
elapsed time: 6,991 ms
elapsed time: 7,952 ms
elapsed time: 25,055 ms
elapsed time: 41,433 ms
elapsed time: 9,996 ms
elapsed time: 9,892 ms
elapsed time: 17,721 ms
elapsed time: 2,096 ms
Command '['cargo', 'run', '--release', '--no-default-features', '--', 'ls-chunks', 'landscape.pdf', '--json']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/home/ubuntu/Documents/ragit/tests/tests.py", line 701, in <module>
test()
File "/home/ubuntu/Documents/ragit/tests/tests.py", line 650, in <lambda>
("pdf gpt-4o-mini", lambda: pdf(test_model="gpt-4o-mini")),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/Documents/ragit/tests/pdf.py", line 41, in pdf
chunks = json.loads(cargo_run(["ls-chunks", pdf["name"], "--json"], stdout=True))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/Documents/ragit/tests/utils.py", line 87, in cargo_run
result = subprocess.run(args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cargo', 'run', '--release', '--no-default-features', '--', 'ls-chunks', 'landscape.pdf', '--json']' returned non-zero exit status 1.
elapsed time: 1,920 ms
Traceback (most recent call last):
File "/home/ubuntu/Documents/ragit/tests/tests.py", line 701, in <module>
test()
File "/home/ubuntu/Documents/ragit/tests/tests.py", line 651, in <lambda>
("svg gpt-4o-mini", lambda: svg(test_model="gpt-4o-mini")),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ubuntu/Documents/ragit/tests/svg.py", line 48, in svg
assert stat["staged files"] == len(broken_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
elapsed time: 48,604 ms
elapsed time: 14,068 ms
elapsed time: 2,891 ms
elapsed time: 10,861 ms
elapsed time: 109,554 ms
elapsed time: 138,377 ms
elapsed time: 1,555 ms
elapsed time: 8,260 ms
elapsed time: 2,942 ms
elapsed time: 710 ms
elapsed time: 353 ms
elapsed time: 215,810 ms
elapsed time: 1,165,691 ms
elapsed time: 387,772 ms
elapsed time: 913,325 ms