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

op.realpath() -> Path.resolve() #4057

Merged
merged 11 commits into from Mar 9, 2020
Merged

op.realpath() -> Path.resolve() #4057

merged 11 commits into from Mar 9, 2020

Conversation

mih
Copy link
Member

@mih mih commented Jan 20, 2020

This aims to fix #4055 and fix #4192

  • make with_tempfile report properly resolved longpaths on windows to satisfy all those tests that perform lexical comparisons of paths
  • monkey-patch Path.resolve() to support strict=False on PY35
  • watch tests and observe making patching to work on PY35
  • implement full replacement in all parts that could potentially impact any path comparison

@codecov
Copy link

codecov bot commented Jan 20, 2020

Codecov Report

Merging #4057 into master will decrease coverage by 0.16%.
The diff coverage is 90.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4057      +/-   ##
==========================================
- Coverage   88.74%   88.58%   -0.17%     
==========================================
  Files         282      282              
  Lines       36888    37034     +146     
==========================================
+ Hits        32738    32807      +69     
- Misses       4150     4227      +77
Impacted Files Coverage Δ
datalad/support/tests/test_network.py 100% <ø> (ø) ⬆️
datalad/cmdline/tests/test_helpers.py 100% <100%> (ø) ⬆️
datalad/support/tests/test_gitrepo.py 99.75% <100%> (-0.01%) ⬇️
datalad/tests/test_utils.py 95.96% <100%> (ø) ⬆️
datalad/support/tests/test_annexrepo.py 95.27% <100%> (ø) ⬆️
datalad/distribution/tests/test_uninstall.py 100% <100%> (ø) ⬆️
datalad/support/archives.py 89.47% <100%> (ø) ⬆️
datalad/support/repo.py 95.74% <100%> (ø) ⬆️
datalad/support/gitrepo.py 90.68% <100%> (ø) ⬆️
datalad/interface/tests/test_rerun.py 100% <100%> (ø) ⬆️
... and 27 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 0741da6...5b9082a. Read the comment docs.

@mih
Copy link
Member Author

mih commented Jan 20, 2020

Windows test failures are funky, and do not replicate on a real win10 box or appveyor.... 🙄

datalad/utils.py Show resolved Hide resolved
datalad/distribution/dataset.py Outdated Show resolved Hide resolved
datalad/support/annexrepo.py Outdated Show resolved Hide resolved
datalad/support/annexrepo.py Outdated Show resolved Hide resolved
datalad/support/annexrepo.py Outdated Show resolved Hide resolved
datalad/support/gitrepo.py Outdated Show resolved Hide resolved
@mih
Copy link
Member Author

mih commented Feb 25, 2020

Force-pushed a rebased PR, with all discussed issues addressed. Let's see....

@mih
Copy link
Member Author

mih commented Feb 25, 2020

Grrr, sank another day into this one. If you see the issue(s), please HELP!!! Thx!

mih added 8 commits Mar 8, 2020
This one approach to a clean solution to dataladgh-4055 without having to
introduce a custom helper function.
Importantly, this makes the with_tempfile decorator use this
new approach, which provides any test with proper longpaths
that afford lexical comparisions on Windows.
…code

Raise if an archive path outside a repository was given to
add_archive_content.This scenario is not supported.
Must be more gentle, cannot have really obscure file names on windows
(limit similar to other places in the code).
Not that it would matter other than making the test fail.
@mih
Copy link
Member Author

mih commented Mar 8, 2020

Still not worky worky :(

@mih
Copy link
Member Author

mih commented Mar 9, 2020

The remaining test failures with automagic IO only occur with PY36+ and git-annex-standalone=7.20190819+git2-g908476a9b-1~ndall+1 , but not, e.g., with git-annex=7.20191230.
Fun times....

@mih
Copy link
Member Author

mih commented Mar 9, 2020

Once this PR is merged, we can finally start hunting down Github CI issues on windows (those that remain, and are not due to invalid lexical short path comparisons)

rmtree(): device or resource busy and friends...
@mih
Copy link
Member Author

mih commented Mar 9, 2020

This is done.

@mih mih merged commit 0b2e20e into datalad:master Mar 9, 2020
12 of 18 checks passed
@mih mih deleted the bf-4055 branch Mar 9, 2020
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.

3 participants