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

Incompatible with coverage 5.0 #129

Closed
goerz opened this issue Dec 14, 2019 · 14 comments · Fixed by #134
Closed

Incompatible with coverage 5.0 #129

goerz opened this issue Dec 14, 2019 · 14 comments · Fixed by #134

Comments

@goerz
Copy link

goerz commented Dec 14, 2019

It seems like nbval does not work with the just released coverage 5.0 package: https://travis-ci.org/qucontrol/krotov/jobs/625049383

goerz added a commit to qucontrol/krotov that referenced this issue Dec 14, 2019
There is an incompatibility with the nbval package:
computationalmodelling/nbval#129
@eric-wieser
Copy link
Contributor

eric-wieser commented Dec 16, 2019

The error is:


    def _make_suffix(cov):
        """Create a suffix for nbval data file depending on pytest-cov config."""
        # Check if coverage object has data_suffix:
>       if cov and cov.data_suffix is not None:
E       AttributeError: 'Coverage' object has no attribute 'data_suffix'

Caused by

nbval/nbval/cover.py

Lines 112 to 122 in 7c6cd71

def _make_suffix(cov):
"""Create a suffix for nbval data file depending on pytest-cov config."""
# Check if coverage object has data_suffix:
if cov and cov.data_suffix is not None:
# If True, the suffix will be autogenerated by coverage.py.
# The suffixed data files will be automatically combined later.
if cov.data_suffix is True:
return True
# Has a suffix, but we add our own extension
return cov.data_suffix + '.nbval'
return 'nbval'

@takluyver
Copy link
Member

PR #130 pins the version of coverage to avoid this problem. But we should work out a proper fix and unpin it again, so I'll leave this issue open.

@eric-wieser
Copy link
Contributor

See nedbat/coveragepy#882 (comment) for more information

sbrugman added a commit to ydataai/ydata-profiling that referenced this issue Dec 19, 2019
Pin version until the package is compatible again:

computationalmodelling/nbval#129
@mloubout
Copy link

Hello, we ran into issue in our CI due to the new coverage < 5.0 requirement that make our installation crash. Is there any timeline concerning that issue?

@mloubout
Copy link

Any update on this one?

@vidartf
Copy link
Collaborator

vidartf commented Jan 27, 2020

I had a look again to figure out what the code is doing. Basically, the code is trying to tell whether we are being run with the Central pytest-cov engine, or the DistWorker (previously DistSlave) pytest-cov engine.

The easiest solution is probably to say "we only support the central engine", and get rid of this code.

@vidartf
Copy link
Collaborator

vidartf commented Jan 27, 2020

Looking at it further, it might just be best to drop the coverage support.

@eric-wieser
Copy link
Contributor

Dropping support for coverage entirely would be a real shame :(

@vidartf
Copy link
Collaborator

vidartf commented Jan 27, 2020

I made a fix PR, but its all dependent on pytest-cov remaining somewhat stable.

@goerz
Copy link
Author

goerz commented Jan 27, 2020

For what it’s worth, I depend on coverage reports including code that ran only due to nbval (alongside “normal” tests). So I very much hope you’re not dropping coverage support.

@vidartf
Copy link
Collaborator

vidartf commented Jan 29, 2020

@goerz Would you be able to test that the PR (#134) works as expected for you?

@goerz
Copy link
Author

goerz commented Jan 29, 2020

I'll give it a try soon...

@goerz
Copy link
Author

goerz commented Jan 31, 2020

Looks good! 👍

@vidartf
Copy link
Collaborator

vidartf commented Feb 12, 2020

Released as 0.9.5

eric-wieser added a commit to pygae/galgebra that referenced this issue Feb 12, 2020
chanedwin pushed a commit to chanedwin/pandas-profiling that referenced this issue Oct 11, 2020
Pin version until the package is compatible again:

computationalmodelling/nbval#129
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 a pull request may close this issue.

5 participants