Skip to content

Commit

Permalink
Make data.create_image_fetcher private, closes scikit-image#6854
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Quinn authored and mkcor committed May 22, 2023
1 parent f2745cf commit ff3b7bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions doc/source/release_notes/release_dev.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Improvements
API Changes
-----------

- ``data.create_image_fetcher`` is now private (gh-6854)


Bugfixes
Expand Down
2 changes: 0 additions & 2 deletions skimage/data/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ __all__ = [
'coffee',
'coins',
'colorwheel',
'create_image_fetcher',
'data_dir',
'download_all',
'eagle',
Expand Down Expand Up @@ -59,7 +58,6 @@ from ._fetchers import (
coffee,
coins,
colorwheel,
create_image_fetcher,
data_dir,
download_all,
eagle,
Expand Down
4 changes: 2 additions & 2 deletions skimage/data/_fetchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _has_hash(path, expected_hash):
return file_hash(path) == expected_hash


def create_image_fetcher():
def _create_image_fetcher():
try:
import pooch
# older versions of Pooch don't have a __version__ attribute
Expand Down Expand Up @@ -124,7 +124,7 @@ def create_image_fetcher():
return image_fetcher, data_dir


image_fetcher, data_dir = create_image_fetcher()
image_fetcher, data_dir = _create_image_fetcher()


def _skip_pytest_case_requiring_pooch(data_filename):
Expand Down
2 changes: 1 addition & 1 deletion skimage/data/tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def test_vortex():


@pytest.mark.parametrize(
'function_name', ['create_image_fetcher', 'file_hash', 'image_fetcher']
'function_name', ['file_hash', 'image_fetcher']
)
def test_fetchers_are_public(function_name):
# Check that the following functions that are only used indirectly in the
Expand Down

0 comments on commit ff3b7bf

Please sign in to comment.