Compare commits
2 Commits
repeat
...
f53fd36789
| Author | SHA1 | Date | |
|---|---|---|---|
| f53fd36789 | |||
| d76c2542e1 |
@@ -204,7 +204,6 @@ class Chat:
|
|||||||
output.append(message.to_str(source_code_only=True))
|
output.append(message.to_str(source_code_only=True))
|
||||||
continue
|
continue
|
||||||
output.append(message.to_str(with_tags, with_files))
|
output.append(message.to_str(with_tags, with_files))
|
||||||
output.append('\n' + ('-' * terminal_width()) + '\n')
|
|
||||||
if paged:
|
if paged:
|
||||||
print_paged('\n'.join(output))
|
print_paged('\n'.join(output))
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -2,3 +2,4 @@ openai
|
|||||||
PyYAML
|
PyYAML
|
||||||
argcomplete
|
argcomplete
|
||||||
pytest
|
pytest
|
||||||
|
Jinja2
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
with open("README.md", "r", encoding="utf-8") as fh:
|
with open("README.md", "r", encoding="utf-8") as fh:
|
||||||
long_description = fh.read()
|
long_description = fh.read()
|
||||||
|
with open("requirements.txt", "r") as fh:
|
||||||
|
install_requirements = [line.strip() for line in fh]
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="ChatMastermind",
|
name="ChatMastermind",
|
||||||
@@ -28,12 +30,7 @@ setup(
|
|||||||
"Topic :: Utilities",
|
"Topic :: Utilities",
|
||||||
"Topic :: Text Processing",
|
"Topic :: Text Processing",
|
||||||
],
|
],
|
||||||
install_requires=[
|
install_requires=install_requirements,
|
||||||
"openai",
|
|
||||||
"PyYAML",
|
|
||||||
"argcomplete",
|
|
||||||
"pytest",
|
|
||||||
],
|
|
||||||
python_requires=">=3.9",
|
python_requires=">=3.9",
|
||||||
test_suite="tests",
|
test_suite="tests",
|
||||||
entry_points={
|
entry_points={
|
||||||
|
|||||||
+1
-13
@@ -6,7 +6,7 @@ from io import StringIO
|
|||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
from chatmastermind.tags import TagLine
|
from chatmastermind.tags import TagLine
|
||||||
from chatmastermind.message import Message, Question, Answer, Tag, MessageFilter
|
from chatmastermind.message import Message, Question, Answer, Tag, MessageFilter
|
||||||
from chatmastermind.chat import Chat, ChatDB, terminal_width, ChatError
|
from chatmastermind.chat import Chat, ChatDB, ChatError
|
||||||
|
|
||||||
|
|
||||||
class TestChat(unittest.TestCase):
|
class TestChat(unittest.TestCase):
|
||||||
@@ -92,16 +92,10 @@ class TestChat(unittest.TestCase):
|
|||||||
Question 1
|
Question 1
|
||||||
{Answer.txt_header}
|
{Answer.txt_header}
|
||||||
Answer 1
|
Answer 1
|
||||||
|
|
||||||
{'-'*terminal_width()}
|
|
||||||
|
|
||||||
{Question.txt_header}
|
{Question.txt_header}
|
||||||
Question 2
|
Question 2
|
||||||
{Answer.txt_header}
|
{Answer.txt_header}
|
||||||
Answer 2
|
Answer 2
|
||||||
|
|
||||||
{'-'*terminal_width()}
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.assertEqual(mock_stdout.getvalue(), expected_output)
|
self.assertEqual(mock_stdout.getvalue(), expected_output)
|
||||||
|
|
||||||
@@ -115,18 +109,12 @@ FILE: 0001.txt
|
|||||||
Question 1
|
Question 1
|
||||||
{Answer.txt_header}
|
{Answer.txt_header}
|
||||||
Answer 1
|
Answer 1
|
||||||
|
|
||||||
{'-'*terminal_width()}
|
|
||||||
|
|
||||||
{TagLine.prefix} btag2
|
{TagLine.prefix} btag2
|
||||||
FILE: 0002.txt
|
FILE: 0002.txt
|
||||||
{Question.txt_header}
|
{Question.txt_header}
|
||||||
Question 2
|
Question 2
|
||||||
{Answer.txt_header}
|
{Answer.txt_header}
|
||||||
Answer 2
|
Answer 2
|
||||||
|
|
||||||
{'-'*terminal_width()}
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
self.assertEqual(mock_stdout.getvalue(), expected_output)
|
self.assertEqual(mock_stdout.getvalue(), expected_output)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user