fixed mypy types
CI Pipeline / Test (pull_request) Successful in 2m23s
CI Pipeline / Build and Publish (./Dockerfile.model, ${{ vars.docker_repo_url }}/${{ gitea.repository }}/model) (pull_request) Successful in 7m3s
CI Pipeline / Build and Publish (./Dockerfile.web_ui, ${{ vars.docker_repo_url }}/${{ gitea.repository }}/web_ui) (pull_request) Successful in 6m13s
CI Pipeline / Test (pull_request) Successful in 2m23s
CI Pipeline / Build and Publish (./Dockerfile.model, ${{ vars.docker_repo_url }}/${{ gitea.repository }}/model) (pull_request) Successful in 7m3s
CI Pipeline / Build and Publish (./Dockerfile.web_ui, ${{ vars.docker_repo_url }}/${{ gitea.repository }}/web_ui) (pull_request) Successful in 6m13s
This commit is contained in:
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from shared.data_store import connect_minio
|
||||
from shared.database import connect as connect_mongo
|
||||
from shared.database import connect_mongodb
|
||||
from shared.database.classes import VisualCommunication
|
||||
from shared.utils import check_env, setup_logging
|
||||
|
||||
@@ -21,7 +21,7 @@ if __name__ == '__main__':
|
||||
# connect to minIO
|
||||
minio_client = connect_minio()
|
||||
# connect to MongoDB
|
||||
collection, db, client = connect_mongo()
|
||||
collection, db, client = connect_mongodb()
|
||||
# get list of image paths
|
||||
test_dir = Path(__file__).parent
|
||||
img_dir = test_dir / 'imgs'
|
||||
|
||||
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from shared.data_store import connect_minio
|
||||
from shared.database import connect, get_visual_communication
|
||||
from shared.database import connect_mongodb, get_visual_communication
|
||||
from shared.utils import check_env, setup_logging
|
||||
|
||||
if __name__ == '__main__':
|
||||
@@ -20,7 +20,7 @@ if __name__ == '__main__':
|
||||
# connect to minIO
|
||||
minio_client = connect_minio()
|
||||
# connect to MongoDB
|
||||
collection, db, client = connect()
|
||||
collection, db, client = connect_mongodb()
|
||||
# get visual communication
|
||||
vis_com = get_visual_communication(collection)
|
||||
print(repr(vis_com))
|
||||
|
||||
@@ -6,7 +6,7 @@ from dotenv import load_dotenv
|
||||
from pymongo.errors import DuplicateKeyError
|
||||
|
||||
from shared.data_store import connect_minio
|
||||
from shared.database import connect as connect_mongo
|
||||
from shared.database import connect_mongodb
|
||||
from shared.database.classes import VisualCommunication
|
||||
from shared.utils import check_env, setup_logging
|
||||
|
||||
@@ -22,7 +22,7 @@ if __name__ == '__main__':
|
||||
# connect to minIO
|
||||
minio_client = connect_minio()
|
||||
# connect to MongoDB
|
||||
collection, db, client = connect_mongo()
|
||||
collection, db, client = connect_mongodb()
|
||||
# get list of image paths
|
||||
test_dir = Path(__file__).parent
|
||||
img_dir = test_dir / 'imgs'
|
||||
|
||||
@@ -6,8 +6,7 @@ from dotenv import load_dotenv
|
||||
from pymongo.errors import DuplicateKeyError
|
||||
|
||||
from shared.data_store import connect_minio
|
||||
from shared.database import VisualCommunication
|
||||
from shared.database import connect as connect_mongo
|
||||
from shared.database import VisualCommunication, connect_mongodb
|
||||
from shared.utils import check_env, setup_logging
|
||||
|
||||
if __name__ == '__main__':
|
||||
@@ -22,7 +21,7 @@ if __name__ == '__main__':
|
||||
# connect to minIO
|
||||
minio_client = connect_minio()
|
||||
# connect to MongoDB
|
||||
collection, db, client = connect_mongo()
|
||||
collection, db, client = connect_mongodb()
|
||||
# get list of image paths
|
||||
ext_img_dir = Path('/Volumes/BW-PSSD/Mixed Methods/')
|
||||
assert ext_img_dir.exists()
|
||||
|
||||
@@ -5,8 +5,7 @@ from pathlib import Path
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from shared.data_store import connect_minio
|
||||
from shared.database import connect as connect_mongo
|
||||
from shared.database import upsert_prediction
|
||||
from shared.database import connect_mongodb, upsert_prediction
|
||||
from shared.database.classes import VisualCommunication
|
||||
from shared.utils import check_env, setup_logging
|
||||
|
||||
@@ -22,7 +21,7 @@ if __name__ == '__main__':
|
||||
# connect to minIO
|
||||
minio_client = connect_minio()
|
||||
# connect to MongoDB
|
||||
collection, db, client = connect_mongo()
|
||||
collection, db, client = connect_mongodb()
|
||||
# get list of image paths
|
||||
test_dir = Path(__file__).parent
|
||||
img_dir = test_dir / 'imgs'
|
||||
|
||||
@@ -5,8 +5,7 @@ from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from shared.database import connect
|
||||
from shared.database import count_documents
|
||||
from shared.database import connect_mongodb, count_documents
|
||||
|
||||
if __name__ == '__main__':
|
||||
# prepare env vars
|
||||
@@ -15,7 +14,7 @@ if __name__ == '__main__':
|
||||
load_dotenv(env_path)
|
||||
os.environ['MONGO_HOST'] = 'localhost'
|
||||
# connect to database
|
||||
collection, db, client = connect()
|
||||
collection, db, client = connect_mongodb()
|
||||
# get visual communication
|
||||
num_docs = count_documents(
|
||||
collection=collection,
|
||||
|
||||
@@ -5,8 +5,7 @@ from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from shared.database import connect
|
||||
from shared.database import count_documents
|
||||
from shared.database import connect_mongodb, count_documents
|
||||
|
||||
if __name__ == '__main__':
|
||||
# prepare env vars
|
||||
@@ -15,7 +14,7 @@ if __name__ == '__main__':
|
||||
load_dotenv(env_path)
|
||||
os.environ['MONGO_HOST'] = 'localhost'
|
||||
# connect to database
|
||||
collection, db, client = connect()
|
||||
collection, db, client = connect_mongodb()
|
||||
# get visual communication
|
||||
num_docs = count_documents(
|
||||
collection=collection,
|
||||
|
||||
Reference in New Issue
Block a user