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

datalad fusefs - make its call also "coverage" covered #15

Open
yarikoptic opened this issue Oct 19, 2021 · 6 comments
Open

datalad fusefs - make its call also "coverage" covered #15

yarikoptic opened this issue Oct 19, 2021 · 6 comments
Assignees

Comments

@yarikoptic
Copy link
Member

While reviewing #10 now with the coverage annotation, I wondered if we could make that call run also under coverage. E.g. following similar (if not the same) setup we have in DataLad core -- we augment PATH to point to https://github.com/datalad/datalad/tree/master/tools/coverage-bin so that datalad invocation would use python -m coverage run and then we join all coverage reports before submission: https://github.com/datalad/datalad/blob/master/.travis.yml#L251

@jwodder
Copy link
Member

jwodder commented Oct 19, 2021

@yarikoptic When I try to run datalad with -m (even just python3 -m datalad create --help, though python3 -m datalad works), I get:

The DataLad AutomagicIO functionality has been moved to an extension package. Please install the Python package `datalad_deprecated` to be able to use it.

And then after I install datalad_deprecated, running python3 -m datalad create --help fails with:

[ERROR  ] Cannot run file 'create' because: [Errno 2] No such file or directory: 'create'

Running datalad without python3 -m still works, though.

@jwodder
Copy link
Member

jwodder commented Oct 19, 2021

@yarikoptic Looking at the code, it seems that datalad.__main__ runs a Python script instead of being equivalent to the datalad command. Why?

@yarikoptic
Copy link
Member Author

don't use python -m datalad -- that is the "AutomagicIO" mode which is now in datalad-deprecated. The idea is to use python -m coverage run `which datalad` ...

@jwodder
Copy link
Member

jwodder commented Oct 19, 2021

@yarikoptic I think both Datalad and fuse may be messing with the coverage somehow. I couldn't get fuse_.py or the command in __init__.py to show as covered, and when I added a trivial __main__.py that duplicated the datalad fusefs command, I was able to get that covered but not fuse_.py.

@yarikoptic
Copy link
Member Author

interesting... and that is in foreground mode?

@jwodder
Copy link
Member

jwodder commented Oct 19, 2021

@yarikoptic Yes, it's in foreground mode.

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

No branches or pull requests

3 participants