Skip to content

Commit

Permalink
added deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ljchang committed May 2, 2024
1 parent 432f69a commit 85067c8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nltools/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import os
import pandas as pd
import warnings
from nltools.data import Brain_Data
import pkg_resources

Expand Down Expand Up @@ -65,7 +66,9 @@ def get_collection_image_metadata(collection=None, data_dir=None, limit=10):
Returns:
pd.DataFrame: Dataframe with full image metadata from collection
"""

warnings.warn(
"This function is deprecated and will be removed in a future version. Please use fetch_neurovault_ids instead."
)
if os.path.isfile(os.path.join(data_dir, "metadata.csv")):
dat = pd.read_csv(os.path.join(data_dir, "metadata.csv"))
else:
Expand Down Expand Up @@ -102,6 +105,9 @@ def download_collection(
Returns:
(pd.DataFrame, list): (DataFrame of image metadata, list of files from downloaded collection)
"""
warnings.warn(
"This function is deprecated and will be removed in a future version. Please use fetch_neurovault_ids instead."
)

if data_dir is None:
data_dir = _get_dataset_dir(str(collection), data_dir=data_dir, verbose=verbose)
Expand Down

0 comments on commit 85067c8

Please sign in to comment.