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

MNT: Drop external mock dependency #3860

Merged
merged 2 commits into from Nov 24, 2019
Merged

MNT: Drop external mock dependency #3860

merged 2 commits into from Nov 24, 2019

Conversation

kyleam
Copy link
Contributor

@kyleam kyleam commented Nov 8, 2019

We've dropped Python 2 support, and since Python 3.3 mock is included
in the standard library.

We've dropped Python 2 support, and since Python 3.3 mock is included
in the standard library.
@kyleam kyleam added the do not merge label Nov 8, 2019
@kyleam
Copy link
Contributor Author

@kyleam kyleam commented Nov 8, 2019

Marked as "do not merge". The released versions of the crawler and container extensions implicitly expect the external mock to be present. For -container, the setup.py in master already declares mock as a dependency, so we should be good with the coming release. -crawler needs an update though.

kyleam added a commit to kyleam/datalad-crawler that referenced this issue Nov 8, 2019
mock is assumed to be present because it's a dependency of datalad.
However the master branch of datalad no longer supports Python 2, so
it's free to drop its dependency on the external mock library in favor
of unittest.mock, which comes with the standard library as of Python
3.3.

Explicitly specify mock as a requirement for the tests.

Re: datalad/datalad#3860
@codecov
Copy link

@codecov codecov bot commented Nov 8, 2019

Codecov Report

Merging #3860 into master will increase coverage by 0.07%.
The diff coverage is 91.3%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3860      +/-   ##
==========================================
+ Coverage    80.7%   80.77%   +0.07%     
==========================================
  Files         273      273              
  Lines       36012    36012              
==========================================
+ Hits        29063    29090      +27     
+ Misses       6949     6922      -27
Impacted Files Coverage Δ
datalad/ui/dialog.py 89.94% <0%> (ø) ⬆️
datalad/plugin/addurls.py 17.41% <0%> (ø) ⬆️
datalad/support/vcr_.py 50% <0%> (ø) ⬆️
datalad/plugin/export_archive.py 24.65% <0%> (ø) ⬆️
datalad/tests/test_auto.py 88.48% <100%> (ø) ⬆️
datalad/plugin/tests/test_addurls.py 100% <100%> (ø) ⬆️
datalad/cmdline/tests/test_helpers.py 100% <100%> (ø) ⬆️
datalad/support/tests/test_ansi_colors.py 100% <100%> (ø) ⬆️
datalad/tests/test_utils.py 96.11% <100%> (ø) ⬆️
datalad/support/tests/test_annexrepo.py 96.39% <100%> (ø) ⬆️
... and 39 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 728f997...6fab782. Read the comment docs.

kyleam added a commit to kyleam/datalad-crawler that referenced this issue Nov 8, 2019
We assume these are present because they're dependencies of datalad.
However the master branch of datalad no longer supports Python 2, so
it's free to drop its dependency on the external mock library in favor
of unittest.mock, which comes with the standard library as of Python
3.3.

The floor for nose matches the one in datalad's setup.py.

Re: datalad/datalad#3860
kyleam added a commit to kyleam/datalad-crawler that referenced this issue Nov 8, 2019
We assume these are present because they're dependencies of datalad.
However the master branch of datalad no longer supports Python 2, so
it's free to drop its dependency on the external mock library in favor
of unittest.mock, which comes with the standard library as of Python
3.3.

The floor for nose matches the one in datalad's setup.py.

Re: datalad/datalad#3860
@yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Nov 21, 2019

I pushed 0.4.4 of datalad-crawler, so it should be all set. restarted the checks (couldn't figure out how to restart only the one for the crawler)

datalad-crawler still supports python 2, so it depends on the external
mock library for its tests.  Install with "[devel]" so that we install
mock.
@kyleam
Copy link
Contributor Author

@kyleam kyleam commented Nov 21, 2019

I pushed 0.4.4 of datalad-crawler, so it should be all set

Thanks. It looks like the build still failed because the devel dependencies for mock weren't being pulled down. I've adjusted .github/workflows/test_extensions.yml to (hopefully) do so, but feel free to tweak if there's a cleaner way to accomplish this.

@kyleam kyleam removed the do not merge label Nov 21, 2019
@yarikoptic
Copy link
Member

@yarikoptic yarikoptic commented Nov 24, 2019

I pushed 0.4.4 of datalad-crawler, so it should be all set

Thanks. It looks like the build still failed because the devel dependencies for mock weren't being pulled down. I've adjusted .github/workflows/test_extensions.yml to (hopefully) do so, but feel free to tweak if there's a cleaner way to accomplish this.

I guess in the long run we just need to obey some convention, e.g. to install [devel] or [tests] for all extensions

@yarikoptic yarikoptic merged commit df732a5 into datalad:master Nov 24, 2019
13 of 15 checks passed
@kyleam kyleam deleted the drop-mock branch Dec 3, 2019
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

2 participants