Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo committed Nov 21, 2023
1 parent d179b12 commit 50b16e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 2 additions & 1 deletion sdv/datasets/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import pandas as pd
from botocore import UNSIGNED
from botocore.client import Config
from botocore.exceptions import ClientError

from sdv.metadata.multi_table import MultiTableMetadata
from sdv.metadata.single_table import SingleTableMetadata
Expand Down Expand Up @@ -51,7 +52,7 @@ def _download(modality, dataset_name):
LOGGER.info(f'Downloading dataset {dataset_name} from {dataset_url}')
try:
file_content = _get_data_from_bucket(object_key)
except Exception:
except ClientError:
raise ValueError(
f"Invalid dataset name '{dataset_name}'. "
'Make sure you have the correct modality for the dataset name or '
Expand Down
6 changes: 0 additions & 6 deletions tests/unit/datasets/test_demo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import os
import re
from unittest.mock import MagicMock, Mock, patch

Expand Down Expand Up @@ -66,11 +65,6 @@ def test_download_demo_single_table(tmpdir):


@patch('boto3.Session')
@patch.dict(os.environ, {
'AWS_ACCESS_KEY_ID': 'access_key',
'AWS_SECRET_ACCESS_KEY': 'secret_access_key',
'AWS_DEFAULT_REGION': 'region_name',
})
@patch('sdv.datasets.demo.BUCKET', 'bucket')
def test__get_data_from_bucket(session_mock):
"""Test the ``_get_data_from_bucket`` method."""
Expand Down

0 comments on commit 50b16e0

Please sign in to comment.