changed folder name to avoid accidental running during test

This commit is contained in:
brian
2024-10-20 18:30:59 +00:00
parent bdc0535ea4
commit b462056e24
14 changed files with 2 additions and 10 deletions
+23
View File
@@ -0,0 +1,23 @@
from __future__ import annotations
import os
from pathlib import Path
from dotenv import load_dotenv
from shared.database import connect_mongodb, count_documents
if __name__ == '__main__':
# prepare env vars
env_path = Path(__file__).parent.parent / 'local.env'
assert env_path.exists()
load_dotenv(env_path)
os.environ['MONGO_HOST'] = 'localhost'
# connect to database
collection, db, client = connect_mongodb()
# get visual communication
num_docs = count_documents(
collection=collection,
only_with_annotation=True,
)
print(f"number of annotated documents in database: {num_docs}")