Skip to content

Commit

Permalink
remove logging
Browse files Browse the repository at this point in the history
  • Loading branch information
avrohomgottlieb committed Dec 8, 2024
1 parent 785ded5 commit 69e8a79
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 38 deletions.
5 changes: 1 addition & 4 deletions api/scpca_portal/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from django.template.defaultfilters import pluralize

from scpca_portal import metadata_file, s3
from scpca_portal.config.logging import configure_runtime_logging, get_and_configure_logger
from scpca_portal.config.logging import get_and_configure_logger
from scpca_portal.models import (
ComputedFile,
Contact,
Expand All @@ -19,7 +19,6 @@
)

logger = get_and_configure_logger(__name__)
log_runtime = configure_runtime_logging(logger)


def prep_data_dirs(wipe_input_dir: bool = False, wipe_output_dir: bool = True) -> None:
Expand Down Expand Up @@ -143,7 +142,6 @@ def create_project(
return project


@log_runtime
def _create_computed_file(
computed_file: ComputedFile, update_s3: bool, clean_up_output_data: bool
) -> None:
Expand Down Expand Up @@ -174,7 +172,6 @@ def _create_computed_file_callback(future, *, update_s3: bool, clean_up_output_d
connection.close()


@log_runtime
def generate_computed_file(
*,
download_config: Dict,
Expand Down
29 changes: 0 additions & 29 deletions api/scpca_portal/management/commands/download_input_files.py

This file was deleted.

7 changes: 2 additions & 5 deletions api/scpca_portal/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
import boto3
from botocore.client import Config

from scpca_portal.config.logging import configure_runtime_logging, get_and_configure_logger
from scpca_portal.config.logging import get_and_configure_logger

logger = get_and_configure_logger(__name__)
log_runtime = configure_runtime_logging(logger)

aws_s3 = boto3.client("s3", config=Config(signature_version="s3v4"))


Expand Down Expand Up @@ -82,7 +80,6 @@ def list_input_paths(
return file_paths


@log_runtime
def download_input_files(file_paths: List[Path], bucket_name: str) -> bool:
"""Download all passed data file paths which have not previously been downloaded.'"""

Expand All @@ -99,7 +96,7 @@ def download_input_files(file_paths: List[Path], bucket_name: str) -> bool:
bucket_path = Path(file_path.parts[0])

if len(file_path.parts) > 2:
bucket_path = bucket_path / file_path.parts[1]
bucket_path /= file_path.parts[1]

download_queue[bucket_path].append(file_path.relative_to(bucket_path))

Expand Down

0 comments on commit 69e8a79

Please sign in to comment.