Skip to content

(temporary) Creates 2 databases, uses one of them in json file creation.#23

Draft
KajusC wants to merge 4 commits intomainfrom
Duomenu-bazes-implementavimas
Draft

(temporary) Creates 2 databases, uses one of them in json file creation.#23
KajusC wants to merge 4 commits intomainfrom
Duomenu-bazes-implementavimas

Conversation

@KajusC
Copy link
Contributor

@KajusC KajusC commented May 21, 2025

No description provided.

@KajusC
Copy link
Contributor Author

KajusC commented May 21, 2025

image

import sqlite3
from typing import List, Dict, Any

BASE_OUTPUT_DIR = os.path.join(os.path.expanduser("~"), ".kath", "shared", "data", "blast_results")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use constants from constants.py


#++++++++++++++++++++++++++++++++++++++++++++++++
# Takes in Json file and returns db file
db_file = json_to_db(result_file)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what for db_file is used? If you dont use for anything, dont apply for anything

logger = logging.getLogger(__name__)

# Always use this database file
BASE_OUTPUT_DIR = os.path.join(os.path.expanduser("~"), ".kath", "shared", "data", "blast_results")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be from constants.py

Comment on lines +13 to +15
BASE_OUTPUT_DIR = os.path.join(os.path.expanduser("~"), ".kath", "shared", "data", "blast_results")
DB_FILENAME = "xml.db"
SQLITE_DB_FILE = os.path.join(BASE_OUTPUT_DIR, DB_FILENAME)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constants 😅

*.sln
*.sw? No newline at end of file
*.sw?
backend/src/services/remote/blast_service/align2.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this here? Remove it

Comment on lines +18 to 21
from shared.constants import (
PROGRAM_STORAGE_DIR_SHARED_BLAST,
PROGRAM_STORAGE_DIR_SHARED_DATA_FASTA,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from shared.constants import (
PROGRAM_STORAGE_DIR_SHARED_BLAST,
PROGRAM_STORAGE_DIR_SHARED_DATA_FASTA,
)
from shared import PROGRAM_STORAGE_DIR_SHARED_BLAST, PROGRAM_STORAGE_DIR_SHARED_DATA_FASTA

Comment on lines +208 to +209
import os
import sqlite3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imports at the middle of a file? Relocate to the top of the file where imports should be


import os
import sqlite3
from typing import List, Dict, Any
Copy link
Member

@mantvydasdeltuva mantvydasdeltuva May 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate from typing, remove it

from dotenv import load_dotenv

from src.utils.logger import get_logger
from utils.logger import get_logger
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from utils.logger import get_logger
from utils import get_logger

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants