From eb3af5f1f5037c7f80e555884220dbcb896b5aa2 Mon Sep 17 00:00:00 2001 From: bobloy Date: Wed, 30 Jun 2021 10:35:13 -0400 Subject: [PATCH 01/72] New requirements --- requirements.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index a12a58026..ed772010e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,6 @@ -mathparse>=0.1,<0.2 -python-dateutil>=2.8,<2.9 -sqlalchemy>=1.3,<1.4 +mathparse +python-dateutil +sqlalchemy pytz +spacy>=3.0 +git+git://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus \ No newline at end of file From e0eb2e0908e20276a583dc9e01ac963113b99ee9 Mon Sep 17 00:00:00 2001 From: bobloy Date: Wed, 30 Jun 2021 10:37:01 -0400 Subject: [PATCH 02/72] ignore venv and idea --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0d937453a..6185f4961 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ venv # Database files *.sqlite3 +/.venv/ +.idea/ From a1994ac9ac4e5701a3c838245e0bfaf46e3c6f55 Mon Sep 17 00:00:00 2001 From: bobloy Date: Wed, 30 Jun 2021 17:30:23 -0400 Subject: [PATCH 03/72] Work on piping for big training sets --- chatterbot/tagging.py | 27 +++++++++++++++++++-------- setup.cfg | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/chatterbot/tagging.py b/chatterbot/tagging.py index ea3c31d26..3b5663895 100644 --- a/chatterbot/tagging.py +++ b/chatterbot/tagging.py @@ -23,20 +23,31 @@ def __init__(self, language=None): self.punctuation_table = str.maketrans(dict.fromkeys(string.punctuation)) - self.nlp = spacy.load(self.language.ISO_639_1.lower()) - - def get_text_index_string(self, text): - """ - Return a string of text containing part-of-speech, lemma pairs. - """ - bigram_pairs = [] + self.nlp = spacy.load(self.language.ISO_639_1.lower(), disable=["transformer", "parser", "ner"]) + def punctuation_check(self, text): if len(text) <= 2: text_without_punctuation = text.translate(self.punctuation_table) if len(text_without_punctuation) >= 1: - text = text_without_punctuation + return text_without_punctuation + return text + + def get_text_index_string_multi(self, texts): + new_texts = [self.punctuation_check(text) for text in texts] + return [self._process_document(doc) for doc in self.nlp.pipe(new_texts)] + + def get_text_index_string(self, text): + """ + Return a string of text containing part-of-speech, lemma pairs. + """ + text = self.punctuation_check(text) document = self.nlp(text) + return self._process_document(document) + + def _process_document(self, document): + bigram_pairs = [] + text = document.text if len(text) <= 2: bigram_pairs = [ diff --git a/setup.cfg b/setup.cfg index 4ca902a1e..af54d85cb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ max_line_length = 175 exclude = .eggs, .git, .tox, build, [chatterbot] -version = 1.1.0a7 +version = 1.1.0.dev1 author = Gunther Cox email = gunthercx@gmail.com url = https://github.com/gunthercox/ChatterBot From 3b8ba164d88533dd979fd87f8adda8f303d109f3 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 1 Jul 2021 17:21:49 -0400 Subject: [PATCH 04/72] Fix deprecated warn --- chatterbot/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatterbot/search.py b/chatterbot/search.py index 6c1be0ddb..c8623c332 100644 --- a/chatterbot/search.py +++ b/chatterbot/search.py @@ -46,7 +46,7 @@ def search(self, input_statement, **additional_parameters): input_search_text = input_statement.search_text if not input_statement.search_text: - self.chatbot.logger.warn( + self.chatbot.logger.warning( 'No value for search_text was available on the provided input' ) From 90c07589a12130d9627e2f17a76c804c791c7503 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 1 Jul 2021 17:22:55 -0400 Subject: [PATCH 05/72] Tagger base class cause come on, of course --- chatterbot/tagging.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/chatterbot/tagging.py b/chatterbot/tagging.py index 3b5663895..3c4e26309 100644 --- a/chatterbot/tagging.py +++ b/chatterbot/tagging.py @@ -2,25 +2,33 @@ from chatterbot import languages -class LowercaseTagger(object): - """ - Returns the text in lowercase. - """ +class Tagger: def __init__(self, language=None): self.language = language or languages.ENG + def get_text_index_string(self, text): + return text + + def get_text_index_string_multi(self, texts): + return texts + + +class LowercaseTagger(Tagger): + """ + Returns the text in lowercase. + """ + def get_text_index_string(self, text): return text.lower() -class PosLemmaTagger(object): +class PosLemmaTagger(Tagger): def __init__(self, language=None): + super().__init__(language) import spacy - self.language = language or languages.ENG - self.punctuation_table = str.maketrans(dict.fromkeys(string.punctuation)) self.nlp = spacy.load(self.language.ISO_639_1.lower(), disable=["transformer", "parser", "ner"]) From 79328c1a9b867f964cc01a74b66d4bbbaa4fb1e5 Mon Sep 17 00:00:00 2001 From: bobloy Date: Thu, 1 Jul 2021 17:23:45 -0400 Subject: [PATCH 06/72] Optimized tagging --- chatterbot/trainers.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/chatterbot/trainers.py b/chatterbot/trainers.py index 7411cc838..9dfcc8c57 100644 --- a/chatterbot/trainers.py +++ b/chatterbot/trainers.py @@ -90,6 +90,11 @@ def train(self, conversation): statements_to_create = [] + search_texts = self.chatbot.storage.tagger.get_text_index_string_multi(conversation) + + if len(search_texts) != len(conversation): + print("Uh oh") + for conversation_count, text in enumerate(conversation): if self.show_training_progress: utils.print_progress_bar( @@ -97,7 +102,8 @@ def train(self, conversation): conversation_count + 1, len(conversation) ) - statement_search_text = self.chatbot.storage.tagger.get_text_index_string(text) + # statement_search_text = self.chatbot.storage.tagger.get_text_index_string(text) + statement_search_text = search_texts[conversation_count] statement = self.get_preprocessed_statement( Statement( From 19b290f3377d23c414f8bdf585ef31fae860acec Mon Sep 17 00:00:00 2001 From: bobloy Date: Tue, 6 Jul 2021 12:01:50 -0400 Subject: [PATCH 07/72] Force sqlalchemy update, fix has_table --- chatterbot/storage/sql_storage.py | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/chatterbot/storage/sql_storage.py b/chatterbot/storage/sql_storage.py index 6c2483027..f60f01a73 100644 --- a/chatterbot/storage/sql_storage.py +++ b/chatterbot/storage/sql_storage.py @@ -19,7 +19,7 @@ class SQLStorageAdapter(StorageAdapter): def __init__(self, **kwargs): super().__init__(**kwargs) - from sqlalchemy import create_engine + from sqlalchemy import create_engine, inspect from sqlalchemy.orm import sessionmaker self.database_uri = kwargs.get('database_uri', False) @@ -43,7 +43,7 @@ def set_sqlite_pragma(dbapi_connection, connection_record): dbapi_connection.execute('PRAGMA journal_mode=WAL') dbapi_connection.execute('PRAGMA synchronous=NORMAL') - if not self.engine.dialect.has_table(self.engine, 'Statement'): + if not inspect(self.engine).has_table('Statement'): self.create_database() self.Session = sessionmaker(bind=self.engine, expire_on_commit=True) diff --git a/requirements.txt b/requirements.txt index ed772010e..ee40bf59e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ mathparse python-dateutil -sqlalchemy +sqlalchemy>=1.4.20 pytz spacy>=3.0 git+git://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus \ No newline at end of file From 35684cd127146c63f64c58e1fb86d295909fc8eb Mon Sep 17 00:00:00 2001 From: bobloy Date: Tue, 6 Jul 2021 18:00:27 -0400 Subject: [PATCH 08/72] don't use more than 512 tokens --- chatterbot/tagging.py | 3 +++ setup.cfg | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/chatterbot/tagging.py b/chatterbot/tagging.py index 3c4e26309..35bed72f3 100644 --- a/chatterbot/tagging.py +++ b/chatterbot/tagging.py @@ -71,6 +71,9 @@ def _process_document(self, document): token for token in document if token.is_alpha ] + if len(tokens) > 512: + tokens = tokens[:512] + for index in range(1, len(tokens)): bigram_pairs.append('{}:{}'.format( tokens[index - 1].pos_, diff --git a/setup.cfg b/setup.cfg index af54d85cb..56f69f4d6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ max_line_length = 175 exclude = .eggs, .git, .tox, build, [chatterbot] -version = 1.1.0.dev1 +version = 1.1.0.dev2 author = Gunther Cox email = gunthercx@gmail.com url = https://github.com/gunthercox/ChatterBot From 11fa8f91af31bba6de634fd0006fc664e8d053f3 Mon Sep 17 00:00:00 2001 From: Antoine Rybacki Date: Mon, 20 Sep 2021 17:07:33 +0200 Subject: [PATCH 09/72] bump spacy + add typer req --- requirements.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index ee40bf59e..594f2c754 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,5 +2,7 @@ mathparse python-dateutil sqlalchemy>=1.4.20 pytz -spacy>=3.0 -git+git://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus \ No newline at end of file +spacy>=3.1.3 +git+git://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus +# this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps +typer>=0.4.0,<0.5.0 \ No newline at end of file From e54784d3dcb13a2905f63b331c8c4048f0c73364 Mon Sep 17 00:00:00 2001 From: bobloy Date: Wed, 22 Sep 2021 12:45:00 -0400 Subject: [PATCH 10/72] Bump to python 3.9, dev3 --- setup.cfg | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 56f69f4d6..ae78210b2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ max_line_length = 175 exclude = .eggs, .git, .tox, build, [chatterbot] -version = 1.1.0.dev2 +version = 1.1.0.dev3 author = Gunther Cox email = gunthercx@gmail.com url = https://github.com/gunthercox/ChatterBot diff --git a/setup.py b/setup.py index 8963e6ea6..5c03f4f65 100644 --- a/setup.py +++ b/setup.py @@ -69,7 +69,7 @@ include_package_data=True, install_requires=REQUIREMENTS, dependency_links=DEPENDENCIES, - python_requires='>=3.4, <3.9', + python_requires='>=3.4, <3.10', license='BSD', zip_safe=True, platforms=['any'], From 4403161e2f1f1ed97baf7e29184b61658dc321a0 Mon Sep 17 00:00:00 2001 From: bobloy Date: Wed, 22 Sep 2021 13:24:04 -0400 Subject: [PATCH 11/72] Bump to dev4 --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index ae78210b2..dfdd241d8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,7 +23,7 @@ max_line_length = 175 exclude = .eggs, .git, .tox, build, [chatterbot] -version = 1.1.0.dev3 +version = 1.1.0.dev4 author = Gunther Cox email = gunthercx@gmail.com url = https://github.com/gunthercox/ChatterBot From 7e2e910e500d4b7fb5b2b91bfb3ac0ddbcee1f76 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 3 Aug 2022 13:15:14 -0700 Subject: [PATCH 12/72] Updated spacy requirement --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 594f2c754..5f80d1a6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ mathparse python-dateutil sqlalchemy>=1.4.20 pytz -spacy>=3.1.3 +spacy>=3.4.1 git+git://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps typer>=0.4.0,<0.5.0 \ No newline at end of file From fc6d4d65e5b68275143b8755e950ae9af0fd6a89 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 3 Aug 2022 13:48:25 -0700 Subject: [PATCH 13/72] Update comparisons.py --- chatterbot/comparisons.py | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/chatterbot/comparisons.py b/chatterbot/comparisons.py index 403d4a9f9..f609d1de1 100644 --- a/chatterbot/comparisons.py +++ b/chatterbot/comparisons.py @@ -4,7 +4,12 @@ """ from chatterbot.exceptions import OptionalDependencyImportError from difflib import SequenceMatcher - +import os +import torch +import cupy +os.environ['CUDA_VISIBLE_DEVICES'] = '0' +os.environ['CUDA_LAUNCH_BLOCKING'] = '1' +os.environ['CUPY_GPU_MEMORY_LIMIT'] = '90%' class Comparator: @@ -66,6 +71,13 @@ def __init__(self, language): super().__init__(language) try: import spacy + from thinc.api import set_gpu_allocator, require_gpu + dev0 = cupy.cuda.Device(0) + dev0.use() + handle = dev0.get_cublas_handle() + print(handle) + set_gpu_allocator("pytorch") + require_gpu(0) except ImportError: message = ( 'Unable to import "spacy".\n' @@ -73,8 +85,7 @@ def __init__(self, language): 'pip3 install "spacy>=2.1,<2.2"' ) raise OptionalDependencyImportError(message) - - self.nlp = spacy.load(self.language.ISO_639_1) + self.nlp = spacy.load("en_core_web_trf") def compare(self, statement_a, statement_b): """ @@ -85,7 +96,6 @@ def compare(self, statement_a, statement_b): """ document_a = self.nlp(statement_a.text) document_b = self.nlp(statement_b.text) - return document_a.similarity(document_b) @@ -119,6 +129,7 @@ def __init__(self, language): super().__init__(language) try: import spacy + spacy.require_gpu() except ImportError: message = ( 'Unable to import "spacy".\n' From 94f772e02f45320f72846f61c0a0046812af3bb7 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 01:52:17 -0700 Subject: [PATCH 14/72] Update requirements.txt --- requirements.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 5f80d1a6a..400297daf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,10 @@ mathparse python-dateutil sqlalchemy>=1.4.20 pytz -spacy>=3.4.1 -git+git://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus +spacy[cuda117]>=3.4.1 +git+http://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps -typer>=0.4.0,<0.5.0 \ No newline at end of file +typer>=0.4.0,<0.5.0 +nvidia-cuda-runtime-cu117>11.7.60 +nvidia-pyindex>1.0.9 +torch>1.12.0+cu116 From ed6b972fc49df1c474821fbd2bef2ff77f7d888b Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 01:53:29 -0700 Subject: [PATCH 15/72] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 400297daf..675de5636 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,4 @@ git+http://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus typer>=0.4.0,<0.5.0 nvidia-cuda-runtime-cu117>11.7.60 nvidia-pyindex>1.0.9 -torch>1.12.0+cu116 +torch>=1.12.0+cu116 From 4913239aa34697717c3db2db76915d52ee44990f Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 01:56:14 -0700 Subject: [PATCH 16/72] Delete dev-requirements.txt --- dev-requirements.txt | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 dev-requirements.txt diff --git a/dev-requirements.txt b/dev-requirements.txt deleted file mode 100644 index 86e3de486..000000000 --- a/dev-requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -coveralls -flake8 -nltk>=3.2,<4.0 -nose -pint>=0.8.1 -pymongo>=3.3,<4.0 -twine -twython -spacy>=2.1,<2.2 -sphinx>=3.0,<3.1 -sphinx_rtd_theme -pyyaml>=5.3,<5.4 -git+git://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus -https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.1.0/en_core_web_sm-2.1.0.tar.gz#egg=en_core_web_sm -https://github.com/explosion/spacy-models/releases/download/de_core_news_sm-2.1.0/de_core_news_sm-2.1.0.tar.gz#egg=de_core_news_sm \ No newline at end of file From 63ab2b02acf575b1cd32a8f385e0f8e61ef1eef2 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 01:56:50 -0700 Subject: [PATCH 17/72] Update comparisons.py --- chatterbot/comparisons.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chatterbot/comparisons.py b/chatterbot/comparisons.py index 403d4a9f9..34c52bd13 100644 --- a/chatterbot/comparisons.py +++ b/chatterbot/comparisons.py @@ -66,6 +66,7 @@ def __init__(self, language): super().__init__(language) try: import spacy + spacy.require_gpu() except ImportError: message = ( 'Unable to import "spacy".\n' @@ -119,6 +120,7 @@ def __init__(self, language): super().__init__(language) try: import spacy + spacy.require_gpu() except ImportError: message = ( 'Unable to import "spacy".\n' From c006902c455abc05a2c2a2e051e60f11dab9c18d Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 02:02:34 -0700 Subject: [PATCH 18/72] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 675de5636..cd3242542 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ python-dateutil sqlalchemy>=1.4.20 pytz spacy[cuda117]>=3.4.1 -git+http://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus +git+https://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps typer>=0.4.0,<0.5.0 nvidia-cuda-runtime-cu117>11.7.60 From ae3344b8947caa18b744da6bf78c875f8ca92f4f Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 02:04:09 -0700 Subject: [PATCH 19/72] Update requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index cd3242542..cdebd0199 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,6 @@ python-dateutil sqlalchemy>=1.4.20 pytz spacy[cuda117]>=3.4.1 -git+https://github.com/gunthercox/chatterbot-corpus@master#egg=chatterbot_corpus # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps typer>=0.4.0,<0.5.0 nvidia-cuda-runtime-cu117>11.7.60 From c5435ddd13b5e6aed619a41a33a8fbef0ae8fede Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 02:04:57 -0700 Subject: [PATCH 20/72] Update requirements.txt --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index cdebd0199..396f2a414 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,6 @@ pytz spacy[cuda117]>=3.4.1 # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps typer>=0.4.0,<0.5.0 -nvidia-cuda-runtime-cu117>11.7.60 -nvidia-pyindex>1.0.9 +nvidia-cuda-runtime-cu117>=11.7.60 +nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 From 23aa14dc70fbac9edc49e8045bc62b00b66149e6 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 02:38:14 -0700 Subject: [PATCH 21/72] Update comparisons.py --- chatterbot/comparisons.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatterbot/comparisons.py b/chatterbot/comparisons.py index 34c52bd13..88c136313 100644 --- a/chatterbot/comparisons.py +++ b/chatterbot/comparisons.py @@ -66,7 +66,7 @@ def __init__(self, language): super().__init__(language) try: import spacy - spacy.require_gpu() + gpu = spacy.prefer_gpu() except ImportError: message = ( 'Unable to import "spacy".\n' @@ -74,7 +74,7 @@ def __init__(self, language): 'pip3 install "spacy>=2.1,<2.2"' ) raise OptionalDependencyImportError(message) - + print("Chatter is currently running on gpu:" + gpu) self.nlp = spacy.load(self.language.ISO_639_1) def compare(self, statement_a, statement_b): From 5fe5c063704d9565982db350b2f6a889c7755710 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 03:19:59 -0700 Subject: [PATCH 22/72] Update comparisons.py --- chatterbot/comparisons.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chatterbot/comparisons.py b/chatterbot/comparisons.py index 88c136313..aecfa396f 100644 --- a/chatterbot/comparisons.py +++ b/chatterbot/comparisons.py @@ -4,7 +4,9 @@ """ from chatterbot.exceptions import OptionalDependencyImportError from difflib import SequenceMatcher - +os.environ['CUDA_VISIBLE_DEVICES'] = '0' +os.environ['CUDA_LAUNCH_BLOCKING'] = '1' +os.environ['CUPY_GPU_MEMORY_LIMIT'] = '90%' class Comparator: From 084d28c657e16bd103bd525eb034727e101ec492 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 03:23:12 -0700 Subject: [PATCH 23/72] Update comparisons.py --- chatterbot/comparisons.py | 1 + 1 file changed, 1 insertion(+) diff --git a/chatterbot/comparisons.py b/chatterbot/comparisons.py index aecfa396f..5559761c3 100644 --- a/chatterbot/comparisons.py +++ b/chatterbot/comparisons.py @@ -4,6 +4,7 @@ """ from chatterbot.exceptions import OptionalDependencyImportError from difflib import SequenceMatcher +import os os.environ['CUDA_VISIBLE_DEVICES'] = '0' os.environ['CUDA_LAUNCH_BLOCKING'] = '1' os.environ['CUPY_GPU_MEMORY_LIMIT'] = '90%' From fe5d3145cf06dbf2dff63c1317f96fb7db8650a0 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 03:32:20 -0700 Subject: [PATCH 24/72] Update requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 396f2a414..e9ee1be20 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,6 +5,5 @@ pytz spacy[cuda117]>=3.4.1 # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps typer>=0.4.0,<0.5.0 -nvidia-cuda-runtime-cu117>=11.7.60 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 From c9ab8306cf91b01d6821aef6421b71aec4e0d196 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 03:35:33 -0700 Subject: [PATCH 25/72] Update comparisons.py --- chatterbot/comparisons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatterbot/comparisons.py b/chatterbot/comparisons.py index 5559761c3..5db0e6697 100644 --- a/chatterbot/comparisons.py +++ b/chatterbot/comparisons.py @@ -77,7 +77,7 @@ def __init__(self, language): 'pip3 install "spacy>=2.1,<2.2"' ) raise OptionalDependencyImportError(message) - print("Chatter is currently running on gpu:" + gpu) + print("Chatter is currently running on gpu:" + str(gpu)) self.nlp = spacy.load(self.language.ISO_639_1) def compare(self, statement_a, statement_b): From e506597467c439a45369d9b6f86d6ef3c83f9079 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 03:38:38 -0700 Subject: [PATCH 26/72] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index e9ee1be20..e1872ee1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,4 @@ spacy[cuda117]>=3.4.1 typer>=0.4.0,<0.5.0 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 +cupy-cuda117 From 5492219276bdd97303e67c779f8699cab4ec0491 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 04:19:13 -0700 Subject: [PATCH 27/72] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index e1872ee1c..eda29c423 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,4 @@ spacy[cuda117]>=3.4.1 typer>=0.4.0,<0.5.0 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 -cupy-cuda117 +cupy-cuda117<11.0.0 From 4352f28f19339e48a2df77cbf3282a13e1c709f0 Mon Sep 17 00:00:00 2001 From: Joseph Date: Fri, 5 Aug 2022 04:22:55 -0700 Subject: [PATCH 28/72] Update comparisons.py --- chatterbot/comparisons.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chatterbot/comparisons.py b/chatterbot/comparisons.py index 5db0e6697..e815ea2b9 100644 --- a/chatterbot/comparisons.py +++ b/chatterbot/comparisons.py @@ -123,7 +123,7 @@ def __init__(self, language): super().__init__(language) try: import spacy - spacy.require_gpu() + gpu = spacy.prefer_gpu() except ImportError: message = ( 'Unable to import "spacy".\n' @@ -132,6 +132,7 @@ def __init__(self, language): ) raise OptionalDependencyImportError(message) + print("Chatter is currently running on gpu:" + str(gpu)) self.nlp = spacy.load(self.language.ISO_639_1) def compare(self, statement_a, statement_b): From 001351f21f0c827edbbc26a410366ac644bb27c2 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 12:51:26 -0700 Subject: [PATCH 29/72] Made it prefer gpu instead of requiring --- chatterbot/comparisons.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chatterbot/comparisons.py b/chatterbot/comparisons.py index f609d1de1..b2213ffd5 100644 --- a/chatterbot/comparisons.py +++ b/chatterbot/comparisons.py @@ -71,13 +71,13 @@ def __init__(self, language): super().__init__(language) try: import spacy - from thinc.api import set_gpu_allocator, require_gpu + from thinc.api import set_gpu_allocator, prefer_gpu dev0 = cupy.cuda.Device(0) dev0.use() handle = dev0.get_cublas_handle() print(handle) set_gpu_allocator("pytorch") - require_gpu(0) + prefer_gpu(0) except ImportError: message = ( 'Unable to import "spacy".\n' @@ -129,7 +129,8 @@ def __init__(self, language): super().__init__(language) try: import spacy - spacy.require_gpu() + from thinc.api import prefer_gpu + prefer_gpu() except ImportError: message = ( 'Unable to import "spacy".\n' From 0109b0a672dc6c49d158fd9496039ef0632a4dc0 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:17:31 -0700 Subject: [PATCH 30/72] Updated workflows --- .github/workflows/codeql-analysis.yml | 89 +++++++++++++++++++++++++++ .github/workflows/main.yml | 43 +++++++++++++ .travis.yml | 3 +- 3 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/codeql-analysis.yml create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..4b8d53250 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,89 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] + schedule: + - cron: '39 9 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: self-hosted + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'python' ] + python-version: [ "3.7", "3.8", "3.9"] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Set up Python ${{ matrix.python }} (deadsnakes) + uses: deadsnakes/action@v1.0.0 + if: endsWith(matrix.python-version, '-dev') + with: + python-version: ${{ matrix.python-version }} + + - name: Set up Python ${{ matrix.python-version }} + if: "!endsWith(matrix.python-version, '-dev')" + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python3.9 -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..7383ec966 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Python application + +on: + push: + branches: + - master + pull_request: + branches: + - master + workflow_dispatch: + + +permissions: + contents: read + +jobs: + build: + + runs-on: self-hosted + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: "3.9" + - name: Work in python env + run: | + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install flake8 pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 + run: | + # stop the build if there are Python syntax errors or undefined names + flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics + # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide + flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics diff --git a/.travis.yml b/.travis.yml index f694e3a10..d1ca474a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ language: python cache: pip python: - - '3.6' + - '3.9' + os: - linux From 0fd2a0753e95ea41e5af1cc23990e6460a22863c Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:47:18 -0700 Subject: [PATCH 31/72] Create django.yml --- .github/workflows/django.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/django.yml diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml new file mode 100644 index 000000000..3dce2af65 --- /dev/null +++ b/.github/workflows/django.yml @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +import os +import sys + +import django +from django.conf import settings +from django.test.utils import get_runner + +if __name__ == '__main__': + os.environ['DJANGO_SETTINGS_MODULE'] = 'tests_django.test_settings' + django.setup() + TestRunner = get_runner(settings) + test_runner = TestRunner( + verbosity=2 + ) + failures = test_runner.run_tests(['tests_django']) + sys.exit(bool(failures)) + From b82ffc5329ccd20d6c4079f0c964c91a57a5481a Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:51:40 -0700 Subject: [PATCH 32/72] Fixed django workflow --- .github/workflows/codeql-analysis.yml | 34 ++----------------- runtests.py => .github/workflows/runtests.py | 0 .../workflows/tests}/__init__.py | 0 .../workflows/tests}/base_case.py | 0 .../workflows/tests}/logic/__init__.py | 0 .../workflows/tests}/logic/test_best_match.py | 0 .../workflows/tests}/logic/test_data_cache.py | 0 .../tests}/logic/test_logic_adapter.py | 0 .../logic/test_mathematical_evaluation.py | 0 .../tests}/logic/test_specific_response.py | 0 .../workflows/tests}/logic/test_time.py | 0 .../tests}/logic/test_unit_conversion.py | 0 .../workflows/tests}/storage/__init__.py | 0 .../tests}/storage/test_mongo_adapter.py | 0 .../tests}/storage/test_sql_adapter.py | 0 .../tests}/storage/test_storage_adapter.py | 0 .../tests}/test_adapter_validation.py | 0 .../workflows/tests}/test_benchmarks.py | 0 .../workflows/tests}/test_chatbot.py | 0 .../workflows/tests}/test_cli.py | 0 .../workflows/tests}/test_comparisons.py | 0 .../workflows/tests}/test_conversations.py | 0 .../workflows/tests}/test_corpus.py | 0 .../workflows/tests}/test_examples.py | 0 .../workflows/tests}/test_filters.py | 0 .../workflows/tests}/test_initialization.py | 0 .../workflows/tests}/test_languages.py | 0 .../workflows/tests}/test_parsing.py | 0 .../workflows/tests}/test_preprocessors.py | 0 .../tests}/test_response_selection.py | 0 .../workflows/tests}/test_search.py | 0 .../workflows/tests}/test_tagging.py | 0 .../workflows/tests}/test_turing.py | 0 .../workflows/tests}/test_utils.py | 0 .../workflows/tests}/training/__init__.py | 0 .../test_chatterbot_corpus_training.py | 0 .../tests}/training/test_data/get_search.json | 0 .../tests}/training/test_list_training.py | 0 .../tests}/training/test_training.py | 0 .../training/test_ubuntu_corpus_training.py | 0 .../workflows/tests_django}/__init__.py | 0 .../workflows/tests_django}/base_case.py | 0 .../workflows/tests_django}/test_chatbot.py | 0 .../test_chatterbot_corpus_training.py | 0 .../tests_django}/test_chatterbot_settings.py | 0 .../tests_django}/test_django_adapter.py | 0 .../test_logic_adapter_integration.py | 0 .../workflows/tests_django}/test_settings.py | 0 .../test_statement_integration.py | 0 49 files changed, 3 insertions(+), 31 deletions(-) rename runtests.py => .github/workflows/runtests.py (100%) rename {tests => .github/workflows/tests}/__init__.py (100%) rename {tests => .github/workflows/tests}/base_case.py (100%) rename {tests => .github/workflows/tests}/logic/__init__.py (100%) rename {tests => .github/workflows/tests}/logic/test_best_match.py (100%) rename {tests => .github/workflows/tests}/logic/test_data_cache.py (100%) rename {tests => .github/workflows/tests}/logic/test_logic_adapter.py (100%) rename {tests => .github/workflows/tests}/logic/test_mathematical_evaluation.py (100%) rename {tests => .github/workflows/tests}/logic/test_specific_response.py (100%) rename {tests => .github/workflows/tests}/logic/test_time.py (100%) rename {tests => .github/workflows/tests}/logic/test_unit_conversion.py (100%) rename {tests => .github/workflows/tests}/storage/__init__.py (100%) rename {tests => .github/workflows/tests}/storage/test_mongo_adapter.py (100%) rename {tests => .github/workflows/tests}/storage/test_sql_adapter.py (100%) rename {tests => .github/workflows/tests}/storage/test_storage_adapter.py (100%) rename {tests => .github/workflows/tests}/test_adapter_validation.py (100%) rename {tests => .github/workflows/tests}/test_benchmarks.py (100%) rename {tests => .github/workflows/tests}/test_chatbot.py (100%) rename {tests => .github/workflows/tests}/test_cli.py (100%) rename {tests => .github/workflows/tests}/test_comparisons.py (100%) rename {tests => .github/workflows/tests}/test_conversations.py (100%) rename {tests => .github/workflows/tests}/test_corpus.py (100%) rename {tests => .github/workflows/tests}/test_examples.py (100%) rename {tests => .github/workflows/tests}/test_filters.py (100%) rename {tests => .github/workflows/tests}/test_initialization.py (100%) rename {tests => .github/workflows/tests}/test_languages.py (100%) rename {tests => .github/workflows/tests}/test_parsing.py (100%) rename {tests => .github/workflows/tests}/test_preprocessors.py (100%) rename {tests => .github/workflows/tests}/test_response_selection.py (100%) rename {tests => .github/workflows/tests}/test_search.py (100%) rename {tests => .github/workflows/tests}/test_tagging.py (100%) rename {tests => .github/workflows/tests}/test_turing.py (100%) rename {tests => .github/workflows/tests}/test_utils.py (100%) rename {tests => .github/workflows/tests}/training/__init__.py (100%) rename {tests => .github/workflows/tests}/training/test_chatterbot_corpus_training.py (100%) rename {tests => .github/workflows/tests}/training/test_data/get_search.json (100%) rename {tests => .github/workflows/tests}/training/test_list_training.py (100%) rename {tests => .github/workflows/tests}/training/test_training.py (100%) rename {tests => .github/workflows/tests}/training/test_ubuntu_corpus_training.py (100%) rename {tests_django => .github/workflows/tests_django}/__init__.py (100%) rename {tests_django => .github/workflows/tests_django}/base_case.py (100%) rename {tests_django => .github/workflows/tests_django}/test_chatbot.py (100%) rename {tests_django => .github/workflows/tests_django}/test_chatterbot_corpus_training.py (100%) rename {tests_django => .github/workflows/tests_django}/test_chatterbot_settings.py (100%) rename {tests_django => .github/workflows/tests_django}/test_django_adapter.py (100%) rename {tests_django => .github/workflows/tests_django}/test_logic_adapter_integration.py (100%) rename {tests_django => .github/workflows/tests_django}/test_settings.py (100%) rename {tests_django => .github/workflows/tests_django}/test_statement_integration.py (100%) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4b8d53250..82f26ee24 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -56,34 +56,6 @@ jobs: python3.9 -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 \ No newline at end of file + - name: Run Tests + run: | + ./runtests.py \ No newline at end of file diff --git a/runtests.py b/.github/workflows/runtests.py similarity index 100% rename from runtests.py rename to .github/workflows/runtests.py diff --git a/tests/__init__.py b/.github/workflows/tests/__init__.py similarity index 100% rename from tests/__init__.py rename to .github/workflows/tests/__init__.py diff --git a/tests/base_case.py b/.github/workflows/tests/base_case.py similarity index 100% rename from tests/base_case.py rename to .github/workflows/tests/base_case.py diff --git a/tests/logic/__init__.py b/.github/workflows/tests/logic/__init__.py similarity index 100% rename from tests/logic/__init__.py rename to .github/workflows/tests/logic/__init__.py diff --git a/tests/logic/test_best_match.py b/.github/workflows/tests/logic/test_best_match.py similarity index 100% rename from tests/logic/test_best_match.py rename to .github/workflows/tests/logic/test_best_match.py diff --git a/tests/logic/test_data_cache.py b/.github/workflows/tests/logic/test_data_cache.py similarity index 100% rename from tests/logic/test_data_cache.py rename to .github/workflows/tests/logic/test_data_cache.py diff --git a/tests/logic/test_logic_adapter.py b/.github/workflows/tests/logic/test_logic_adapter.py similarity index 100% rename from tests/logic/test_logic_adapter.py rename to .github/workflows/tests/logic/test_logic_adapter.py diff --git a/tests/logic/test_mathematical_evaluation.py b/.github/workflows/tests/logic/test_mathematical_evaluation.py similarity index 100% rename from tests/logic/test_mathematical_evaluation.py rename to .github/workflows/tests/logic/test_mathematical_evaluation.py diff --git a/tests/logic/test_specific_response.py b/.github/workflows/tests/logic/test_specific_response.py similarity index 100% rename from tests/logic/test_specific_response.py rename to .github/workflows/tests/logic/test_specific_response.py diff --git a/tests/logic/test_time.py b/.github/workflows/tests/logic/test_time.py similarity index 100% rename from tests/logic/test_time.py rename to .github/workflows/tests/logic/test_time.py diff --git a/tests/logic/test_unit_conversion.py b/.github/workflows/tests/logic/test_unit_conversion.py similarity index 100% rename from tests/logic/test_unit_conversion.py rename to .github/workflows/tests/logic/test_unit_conversion.py diff --git a/tests/storage/__init__.py b/.github/workflows/tests/storage/__init__.py similarity index 100% rename from tests/storage/__init__.py rename to .github/workflows/tests/storage/__init__.py diff --git a/tests/storage/test_mongo_adapter.py b/.github/workflows/tests/storage/test_mongo_adapter.py similarity index 100% rename from tests/storage/test_mongo_adapter.py rename to .github/workflows/tests/storage/test_mongo_adapter.py diff --git a/tests/storage/test_sql_adapter.py b/.github/workflows/tests/storage/test_sql_adapter.py similarity index 100% rename from tests/storage/test_sql_adapter.py rename to .github/workflows/tests/storage/test_sql_adapter.py diff --git a/tests/storage/test_storage_adapter.py b/.github/workflows/tests/storage/test_storage_adapter.py similarity index 100% rename from tests/storage/test_storage_adapter.py rename to .github/workflows/tests/storage/test_storage_adapter.py diff --git a/tests/test_adapter_validation.py b/.github/workflows/tests/test_adapter_validation.py similarity index 100% rename from tests/test_adapter_validation.py rename to .github/workflows/tests/test_adapter_validation.py diff --git a/tests/test_benchmarks.py b/.github/workflows/tests/test_benchmarks.py similarity index 100% rename from tests/test_benchmarks.py rename to .github/workflows/tests/test_benchmarks.py diff --git a/tests/test_chatbot.py b/.github/workflows/tests/test_chatbot.py similarity index 100% rename from tests/test_chatbot.py rename to .github/workflows/tests/test_chatbot.py diff --git a/tests/test_cli.py b/.github/workflows/tests/test_cli.py similarity index 100% rename from tests/test_cli.py rename to .github/workflows/tests/test_cli.py diff --git a/tests/test_comparisons.py b/.github/workflows/tests/test_comparisons.py similarity index 100% rename from tests/test_comparisons.py rename to .github/workflows/tests/test_comparisons.py diff --git a/tests/test_conversations.py b/.github/workflows/tests/test_conversations.py similarity index 100% rename from tests/test_conversations.py rename to .github/workflows/tests/test_conversations.py diff --git a/tests/test_corpus.py b/.github/workflows/tests/test_corpus.py similarity index 100% rename from tests/test_corpus.py rename to .github/workflows/tests/test_corpus.py diff --git a/tests/test_examples.py b/.github/workflows/tests/test_examples.py similarity index 100% rename from tests/test_examples.py rename to .github/workflows/tests/test_examples.py diff --git a/tests/test_filters.py b/.github/workflows/tests/test_filters.py similarity index 100% rename from tests/test_filters.py rename to .github/workflows/tests/test_filters.py diff --git a/tests/test_initialization.py b/.github/workflows/tests/test_initialization.py similarity index 100% rename from tests/test_initialization.py rename to .github/workflows/tests/test_initialization.py diff --git a/tests/test_languages.py b/.github/workflows/tests/test_languages.py similarity index 100% rename from tests/test_languages.py rename to .github/workflows/tests/test_languages.py diff --git a/tests/test_parsing.py b/.github/workflows/tests/test_parsing.py similarity index 100% rename from tests/test_parsing.py rename to .github/workflows/tests/test_parsing.py diff --git a/tests/test_preprocessors.py b/.github/workflows/tests/test_preprocessors.py similarity index 100% rename from tests/test_preprocessors.py rename to .github/workflows/tests/test_preprocessors.py diff --git a/tests/test_response_selection.py b/.github/workflows/tests/test_response_selection.py similarity index 100% rename from tests/test_response_selection.py rename to .github/workflows/tests/test_response_selection.py diff --git a/tests/test_search.py b/.github/workflows/tests/test_search.py similarity index 100% rename from tests/test_search.py rename to .github/workflows/tests/test_search.py diff --git a/tests/test_tagging.py b/.github/workflows/tests/test_tagging.py similarity index 100% rename from tests/test_tagging.py rename to .github/workflows/tests/test_tagging.py diff --git a/tests/test_turing.py b/.github/workflows/tests/test_turing.py similarity index 100% rename from tests/test_turing.py rename to .github/workflows/tests/test_turing.py diff --git a/tests/test_utils.py b/.github/workflows/tests/test_utils.py similarity index 100% rename from tests/test_utils.py rename to .github/workflows/tests/test_utils.py diff --git a/tests/training/__init__.py b/.github/workflows/tests/training/__init__.py similarity index 100% rename from tests/training/__init__.py rename to .github/workflows/tests/training/__init__.py diff --git a/tests/training/test_chatterbot_corpus_training.py b/.github/workflows/tests/training/test_chatterbot_corpus_training.py similarity index 100% rename from tests/training/test_chatterbot_corpus_training.py rename to .github/workflows/tests/training/test_chatterbot_corpus_training.py diff --git a/tests/training/test_data/get_search.json b/.github/workflows/tests/training/test_data/get_search.json similarity index 100% rename from tests/training/test_data/get_search.json rename to .github/workflows/tests/training/test_data/get_search.json diff --git a/tests/training/test_list_training.py b/.github/workflows/tests/training/test_list_training.py similarity index 100% rename from tests/training/test_list_training.py rename to .github/workflows/tests/training/test_list_training.py diff --git a/tests/training/test_training.py b/.github/workflows/tests/training/test_training.py similarity index 100% rename from tests/training/test_training.py rename to .github/workflows/tests/training/test_training.py diff --git a/tests/training/test_ubuntu_corpus_training.py b/.github/workflows/tests/training/test_ubuntu_corpus_training.py similarity index 100% rename from tests/training/test_ubuntu_corpus_training.py rename to .github/workflows/tests/training/test_ubuntu_corpus_training.py diff --git a/tests_django/__init__.py b/.github/workflows/tests_django/__init__.py similarity index 100% rename from tests_django/__init__.py rename to .github/workflows/tests_django/__init__.py diff --git a/tests_django/base_case.py b/.github/workflows/tests_django/base_case.py similarity index 100% rename from tests_django/base_case.py rename to .github/workflows/tests_django/base_case.py diff --git a/tests_django/test_chatbot.py b/.github/workflows/tests_django/test_chatbot.py similarity index 100% rename from tests_django/test_chatbot.py rename to .github/workflows/tests_django/test_chatbot.py diff --git a/tests_django/test_chatterbot_corpus_training.py b/.github/workflows/tests_django/test_chatterbot_corpus_training.py similarity index 100% rename from tests_django/test_chatterbot_corpus_training.py rename to .github/workflows/tests_django/test_chatterbot_corpus_training.py diff --git a/tests_django/test_chatterbot_settings.py b/.github/workflows/tests_django/test_chatterbot_settings.py similarity index 100% rename from tests_django/test_chatterbot_settings.py rename to .github/workflows/tests_django/test_chatterbot_settings.py diff --git a/tests_django/test_django_adapter.py b/.github/workflows/tests_django/test_django_adapter.py similarity index 100% rename from tests_django/test_django_adapter.py rename to .github/workflows/tests_django/test_django_adapter.py diff --git a/tests_django/test_logic_adapter_integration.py b/.github/workflows/tests_django/test_logic_adapter_integration.py similarity index 100% rename from tests_django/test_logic_adapter_integration.py rename to .github/workflows/tests_django/test_logic_adapter_integration.py diff --git a/tests_django/test_settings.py b/.github/workflows/tests_django/test_settings.py similarity index 100% rename from tests_django/test_settings.py rename to .github/workflows/tests_django/test_settings.py diff --git a/tests_django/test_statement_integration.py b/.github/workflows/tests_django/test_statement_integration.py similarity index 100% rename from tests_django/test_statement_integration.py rename to .github/workflows/tests_django/test_statement_integration.py From 6e4452f1c86a6f42ea3306c9859db9a3a3611bfa Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:52:58 -0700 Subject: [PATCH 33/72] Update codeql-analysis.yml --- .github/workflows/codeql-analysis.yml | 34 ++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 82f26ee24..4b8d53250 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -56,6 +56,34 @@ jobs: python3.9 -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - name: Run Tests - run: | - ./runtests.py \ No newline at end of file + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 \ No newline at end of file From a9325b1d641ec107667c9da8e76f6a81fb227d8c Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:53:03 -0700 Subject: [PATCH 34/72] Update django.yml --- .github/workflows/django.yml | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 3dce2af65..a751514bd 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -1,19 +1,21 @@ -#!/usr/bin/env python +name: "CodeQL" -import os -import sys +on: + push: + branches: [ master ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ master ] -import django -from django.conf import settings -from django.test.utils import get_runner - -if __name__ == '__main__': - os.environ['DJANGO_SETTINGS_MODULE'] = 'tests_django.test_settings' - django.setup() - TestRunner = get_runner(settings) - test_runner = TestRunner( - verbosity=2 - ) - failures = test_runner.run_tests(['tests_django']) - sys.exit(bool(failures)) +jobs: + analyze: + - name: Django + runs-on: self-hosted + permissions: + actions: read + contents: read + security-events: write + - name: Run Tests + run: | + ./runtests.py \ No newline at end of file From fbf0074cb192fbf25b730a06ebaa6950f0052a04 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:54:30 -0700 Subject: [PATCH 35/72] Update django.yml --- .github/workflows/django.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index a751514bd..e2af3378c 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -1,4 +1,4 @@ -name: "CodeQL" +name: "Django" on: push: @@ -9,13 +9,13 @@ on: jobs: analyze: - - name: Django + name: Django runs-on: self-hosted permissions: actions: read contents: read security-events: write - + steps: - name: Run Tests run: | ./runtests.py \ No newline at end of file From bc0760bc88beb142701b4f774b8fa1dba419a558 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:56:33 -0700 Subject: [PATCH 36/72] Update django.yml --- .github/workflows/django.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index e2af3378c..4b8a07592 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -10,12 +10,25 @@ on: jobs: analyze: name: Django - runs-on: self-hosted - permissions: - actions: read - contents: read - security-events: write + runs-on: self-hosted + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'python' ] + python-version: [ "3.7", "3.8", "3.9"] + + + steps: - name: Run Tests - run: | + if: "!endsWith(matrix.python-version, '-dev')" + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + run: | ./runtests.py \ No newline at end of file From cf621f8e4a0fe86f2962bf82032fade2eac5032f Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:57:57 -0700 Subject: [PATCH 37/72] Update django.yml --- .github/workflows/django.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 4b8a07592..da597310f 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -10,7 +10,7 @@ on: jobs: analyze: name: Django - runs-on: self-hosted + runs-on: ubuntu-latest permissions: actions: read contents: read @@ -27,8 +27,8 @@ jobs: steps: - name: Run Tests if: "!endsWith(matrix.python-version, '-dev')" - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} run: | - ./runtests.py \ No newline at end of file + python ./runtests.py test \ No newline at end of file From 26c30666d0547c4b288a9e23ad5ddfd2abaece38 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:58:59 -0700 Subject: [PATCH 38/72] Update django.yml --- .github/workflows/django.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index da597310f..81b8e8a94 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -10,8 +10,8 @@ on: jobs: analyze: name: Django - runs-on: ubuntu-latest - permissions: + runs-on: self-hosted + permissions: actions: read contents: read security-events: write From d5e22d764838694abc72a529704715184632e09d Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 18:59:45 -0700 Subject: [PATCH 39/72] Update django.yml --- .github/workflows/django.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 81b8e8a94..dee757dc1 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -27,7 +27,6 @@ jobs: steps: - name: Run Tests if: "!endsWith(matrix.python-version, '-dev')" - uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} run: | From 42305c02ec840cb938faa2c221ae43953a1de5b3 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:01:31 -0700 Subject: [PATCH 40/72] Update django.yml --- .github/workflows/django.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index dee757dc1..0d480df90 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -25,9 +25,12 @@ jobs: steps: - - name: Run Tests + - name: Python Versions if: "!endsWith(matrix.python-version, '-dev')" + uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + + - name: Run Tests run: | python ./runtests.py test \ No newline at end of file From 841b98654b51aeafc2ce7de0d130b0eea3b35326 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:02:03 -0700 Subject: [PATCH 41/72] Update django.yml --- .github/workflows/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 0d480df90..241bc29a6 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -10,7 +10,7 @@ on: jobs: analyze: name: Django - runs-on: self-hosted + runs-on: ubuntu-latest permissions: actions: read contents: read From e04a505d65a81ce105a9102af13e658d0a740a00 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:03:23 -0700 Subject: [PATCH 42/72] Moved django files --- .github/workflows/runtests.py => runtests.py | 0 {.github/workflows/tests => tests}/__init__.py | 0 {.github/workflows/tests => tests}/base_case.py | 0 {.github/workflows/tests => tests}/logic/__init__.py | 0 {.github/workflows/tests => tests}/logic/test_best_match.py | 0 {.github/workflows/tests => tests}/logic/test_data_cache.py | 0 {.github/workflows/tests => tests}/logic/test_logic_adapter.py | 0 .../tests => tests}/logic/test_mathematical_evaluation.py | 0 .../workflows/tests => tests}/logic/test_specific_response.py | 0 {.github/workflows/tests => tests}/logic/test_time.py | 0 {.github/workflows/tests => tests}/logic/test_unit_conversion.py | 0 {.github/workflows/tests => tests}/storage/__init__.py | 0 {.github/workflows/tests => tests}/storage/test_mongo_adapter.py | 0 {.github/workflows/tests => tests}/storage/test_sql_adapter.py | 0 .../workflows/tests => tests}/storage/test_storage_adapter.py | 0 {.github/workflows/tests => tests}/test_adapter_validation.py | 0 {.github/workflows/tests => tests}/test_benchmarks.py | 0 {.github/workflows/tests => tests}/test_chatbot.py | 0 {.github/workflows/tests => tests}/test_cli.py | 0 {.github/workflows/tests => tests}/test_comparisons.py | 0 {.github/workflows/tests => tests}/test_conversations.py | 0 {.github/workflows/tests => tests}/test_corpus.py | 0 {.github/workflows/tests => tests}/test_examples.py | 0 {.github/workflows/tests => tests}/test_filters.py | 0 {.github/workflows/tests => tests}/test_initialization.py | 0 {.github/workflows/tests => tests}/test_languages.py | 0 {.github/workflows/tests => tests}/test_parsing.py | 0 {.github/workflows/tests => tests}/test_preprocessors.py | 0 {.github/workflows/tests => tests}/test_response_selection.py | 0 {.github/workflows/tests => tests}/test_search.py | 0 {.github/workflows/tests => tests}/test_tagging.py | 0 {.github/workflows/tests => tests}/test_turing.py | 0 {.github/workflows/tests => tests}/test_utils.py | 0 {.github/workflows/tests => tests}/training/__init__.py | 0 .../tests => tests}/training/test_chatterbot_corpus_training.py | 0 .../workflows/tests => tests}/training/test_data/get_search.json | 0 {.github/workflows/tests => tests}/training/test_list_training.py | 0 {.github/workflows/tests => tests}/training/test_training.py | 0 .../tests => tests}/training/test_ubuntu_corpus_training.py | 0 {.github/workflows/tests_django => tests_django}/__init__.py | 0 {.github/workflows/tests_django => tests_django}/base_case.py | 0 {.github/workflows/tests_django => tests_django}/test_chatbot.py | 0 .../test_chatterbot_corpus_training.py | 0 .../tests_django => tests_django}/test_chatterbot_settings.py | 0 .../tests_django => tests_django}/test_django_adapter.py | 0 .../test_logic_adapter_integration.py | 0 {.github/workflows/tests_django => tests_django}/test_settings.py | 0 .../tests_django => tests_django}/test_statement_integration.py | 0 48 files changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/runtests.py => runtests.py (100%) rename {.github/workflows/tests => tests}/__init__.py (100%) rename {.github/workflows/tests => tests}/base_case.py (100%) rename {.github/workflows/tests => tests}/logic/__init__.py (100%) rename {.github/workflows/tests => tests}/logic/test_best_match.py (100%) rename {.github/workflows/tests => tests}/logic/test_data_cache.py (100%) rename {.github/workflows/tests => tests}/logic/test_logic_adapter.py (100%) rename {.github/workflows/tests => tests}/logic/test_mathematical_evaluation.py (100%) rename {.github/workflows/tests => tests}/logic/test_specific_response.py (100%) rename {.github/workflows/tests => tests}/logic/test_time.py (100%) rename {.github/workflows/tests => tests}/logic/test_unit_conversion.py (100%) rename {.github/workflows/tests => tests}/storage/__init__.py (100%) rename {.github/workflows/tests => tests}/storage/test_mongo_adapter.py (100%) rename {.github/workflows/tests => tests}/storage/test_sql_adapter.py (100%) rename {.github/workflows/tests => tests}/storage/test_storage_adapter.py (100%) rename {.github/workflows/tests => tests}/test_adapter_validation.py (100%) rename {.github/workflows/tests => tests}/test_benchmarks.py (100%) rename {.github/workflows/tests => tests}/test_chatbot.py (100%) rename {.github/workflows/tests => tests}/test_cli.py (100%) rename {.github/workflows/tests => tests}/test_comparisons.py (100%) rename {.github/workflows/tests => tests}/test_conversations.py (100%) rename {.github/workflows/tests => tests}/test_corpus.py (100%) rename {.github/workflows/tests => tests}/test_examples.py (100%) rename {.github/workflows/tests => tests}/test_filters.py (100%) rename {.github/workflows/tests => tests}/test_initialization.py (100%) rename {.github/workflows/tests => tests}/test_languages.py (100%) rename {.github/workflows/tests => tests}/test_parsing.py (100%) rename {.github/workflows/tests => tests}/test_preprocessors.py (100%) rename {.github/workflows/tests => tests}/test_response_selection.py (100%) rename {.github/workflows/tests => tests}/test_search.py (100%) rename {.github/workflows/tests => tests}/test_tagging.py (100%) rename {.github/workflows/tests => tests}/test_turing.py (100%) rename {.github/workflows/tests => tests}/test_utils.py (100%) rename {.github/workflows/tests => tests}/training/__init__.py (100%) rename {.github/workflows/tests => tests}/training/test_chatterbot_corpus_training.py (100%) rename {.github/workflows/tests => tests}/training/test_data/get_search.json (100%) rename {.github/workflows/tests => tests}/training/test_list_training.py (100%) rename {.github/workflows/tests => tests}/training/test_training.py (100%) rename {.github/workflows/tests => tests}/training/test_ubuntu_corpus_training.py (100%) rename {.github/workflows/tests_django => tests_django}/__init__.py (100%) rename {.github/workflows/tests_django => tests_django}/base_case.py (100%) rename {.github/workflows/tests_django => tests_django}/test_chatbot.py (100%) rename {.github/workflows/tests_django => tests_django}/test_chatterbot_corpus_training.py (100%) rename {.github/workflows/tests_django => tests_django}/test_chatterbot_settings.py (100%) rename {.github/workflows/tests_django => tests_django}/test_django_adapter.py (100%) rename {.github/workflows/tests_django => tests_django}/test_logic_adapter_integration.py (100%) rename {.github/workflows/tests_django => tests_django}/test_settings.py (100%) rename {.github/workflows/tests_django => tests_django}/test_statement_integration.py (100%) diff --git a/.github/workflows/runtests.py b/runtests.py similarity index 100% rename from .github/workflows/runtests.py rename to runtests.py diff --git a/.github/workflows/tests/__init__.py b/tests/__init__.py similarity index 100% rename from .github/workflows/tests/__init__.py rename to tests/__init__.py diff --git a/.github/workflows/tests/base_case.py b/tests/base_case.py similarity index 100% rename from .github/workflows/tests/base_case.py rename to tests/base_case.py diff --git a/.github/workflows/tests/logic/__init__.py b/tests/logic/__init__.py similarity index 100% rename from .github/workflows/tests/logic/__init__.py rename to tests/logic/__init__.py diff --git a/.github/workflows/tests/logic/test_best_match.py b/tests/logic/test_best_match.py similarity index 100% rename from .github/workflows/tests/logic/test_best_match.py rename to tests/logic/test_best_match.py diff --git a/.github/workflows/tests/logic/test_data_cache.py b/tests/logic/test_data_cache.py similarity index 100% rename from .github/workflows/tests/logic/test_data_cache.py rename to tests/logic/test_data_cache.py diff --git a/.github/workflows/tests/logic/test_logic_adapter.py b/tests/logic/test_logic_adapter.py similarity index 100% rename from .github/workflows/tests/logic/test_logic_adapter.py rename to tests/logic/test_logic_adapter.py diff --git a/.github/workflows/tests/logic/test_mathematical_evaluation.py b/tests/logic/test_mathematical_evaluation.py similarity index 100% rename from .github/workflows/tests/logic/test_mathematical_evaluation.py rename to tests/logic/test_mathematical_evaluation.py diff --git a/.github/workflows/tests/logic/test_specific_response.py b/tests/logic/test_specific_response.py similarity index 100% rename from .github/workflows/tests/logic/test_specific_response.py rename to tests/logic/test_specific_response.py diff --git a/.github/workflows/tests/logic/test_time.py b/tests/logic/test_time.py similarity index 100% rename from .github/workflows/tests/logic/test_time.py rename to tests/logic/test_time.py diff --git a/.github/workflows/tests/logic/test_unit_conversion.py b/tests/logic/test_unit_conversion.py similarity index 100% rename from .github/workflows/tests/logic/test_unit_conversion.py rename to tests/logic/test_unit_conversion.py diff --git a/.github/workflows/tests/storage/__init__.py b/tests/storage/__init__.py similarity index 100% rename from .github/workflows/tests/storage/__init__.py rename to tests/storage/__init__.py diff --git a/.github/workflows/tests/storage/test_mongo_adapter.py b/tests/storage/test_mongo_adapter.py similarity index 100% rename from .github/workflows/tests/storage/test_mongo_adapter.py rename to tests/storage/test_mongo_adapter.py diff --git a/.github/workflows/tests/storage/test_sql_adapter.py b/tests/storage/test_sql_adapter.py similarity index 100% rename from .github/workflows/tests/storage/test_sql_adapter.py rename to tests/storage/test_sql_adapter.py diff --git a/.github/workflows/tests/storage/test_storage_adapter.py b/tests/storage/test_storage_adapter.py similarity index 100% rename from .github/workflows/tests/storage/test_storage_adapter.py rename to tests/storage/test_storage_adapter.py diff --git a/.github/workflows/tests/test_adapter_validation.py b/tests/test_adapter_validation.py similarity index 100% rename from .github/workflows/tests/test_adapter_validation.py rename to tests/test_adapter_validation.py diff --git a/.github/workflows/tests/test_benchmarks.py b/tests/test_benchmarks.py similarity index 100% rename from .github/workflows/tests/test_benchmarks.py rename to tests/test_benchmarks.py diff --git a/.github/workflows/tests/test_chatbot.py b/tests/test_chatbot.py similarity index 100% rename from .github/workflows/tests/test_chatbot.py rename to tests/test_chatbot.py diff --git a/.github/workflows/tests/test_cli.py b/tests/test_cli.py similarity index 100% rename from .github/workflows/tests/test_cli.py rename to tests/test_cli.py diff --git a/.github/workflows/tests/test_comparisons.py b/tests/test_comparisons.py similarity index 100% rename from .github/workflows/tests/test_comparisons.py rename to tests/test_comparisons.py diff --git a/.github/workflows/tests/test_conversations.py b/tests/test_conversations.py similarity index 100% rename from .github/workflows/tests/test_conversations.py rename to tests/test_conversations.py diff --git a/.github/workflows/tests/test_corpus.py b/tests/test_corpus.py similarity index 100% rename from .github/workflows/tests/test_corpus.py rename to tests/test_corpus.py diff --git a/.github/workflows/tests/test_examples.py b/tests/test_examples.py similarity index 100% rename from .github/workflows/tests/test_examples.py rename to tests/test_examples.py diff --git a/.github/workflows/tests/test_filters.py b/tests/test_filters.py similarity index 100% rename from .github/workflows/tests/test_filters.py rename to tests/test_filters.py diff --git a/.github/workflows/tests/test_initialization.py b/tests/test_initialization.py similarity index 100% rename from .github/workflows/tests/test_initialization.py rename to tests/test_initialization.py diff --git a/.github/workflows/tests/test_languages.py b/tests/test_languages.py similarity index 100% rename from .github/workflows/tests/test_languages.py rename to tests/test_languages.py diff --git a/.github/workflows/tests/test_parsing.py b/tests/test_parsing.py similarity index 100% rename from .github/workflows/tests/test_parsing.py rename to tests/test_parsing.py diff --git a/.github/workflows/tests/test_preprocessors.py b/tests/test_preprocessors.py similarity index 100% rename from .github/workflows/tests/test_preprocessors.py rename to tests/test_preprocessors.py diff --git a/.github/workflows/tests/test_response_selection.py b/tests/test_response_selection.py similarity index 100% rename from .github/workflows/tests/test_response_selection.py rename to tests/test_response_selection.py diff --git a/.github/workflows/tests/test_search.py b/tests/test_search.py similarity index 100% rename from .github/workflows/tests/test_search.py rename to tests/test_search.py diff --git a/.github/workflows/tests/test_tagging.py b/tests/test_tagging.py similarity index 100% rename from .github/workflows/tests/test_tagging.py rename to tests/test_tagging.py diff --git a/.github/workflows/tests/test_turing.py b/tests/test_turing.py similarity index 100% rename from .github/workflows/tests/test_turing.py rename to tests/test_turing.py diff --git a/.github/workflows/tests/test_utils.py b/tests/test_utils.py similarity index 100% rename from .github/workflows/tests/test_utils.py rename to tests/test_utils.py diff --git a/.github/workflows/tests/training/__init__.py b/tests/training/__init__.py similarity index 100% rename from .github/workflows/tests/training/__init__.py rename to tests/training/__init__.py diff --git a/.github/workflows/tests/training/test_chatterbot_corpus_training.py b/tests/training/test_chatterbot_corpus_training.py similarity index 100% rename from .github/workflows/tests/training/test_chatterbot_corpus_training.py rename to tests/training/test_chatterbot_corpus_training.py diff --git a/.github/workflows/tests/training/test_data/get_search.json b/tests/training/test_data/get_search.json similarity index 100% rename from .github/workflows/tests/training/test_data/get_search.json rename to tests/training/test_data/get_search.json diff --git a/.github/workflows/tests/training/test_list_training.py b/tests/training/test_list_training.py similarity index 100% rename from .github/workflows/tests/training/test_list_training.py rename to tests/training/test_list_training.py diff --git a/.github/workflows/tests/training/test_training.py b/tests/training/test_training.py similarity index 100% rename from .github/workflows/tests/training/test_training.py rename to tests/training/test_training.py diff --git a/.github/workflows/tests/training/test_ubuntu_corpus_training.py b/tests/training/test_ubuntu_corpus_training.py similarity index 100% rename from .github/workflows/tests/training/test_ubuntu_corpus_training.py rename to tests/training/test_ubuntu_corpus_training.py diff --git a/.github/workflows/tests_django/__init__.py b/tests_django/__init__.py similarity index 100% rename from .github/workflows/tests_django/__init__.py rename to tests_django/__init__.py diff --git a/.github/workflows/tests_django/base_case.py b/tests_django/base_case.py similarity index 100% rename from .github/workflows/tests_django/base_case.py rename to tests_django/base_case.py diff --git a/.github/workflows/tests_django/test_chatbot.py b/tests_django/test_chatbot.py similarity index 100% rename from .github/workflows/tests_django/test_chatbot.py rename to tests_django/test_chatbot.py diff --git a/.github/workflows/tests_django/test_chatterbot_corpus_training.py b/tests_django/test_chatterbot_corpus_training.py similarity index 100% rename from .github/workflows/tests_django/test_chatterbot_corpus_training.py rename to tests_django/test_chatterbot_corpus_training.py diff --git a/.github/workflows/tests_django/test_chatterbot_settings.py b/tests_django/test_chatterbot_settings.py similarity index 100% rename from .github/workflows/tests_django/test_chatterbot_settings.py rename to tests_django/test_chatterbot_settings.py diff --git a/.github/workflows/tests_django/test_django_adapter.py b/tests_django/test_django_adapter.py similarity index 100% rename from .github/workflows/tests_django/test_django_adapter.py rename to tests_django/test_django_adapter.py diff --git a/.github/workflows/tests_django/test_logic_adapter_integration.py b/tests_django/test_logic_adapter_integration.py similarity index 100% rename from .github/workflows/tests_django/test_logic_adapter_integration.py rename to tests_django/test_logic_adapter_integration.py diff --git a/.github/workflows/tests_django/test_settings.py b/tests_django/test_settings.py similarity index 100% rename from .github/workflows/tests_django/test_settings.py rename to tests_django/test_settings.py diff --git a/.github/workflows/tests_django/test_statement_integration.py b/tests_django/test_statement_integration.py similarity index 100% rename from .github/workflows/tests_django/test_statement_integration.py rename to tests_django/test_statement_integration.py From f017d4e09f57539dcac6cbf94b0beeb380957f59 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:04:23 -0700 Subject: [PATCH 43/72] Update django.yml --- .github/workflows/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 241bc29a6..a620bc5cf 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -33,4 +33,4 @@ jobs: - name: Run Tests run: | - python ./runtests.py test \ No newline at end of file + python manage.py test \ No newline at end of file From 3e45d53836992b52f3d03c8570a75c8e4a2f535e Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:04:57 -0700 Subject: [PATCH 44/72] Update django.yml --- .github/workflows/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index a620bc5cf..ad0f31b81 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -33,4 +33,4 @@ jobs: - name: Run Tests run: | - python manage.py test \ No newline at end of file + python runtests.py test \ No newline at end of file From 2aeae6881c15336601b8ffa6b6acc7457795946a Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:06:48 -0700 Subject: [PATCH 45/72] Update django.yml --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index ad0f31b81..6071a6949 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -33,4 +33,5 @@ jobs: - name: Run Tests run: | + git clone https://github.com/batman202012/ChatterBot/ python runtests.py test \ No newline at end of file From 1a492522c93fcad51d5eda906150bc0efb7e733c Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:07:33 -0700 Subject: [PATCH 46/72] Update django.yml --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 6071a6949..180dcbe9c 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -34,4 +34,5 @@ jobs: - name: Run Tests run: | git clone https://github.com/batman202012/ChatterBot/ + cd ./ChatterBot python runtests.py test \ No newline at end of file From 8a30b866c2bade4fa444cb11daf7da60ca6665dc Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:08:57 -0700 Subject: [PATCH 47/72] Fixed pip dependencies for django --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 180dcbe9c..ddc763565 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -34,5 +34,6 @@ jobs: - name: Run Tests run: | git clone https://github.com/batman202012/ChatterBot/ + pip install django cd ./ChatterBot python runtests.py test \ No newline at end of file From 9855077556622555ea50d3d2daa4e8cce49cb909 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:09:30 -0700 Subject: [PATCH 48/72] Update django.yml --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index ddc763565..2f6055f2f 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -35,5 +35,6 @@ jobs: run: | git clone https://github.com/batman202012/ChatterBot/ pip install django + pip install pytz cd ./ChatterBot python runtests.py test \ No newline at end of file From cc761e846c880a5c5df4c59d1dc73761ad813efb Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:11:15 -0700 Subject: [PATCH 49/72] Update django.yml --- .github/workflows/django.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 2f6055f2f..817561938 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -30,11 +30,14 @@ jobs: uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Run Tests run: | git clone https://github.com/batman202012/ChatterBot/ - pip install django - pip install pytz cd ./ChatterBot python runtests.py test \ No newline at end of file From 0557407a50a9c08f4b5dbbb758fda1e3bd4acfc4 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:12:02 -0700 Subject: [PATCH 50/72] Update django.yml --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 817561938..c3061d57d 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -33,6 +33,7 @@ jobs: - name: Install dependencies run: | + pip install django python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi From 621e75ff27e6e81ccfa89fe960aa5203d3377a58 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:12:36 -0700 Subject: [PATCH 51/72] Update django.yml --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index c3061d57d..c76e501f9 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -34,6 +34,7 @@ jobs: - name: Install dependencies run: | pip install django + pip install pytz python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi From b7d770debf09c2b2052fadcf6cc29e44fa772a2a Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:13:34 -0700 Subject: [PATCH 52/72] Update django.yml --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index c76e501f9..f604a6e10 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -35,6 +35,7 @@ jobs: run: | pip install django pip install pytz + pip install dateutil python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi From c6c62a759155a0e5440c1090de4ea8cb3cc946ce Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:14:29 -0700 Subject: [PATCH 53/72] Update django.yml --- .github/workflows/django.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index f604a6e10..85eac36e0 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -35,7 +35,7 @@ jobs: run: | pip install django pip install pytz - pip install dateutil + pip install python-dateutil python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi From 001429f5e3073df862e3db65df42ab6a99b3b92b Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:15:05 -0700 Subject: [PATCH 54/72] Update django.yml --- .github/workflows/django.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 85eac36e0..44d46b90b 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -36,6 +36,7 @@ jobs: pip install django pip install pytz pip install python-dateutil + pip install mathparse python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi From 1d0988bd14c5b1a529360f2262d5c7666a364575 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:17:28 -0700 Subject: [PATCH 55/72] Update django.yml --- .github/workflows/django.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 44d46b90b..b7cf8cd6e 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -31,8 +31,14 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Clone Repository + run: | + git clone https://github.com/batman202012/ChatterBot/ + cd ./ChatterBot + - name: Install dependencies run: | + cd ./ChatterBot pip install django pip install pytz pip install python-dateutil @@ -42,6 +48,5 @@ jobs: - name: Run Tests run: | - git clone https://github.com/batman202012/ChatterBot/ cd ./ChatterBot python runtests.py test \ No newline at end of file From 59154cf2245aa1cc5a0a8be2c68f4394bf16ca4d Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:21:57 -0700 Subject: [PATCH 56/72] Added download for spacy models --- .github/workflows/django.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index b7cf8cd6e..342ba6d98 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -43,6 +43,10 @@ jobs: pip install pytz pip install python-dateutil pip install mathparse + python -m spacy download en_core_web_sm + python -m spacy download en_core_web_md + python -m spacy download en_core_web_lg + python -m spacy download en_core_web_trf python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi From d17ed78ceaf37a6c2d0a8c27ee7edce2210c290f Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:25:29 -0700 Subject: [PATCH 57/72] Update django.yml --- .github/workflows/django.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 342ba6d98..4bf4dba59 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -43,12 +43,12 @@ jobs: pip install pytz pip install python-dateutil pip install mathparse - python -m spacy download en_core_web_sm - python -m spacy download en_core_web_md - python -m spacy download en_core_web_lg - python -m spacy download en_core_web_trf python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + python -m spacy[cuda117] download en_core_web_sm + python -m spacy[cuda117] download en_core_web_md + python -m spacy[cuda117] download en_core_web_lg + python -m spacy[cuda117] download en_core_web_trf - name: Run Tests run: | From a0277686feefc6ab47cfaf6429984140ebefee12 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 19:27:16 -0700 Subject: [PATCH 58/72] Update django.yml --- .github/workflows/django.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 4bf4dba59..e4afd52e6 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -45,10 +45,10 @@ jobs: pip install mathparse python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - python -m spacy[cuda117] download en_core_web_sm - python -m spacy[cuda117] download en_core_web_md - python -m spacy[cuda117] download en_core_web_lg - python -m spacy[cuda117] download en_core_web_trf + python -m spacy download en_core_web_sm + python -m spacy download en_core_web_md + python -m spacy download en_core_web_lg + python -m spacy download en_core_web_trf - name: Run Tests run: | From f39a0370fe6a2a1a0ee841e61c810d114537f2b1 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 23:40:27 -0700 Subject: [PATCH 59/72] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 00c30fffc..4b2c3fa0b 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ known conversations. The language independent design of ChatterBot allows it to be trained to speak any language. [![Package Version](https://img.shields.io/pypi/v/chatterbot.svg)](https://pypi.python.org/pypi/chatterbot/) -[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/) +[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/) [![Django 2.0](https://img.shields.io/badge/Django-2.0-blue.svg)](https://docs.djangoproject.com/en/2.1/releases/2.0/) [![Requirements Status](https://requires.io/github/gunthercox/ChatterBot/requirements.svg?branch=master)](https://requires.io/github/gunthercox/ChatterBot/requirements/?branch=master) -[![Build Status](https://travis-ci.org/gunthercox/ChatterBot.svg?branch=master)](https://travis-ci.org/gunthercox/ChatterBot) +[![Build Status](https://github.com/batman202012/ChatterBot/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/batman202012/ChatterBot/actions/workflows/codeql-analysis.yml) [![Documentation Status](https://readthedocs.org/projects/chatterbot/badge/?version=stable)](http://chatterbot.readthedocs.io/en/stable/?badge=stable) [![Coverage Status](https://img.shields.io/coveralls/gunthercox/ChatterBot.svg)](https://coveralls.io/r/gunthercox/ChatterBot) [![Code Climate](https://codeclimate.com/github/gunthercox/ChatterBot/badges/gpa.svg)](https://codeclimate.com/github/gunthercox/ChatterBot) From 9084b6d30e683dc748145052f66a139d7e07d8e2 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 23:43:10 -0700 Subject: [PATCH 60/72] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4b2c3fa0b..e43a5c080 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ to be trained to speak any language. [![Package Version](https://img.shields.io/pypi/v/chatterbot.svg)](https://pypi.python.org/pypi/chatterbot/) [![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/) [![Django 2.0](https://img.shields.io/badge/Django-2.0-blue.svg)](https://docs.djangoproject.com/en/2.1/releases/2.0/) -[![Requirements Status](https://requires.io/github/gunthercox/ChatterBot/requirements.svg?branch=master)](https://requires.io/github/gunthercox/ChatterBot/requirements/?branch=master) +[![Requirements Status](https://requires.io/github/batman202012/ChatterBot/requirements.svg?branch=master)](https://requires.io/github/batman202012/ChatterBot/requirements/?branch=master) [![Build Status](https://github.com/batman202012/ChatterBot/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/batman202012/ChatterBot/actions/workflows/codeql-analysis.yml) [![Documentation Status](https://readthedocs.org/projects/chatterbot/badge/?version=stable)](http://chatterbot.readthedocs.io/en/stable/?badge=stable) [![Coverage Status](https://img.shields.io/coveralls/gunthercox/ChatterBot.svg)](https://coveralls.io/r/gunthercox/ChatterBot) From 20a468c25fcf4201644ff531d274f6f6f1771fa3 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 23:45:20 -0700 Subject: [PATCH 61/72] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index eda29c423..c587efe63 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sqlalchemy>=1.4.20 pytz spacy[cuda117]>=3.4.1 # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps -typer>=0.4.0,<0.5.0 +typer>=0.6.1 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 cupy-cuda117<11.0.0 From 57b60eb3fc3722ffaacba03f6f448a778bb0fcfc Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 23:46:18 -0700 Subject: [PATCH 62/72] Delete django.yml --- .github/workflows/django.yml | 56 ------------------------------------ 1 file changed, 56 deletions(-) delete mode 100644 .github/workflows/django.yml diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml deleted file mode 100644 index e4afd52e6..000000000 --- a/.github/workflows/django.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: "Django" - -on: - push: - branches: [ master ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master ] - -jobs: - analyze: - name: Django - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'python' ] - python-version: [ "3.7", "3.8", "3.9"] - - - - steps: - - name: Python Versions - if: "!endsWith(matrix.python-version, '-dev')" - uses: actions/setup-python@v3 - with: - python-version: ${{ matrix.python-version }} - - - name: Clone Repository - run: | - git clone https://github.com/batman202012/ChatterBot/ - cd ./ChatterBot - - - name: Install dependencies - run: | - cd ./ChatterBot - pip install django - pip install pytz - pip install python-dateutil - pip install mathparse - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - python -m spacy download en_core_web_sm - python -m spacy download en_core_web_md - python -m spacy download en_core_web_lg - python -m spacy download en_core_web_trf - - - name: Run Tests - run: | - cd ./ChatterBot - python runtests.py test \ No newline at end of file From a4f959b4c505707943c50d4fa284ef2feda97b63 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 23:48:01 -0700 Subject: [PATCH 63/72] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index c587efe63..23d1cc89d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ typer>=0.6.1 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 cupy-cuda117<11.0.0 +Django>=4.0 From 492215e1df073c27aa34a38012d1cc67f58e9878 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 23:48:52 -0700 Subject: [PATCH 64/72] Update requirements.txt --- examples/django_app/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/django_app/requirements.txt b/examples/django_app/requirements.txt index 82bf00052..ec12c99d7 100644 --- a/examples/django_app/requirements.txt +++ b/examples/django_app/requirements.txt @@ -1,2 +1,2 @@ -django>=2.2,<2.3 +django>=4.0 # chatterbot>=0.8,<1.1 From 50b1be27415c7e48673a8e950a74229d07df09fd Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 23:49:06 -0700 Subject: [PATCH 65/72] Update requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 23d1cc89d..c587efe63 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,4 +8,3 @@ typer>=0.6.1 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 cupy-cuda117<11.0.0 -Django>=4.0 From 62a0cbe83abf0900d158d1f124aa5e7a2cee4a55 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 17 Aug 2022 23:51:23 -0700 Subject: [PATCH 66/72] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e43a5c080..29e6d62e3 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ to be trained to speak any language. [![Package Version](https://img.shields.io/pypi/v/chatterbot.svg)](https://pypi.python.org/pypi/chatterbot/) [![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/) -[![Django 2.0](https://img.shields.io/badge/Django-2.0-blue.svg)](https://docs.djangoproject.com/en/2.1/releases/2.0/) +[![Django 4.0](https://img.shields.io/badge/Django-4.0-blue.svg)](https://docs.djangoproject.com/en/4.0/releases/4.0/) [![Requirements Status](https://requires.io/github/batman202012/ChatterBot/requirements.svg?branch=master)](https://requires.io/github/batman202012/ChatterBot/requirements/?branch=master) [![Build Status](https://github.com/batman202012/ChatterBot/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/batman202012/ChatterBot/actions/workflows/codeql-analysis.yml) [![Documentation Status](https://readthedocs.org/projects/chatterbot/badge/?version=stable)](http://chatterbot.readthedocs.io/en/stable/?badge=stable) From 5274dd3d278a9cf18f8603e8c040a15656ec1e8d Mon Sep 17 00:00:00 2001 From: Joseph Date: Tue, 23 Aug 2022 12:19:12 -0700 Subject: [PATCH 67/72] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c587efe63..7149a7ee3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sqlalchemy>=1.4.20 pytz spacy[cuda117]>=3.4.1 # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps -typer>=0.6.1 +typer<=0.5 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 cupy-cuda117<11.0.0 From 8ff262a778a795e865257d0f7645bc5357bce2df Mon Sep 17 00:00:00 2001 From: Joseph Date: Tue, 23 Aug 2022 12:19:56 -0700 Subject: [PATCH 68/72] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7149a7ee3..c587efe63 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sqlalchemy>=1.4.20 pytz spacy[cuda117]>=3.4.1 # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps -typer<=0.5 +typer>=0.6.1 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 cupy-cuda117<11.0.0 From 93f17e8986d5c63fb1afcd334794d528f260e796 Mon Sep 17 00:00:00 2001 From: Joseph Date: Sat, 3 Sep 2022 13:31:57 -0700 Subject: [PATCH 69/72] Update requirements.txt --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c587efe63..09a854f55 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ sqlalchemy>=1.4.20 pytz spacy[cuda117]>=3.4.1 # this requirement for typer should be ditched once spacy stop supporting or red change and take in account installed lib version to install cogs deps -typer>=0.6.1 +typer<0.5.0 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 cupy-cuda117<11.0.0 From 6e796c49c43ed6a2d8fe8993f1e9b6b87cc91410 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 14 Sep 2022 09:02:32 -0700 Subject: [PATCH 70/72] Run actions on github --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/main.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 4b8d53250..2ed8d63df 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -23,7 +23,7 @@ on: jobs: analyze: name: Analyze - runs-on: self-hosted + runs-on: ubuntu-latest permissions: actions: read contents: read diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7383ec966..9565b0abb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,8 +18,7 @@ permissions: jobs: build: - - runs-on: self-hosted + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 14ee51ac4e9ff35fe40914ad68c484a18ddc511d Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 16 Nov 2022 08:16:53 -0700 Subject: [PATCH 71/72] Updated codeql workflow to not try to use python3.9 --- .github/workflows/codeql-analysis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2ed8d63df..7b43fb181 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -53,7 +53,7 @@ jobs: - name: Install dependencies run: | - python3.9 -m pip install --upgrade pip + python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Checkout repository @@ -86,4 +86,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 \ No newline at end of file + uses: github/codeql-action/analyze@v2 From af2450a9d3de6b6d5ae53ba41c39b9a09e5e90c3 Mon Sep 17 00:00:00 2001 From: batman202012 Date: Fri, 16 Dec 2022 11:13:17 -0700 Subject: [PATCH 72/72] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 09a854f55..ff2222692 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,3 +8,4 @@ typer<0.5.0 nvidia-pyindex>=1.0.9 torch>=1.12.0+cu116 cupy-cuda117<11.0.0 +thinc==8.1.0 \ No newline at end of file