Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate datalad.utils.assure_* aliases #4908

Merged
merged 3 commits into from Sep 9, 2020
Merged

Conversation

kyleam
Copy link
Contributor

@kyleam kyleam commented Sep 8, 2020

This series follows up on gh-3909, removing all uses of datalad.utils.assure_* functions from the code base and then marking the functions as deprecated.

dataladgh-3909 renamed each assure_* function in datalad.utils to use
ensure_, assigning the new names to the old ones for compatibility.
We use the assure_ variants widely throughout our code base.  At that
time, we decided to temporarily let those occurrences be to avoid
merge conflicts.

Do that bulk replacement now.

Note that there are still a couple of assure_ methods in the code
base.  Those are left to another series, if someone thinks those are
worth cleaning up.
The bulk s/assure_*/ensure_*/ from the last commit didn't adjust
import order.  Fix the cases where it looks like things were ordered
and the last commit messed it up.
In 0.12.0, all of the assure_* functions in datalad.utils were renamed
as ensure_*, keeping the old names around as compatibility aliases.
Now that we don't use any of the old names in our code base, deprecate
them so the we can remove them in a later release.

Re: datalad#3779
@codecov
Copy link

codecov bot commented Sep 8, 2020

Codecov Report

Merging #4908 into master will decrease coverage by 0.29%.
The diff coverage is 91.51%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4908      +/-   ##
==========================================
- Coverage   89.80%   89.50%   -0.30%     
==========================================
  Files         289      289              
  Lines       40659    40667       +8     
==========================================
- Hits        36512    36400     -112     
- Misses       4147     4267     +120     
Impacted Files Coverage Δ
datalad/cmdline/main.py 75.81% <ø> (ø)
datalad/customremotes/base.py 69.35% <0.00%> (-14.52%) ⬇️
datalad/distribution/create_sibling_github.py 83.87% <0.00%> (ø)
datalad/metadata/tests/test_base.py 99.24% <ø> (ø)
datalad/plugin/wtf.py 81.09% <ø> (ø)
datalad/support/path.py 95.12% <0.00%> (ø)
datalad/support/archive_utils_patool.py 29.87% <20.00%> (ø)
datalad/customremotes/archives.py 63.21% <50.00%> (ø)
datalad/interface/test.py 65.21% <50.00%> (ø)
datalad/tests/test_version.py 27.02% <50.00%> (ø)
... and 69 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4f8fe6e...61f95ad. Read the comment docs.

@kyleam
Copy link
Contributor Author

kyleam commented Sep 8, 2020

-container failure is the test_schemes failure that recently popped up (datalad/datalad-container#126).

@mih
Copy link
Member

mih commented Sep 9, 2020

Thx! 🇬🇧

@mih mih merged commit 680ac0c into datalad:master Sep 9, 2020
@kyleam kyleam deleted the deprecate-assure branch September 9, 2020 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants