fix docstrings for LoadTask
@@ -89,6 +89,9 @@ class SaveTask(IOTask):
"""
:param path: root path where all EOPatches are saved
:type path: str
+ :param filesystem: An existing filesystem object. If not given it will be initialized according to the EOPatch
+ path. If you intend to run this task in multiprocessing mode you shouldn't specify this parameter.
+ :type filesystem: fs.base.FS or None
:param features: A collection of features types specifying features of which type will be saved. By default
all features will be saved.
:type features: an object supported by the :class:`FeatureParser<eolearn.core.utilities.FeatureParser>`
@@ -97,9 +100,6 @@ class SaveTask(IOTask):
:param compress_level: A level of data compression and can be specified with an integer from 0 (no compression)
to 9 (highest compression).
:type compress_level: int
- :param filesystem: An existing filesystem object. If not given it will be initialized according to the EOPatch
- path. If you intend to run this task in multiprocessing mode you shouldn't specify this parameter.
- :type filesystem: fs.base.FS or None
"""
self.kwargs = kwargs
super().__init__(path, filesystem=filesystem, create=True)
@@ -123,9 +123,9 @@ class SaveTask(IOTask):
class SaveToDisk(SaveTask):
""" A deprecated version of SaveTask
"""
- def __init__(self, folder, *args, **kwargs):
+ def __init__(self, path, *args, **kwargs):
warnings.warn('This task is deprecated, use SaveTask instead', DeprecationWarning)
- super().__init__(folder, *args, **kwargs)
+ super().__init__(path, *args, **kwargs)
class LoadTask(IOTask):
@@ -133,15 +133,15 @@ class LoadTask(IOTask):
"""
def __init__(self, path, filesystem=None, **kwargs):
"""
- :param folder: root directory where all EOPatches are saved
- :type folder: str
+ :param path: root directory where all EOPatches are saved
+ :type path: str
+ :param filesystem: An existing filesystem object. If not given it will be initialized according to the EOPatch
+ path. If you intend to run this task in multiprocessing mode you shouldn't specify this parameter.
+ :type filesystem: fs.base.FS or None
:param features: A collection of features to be loaded. By default all features will be loaded.
:type features: an object supported by the :class:`FeatureParser<eolearn.core.utilities.FeatureParser>`
:param lazy_loading: If `True` features will be lazy loaded. Default is `False`
:type lazy_loading: bool
- :param filesystem: An existing filesystem object. If not given it will be initialized according to the EOPatch
- path. If you intend to run this task in multiprocessing mode you shouldn't specify this parameter.
- :type filesystem: fs.base.FS or None
"""
self.kwargs = kwargs
super().__init__(path, filesystem=filesystem, create=False)
@@ -162,9 +162,9 @@ class LoadTask(IOTask):
class LoadFromDisk(LoadTask):
""" A deprecated version of LoadTask
"""
- def __init__(self, folder, *args, **kwargs):
+ def __init__(self, path, *args, **kwargs):
warnings.warn('This task is deprecated, use LoadTask instead', DeprecationWarning)
- super().__init__(folder, *args, **kwargs)
+ super().__init__(path, *args, **kwargs)
class AddFeature(EOTask):
