From 4767f74cd972168b672dcfd210a674a012d455aa Mon Sep 17 00:00:00 2001 From: nsde Date: Thu, 17 Aug 2023 16:47:54 +0200 Subject: [PATCH] Small improvements --- screen.sh | 3 +++ tests/__main__.py | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/screen.sh b/screen.sh index 5f4af30..05f16fb 100755 --- a/screen.sh +++ b/screen.sh @@ -1,5 +1,8 @@ # Script to start the production server +# Commit to the production branch +git commit -am "Auto-trigger - Production server started" && git push origin Production + # Copy files to production cp -r * /home/nova-prod diff --git a/tests/__main__.py b/tests/__main__.py index 500ae92..c01fef9 100644 --- a/tests/__main__.py +++ b/tests/__main__.py @@ -4,6 +4,7 @@ import os import openai as closedai import httpx +from rich import print from typing import List from dotenv import load_dotenv @@ -100,19 +101,19 @@ def test_api_moderation() -> dict: def test_all(): """Runs all tests.""" - print('Running test on API server to check if its running..') + print('[lightblue]Running test on API server to check if its running...') print(test_server()) - print('Running a api endpoint to see if requests can go through...') + print('[lightblue]Running a api endpoint to see if requests can go through...') print(test_api()) - print('Checking if the API works with the python library...') + print('[lightblue]Checking if the API works with the python library...') print(test_library()) - print('Checking if the moderation endpoint works...') + print('[lightblue]Checking if the moderation endpoint works...') print(test_library_moderation()) - print('Checking if all models can be GET') + print('[lightblue]Checking the /v1/models endpoint...') print(test_models()) if __name__ == '__main__':