Skip to content

Commit

Permalink
Merge pull request #6738 from adswa/mnt-6652
Browse files Browse the repository at this point in the history
MNT: Remove ``eval_file_type()`` from code base
  • Loading branch information
adswa committed Jun 7, 2022
2 parents 96a8584 + dfb16ae commit 1cfc939
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 34 deletions.
2 changes: 0 additions & 2 deletions datalad/core/distributed/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ def _datasets_since_(dataset, since, paths, recursive, recursion_limit):
annex=None,
recursive=recursive,
recursion_limit=recursion_limit,
# make it as fast as possible
eval_file_type=False,
# TODO?: expose order as an option for diff and push
# since in some cases breadth-first would be sufficient
# and result in "taking action faster"
Expand Down
10 changes: 1 addition & 9 deletions datalad/core/local/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def diff_dataset(
untracked='normal',
recursive=False,
recursion_limit=None,
eval_file_type=True,
reporting_order='depth-first',
datasets_only=False,
):
Expand Down Expand Up @@ -185,10 +184,6 @@ def diff_dataset(
Flag to enable recursive operation (see main diff() command).
recursion_limit : int, optional
Recursion limit (see main diff() command).
eval_file_type : bool, optional
Whether to perform file type discrimination between real symlinks
and symlinks representing annex'ed files. This can be expensive
in datasets with many files.
reporting_order : {'depth-first', 'breadth-first', 'bottom-up'}, optional
By default, subdataset content records are reported after the record
on the subdataset's submodule in a superdataset (depth-first).
Expand Down Expand Up @@ -291,7 +286,6 @@ def diff_dataset(
origpaths=None if not path else OrderedDict(path),
untracked=untracked,
annexinfo=annex,
eval_file_type=eval_file_type,
cache=content_info_cache,
order=reporting_order,
datasets_only=datasets_only,
Expand All @@ -305,7 +299,7 @@ def diff_dataset(


def _diff_ds(ds, fr, to, constant_refs, recursion_level, origpaths, untracked,
annexinfo, eval_file_type, cache, order='depth-first', datasets_only=False):
annexinfo, cache, order='depth-first', datasets_only=False):
if not ds.is_installed():
# asked to query a subdataset that is not available
lgr.debug("Skip diff of unavailable subdataset: %s", ds)
Expand Down Expand Up @@ -344,7 +338,6 @@ def _diff_ds(ds, fr, to, constant_refs, recursion_level, origpaths, untracked,
to,
paths=paths_arg,
untracked=untracked,
# deprecated unused !!! eval_file_type=eval_file_type,
eval_submodule_state='full' if to is None else 'commit',
_cache=cache)
except InvalidGitReferenceError as e:
Expand Down Expand Up @@ -434,7 +427,6 @@ def _diff_ds(ds, fr, to, constant_refs, recursion_level, origpaths, untracked,
origpaths=origpaths,
untracked=untracked,
annexinfo=annexinfo,
eval_file_type=eval_file_type,
cache=cache,
order=order,
datasets_only=datasets_only,
Expand Down
2 changes: 0 additions & 2 deletions datalad/distribution/create_sibling.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,8 +695,6 @@ def __call__(sshurl,
annex=None,
untracked='no',
recursive=True,
# save cycles, we are only looking for datasets
eval_file_type=False,
datasets_only=True,
)
# not installed subdatasets would be 'clean' so we would skip them
Expand Down
3 changes: 0 additions & 3 deletions datalad/local/copy_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ def get_file_annexinfo(self, fpath):
paths=[rpath],
# a simple `exists()` will not be enough (pointer files, etc...)
eval_availability=True,
# if it truly is a symlink, not just an annex pointer, we would not
# want to resolve it
# deprecated! unused; eval_file_type=True,
)
finfo = finfo.popitem()[1] if finfo else {}
return finfo
Expand Down
20 changes: 2 additions & 18 deletions datalad/support/gitrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2652,8 +2652,7 @@ def set_gitattributes(self, attrs, attrfile='.gitattributes', mode='a'):
attrline += ' {}={}'.format(a, val)
f.write('{}\n'.format(attrline))

def get_content_info(self, paths=None, ref=None, untracked='all',
eval_file_type=None):
def get_content_info(self, paths=None, ref=None, untracked='all'):
"""Get identifier and type information from repository content.
This is simplified front-end for `git ls-files/tree`.
Expand Down Expand Up @@ -2681,9 +2680,6 @@ def get_content_info(self, paths=None, ref=None, untracked='all',
'no': no untracked files are reported; 'normal': untracked files
and entire untracked directories are reported as such; 'all': report
individual files even in fully untracked directories.
eval_file_type :
THIS FUNCTIONALITY IS NO LONGER SUPPORTED.
Setting this flag has no effect.
Returns
-------
Expand All @@ -2708,10 +2704,6 @@ def get_content_info(self, paths=None, ref=None, untracked='all',
repository)
"""
lgr.debug('%s.get_content_info(...)', self)
if eval_file_type is not None:
warnings.warn(
"GitRepo.get_content_info(eval_file_type=) no longer supported",
DeprecationWarning)
# TODO limit by file type to replace code in subdatasets command
info = OrderedDict()

Expand Down Expand Up @@ -2928,22 +2920,14 @@ def diff(self, fr, to, paths=None, untracked='all',
if v.get('state', None) != 'clean'}

def diffstatus(self, fr, to, paths=None, untracked='all',
eval_submodule_state='full', eval_file_type=None,
_cache=None):
eval_submodule_state='full', _cache=None):
"""Like diff(), but reports the status of 'clean' content too.
It supports an additional submodule evaluation state 'global'.
If given, it will return a single 'modified'
(vs. 'clean') state label for the entire repository, as soon as
it can.
The eval_file_type parameter is ignored.
"""
if eval_file_type is not None:
warnings.warn(
"GitRepo.diffstatus(eval_file_type=) no longer supported",
DeprecationWarning)

def _get_cache_key(label, paths, ref, untracked=None):
return self.path, label, tuple(paths) if paths else None, \
ref, untracked
Expand Down

0 comments on commit 1cfc939

Please sign in to comment.