Compare commits

..
2 Commits
Author SHA1 Message Date
Brian Bjarke Jensen e3e836c9fa fixed imports
Code Quality Pipeline / Test (push) Failing after 4m41s
CI Pipeline / Test (pull_request) Failing after 3m43s
CI Pipeline / Build and Publish (pull_request) Has been skipped
2024-05-07 21:22:25 +02:00
Brian Bjarke Jensen 9a625cb6be updated CI script 2024-05-07 21:21:52 +02:00
6 changed files with 15 additions and 11 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ jobs:
poetry install
- name: PEP8 Check
run: |
poetry run flake8 ./src --benchmark
poetry run flake8 . --benchmark
- name: Type Check
run: |
poetry run mypy ./src --disable-error-code=import-untyped
poetry run mypy . --disable-error-code=import-untyped
+1 -2
View File
@@ -6,10 +6,9 @@ from pathlib import Path
import pandas as pd
import requests
from classes import Instagram
from retry import retry
from image_download.classes import Instagram
def get_sources() -> pd.DataFrame:
"""Get sources dateframe."""
+4 -1
View File
@@ -11,6 +11,9 @@ if __name__ == '__main__':
in range(3)
]
# generate random predictions
[vis_com.generate_random_prediction() for vis_com in vis_com_list]
[
vis_com.generate_random_prediction()
for vis_com in vis_com_list
] # type: ignore
for vis_com in vis_com_list:
print(vis_com)
+2 -2
View File
@@ -7,7 +7,7 @@ from pathlib import Path
from dotenv import load_dotenv
from core.database import connect
from core.database import upsert_predictions
from core.database import upsert_prediction
from core.database.classes import VisualCommunication
if __name__ == '__main__':
@@ -45,7 +45,7 @@ if __name__ == '__main__':
for vis_com in vis_com_list:
if vis_com.prediction is None:
continue
upsert_predictions(
upsert_prediction(
collection=collection,
vis_com_name=vis_com.name,
predictions=vis_com.prediction,
+3 -2
View File
@@ -6,7 +6,7 @@ from pathlib import Path
from dotenv import load_dotenv
from core.database import connect
from core.database import total_documents
from core.database import count_documents
if __name__ == '__main__':
# prepare env vars
@@ -17,7 +17,8 @@ if __name__ == '__main__':
# connect to database
collection, db, client = connect()
# get visual communication
num_docs = total_documents(
num_docs = count_documents(
collection=collection,
only_with_annotation=True,
)
print(f"number of annotated documents in database: {num_docs}")
+3 -2
View File
@@ -6,7 +6,7 @@ from pathlib import Path
from dotenv import load_dotenv
from core.database import connect
from core.database import total_documents
from core.database import count_documents
if __name__ == '__main__':
# prepare env vars
@@ -17,7 +17,8 @@ if __name__ == '__main__':
# connect to database
collection, db, client = connect()
# get visual communication
num_docs = total_documents(
num_docs = count_documents(
collection=collection,
only_with_annotation=False,
)
print(f"total number of documents in database: {num_docs}")