"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "skimage/data/__init__.py" between
scikit-image-0.18.1.tar.gz and scikit-image-0.18.3.tar.gz

About: scikit-image is a collection of algorithms for image processing in Python.

__init__.py  (scikit-image-0.18.1):__init__.py  (scikit-image-0.18.3)
skipping to change at line 64 skipping to change at line 64
'retina', 'retina',
'rocket', 'rocket',
'shepp_logan_phantom', 'shepp_logan_phantom',
'skin', 'skin',
'stereo_motorcycle'] 'stereo_motorcycle']
legacy_data_dir = osp.abspath(osp.dirname(__file__)) legacy_data_dir = osp.abspath(osp.dirname(__file__))
skimage_distribution_dir = osp.join(legacy_data_dir, '..') skimage_distribution_dir = osp.join(legacy_data_dir, '..')
try: try:
from pooch.utils import file_hash from pooch import file_hash
except ModuleNotFoundError: except ModuleNotFoundError:
# Function taken from # Function taken from
# https://github.com/fatiando/pooch/blob/master/pooch/utils.py # https://github.com/fatiando/pooch/blob/master/pooch/utils.py
def file_hash(fname, alg="sha256"): def file_hash(fname, alg="sha256"):
""" """
Calculate the hash of a given file. Calculate the hash of a given file.
Useful for checking if a file has changed or been corrupted. Useful for checking if a file has changed or been corrupted.
Parameters Parameters
---------- ----------
fname : str fname : str
skipping to change at line 139 skipping to change at line 139
# remove `.dev` with a `+` if it exists. # remove `.dev` with a `+` if it exists.
# This helps pooch understand that it should look in master # This helps pooch understand that it should look in master
# to find the required files # to find the required files
skimage_version_for_pooch = __version__.replace('.dev', '+') skimage_version_for_pooch = __version__.replace('.dev', '+')
if '+' in skimage_version_for_pooch: if '+' in skimage_version_for_pooch:
url = ("https://github.com/scikit-image/scikit-image/raw/" url = ("https://github.com/scikit-image/scikit-image/raw/"
"{version}/skimage/") "{version}/skimage/")
else: else:
url = ("https://github.com/scikit-image/scikit-image/raw/" url = ("https://github.com/scikit-image/scikit-image/raw/"
"v{version}/skimage/") "v{version}/skimage/")
# Create a new friend to manage your sample data storage # Create a new friend to manage your sample data storage
image_fetcher = pooch.create( image_fetcher = pooch.create(
# Pooch uses appdirs to select an appropriate directory for the cache # Pooch uses appdirs to select an appropriate directory for the cache
# on each platform. # on each platform.
# https://github.com/ActiveState/appdirs # https://github.com/ActiveState/appdirs
# On linux this converges to # On linux this converges to
# '$HOME/.cache/scikit-image' # '$HOME/.cache/scikit-image'
# With a version qualifier # With a version qualifier
path=pooch.os_cache("scikit-image"), path=pooch.os_cache("scikit-image"),
base_url=url, base_url=url,
version=skimage_version_for_pooch, version=skimage_version_for_pooch,
version_dev="main",
env="SKIMAGE_DATADIR", env="SKIMAGE_DATADIR",
registry=registry, registry=registry,
urls=registry_urls, urls=registry_urls,
# Note: this should read `retry_if_failed=3,`, but we generate that # Note: this should read `retry_if_failed=3,`, but we generate that
# dynamically at import time above, in case installed pooch is a less # dynamically at import time above, in case installed pooch is a less
# recent version # recent version
**retry, **retry,
) )
data_dir = osp.join(str(image_fetcher.abspath), 'data') data_dir = osp.join(str(image_fetcher.abspath), 'data')
 End of changes. 3 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)