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

Allow disabling parallel mode from the command line #1783

Closed
neutrinoceros opened this issue May 15, 2024 · 3 comments
Closed

Allow disabling parallel mode from the command line #1783

neutrinoceros opened this issue May 15, 2024 · 3 comments
Labels
duplicate This issue or pull request already exists enhancement New feature or request

Comments

@neutrinoceros
Copy link

Is your feature request related to a problem? Please describe.
I frequently encounter projects that set parallel=true in coveragerc or equivalent, supposedly because they only run coverage through CI, where it makes sense. I find disabling parallel mode is useful for local runs;
if I don't turn it off somehow, coverage report fails with No data to report.

Currently, there isn't a way (as far as I can tell) to override this flag from the command line, so I just end up making temporary changes to the config file, that I must remember not to commit, creating friction. I also frequently forget about this workaround and find myself re-discovering it.

Describe the solution you'd like
Having some way to override the flag from the command line (e.g. --parallel-mode=off or --no-parallel-mode) would help.

Describe alternatives you've considered

  • coverage report and friends (coverage html...) could support parallel=true and lookup data where it actually is. This seems like the truly ideal solution but I don't have a clear view of the big picture so maybe there are technical/historical reasons why this is not feasible ?
  • The error message emitted by coverage report and friends could be improved by hinting at parallel-mode being activated and/or that data exists, just not in the default .coverage directory.

Additional context
I'm willing to implement any solution that you deem suitable myself. Though I suspect that changing the CLI might be potentially tricky to me since I've never used optparse.

@neutrinoceros neutrinoceros added enhancement New feature or request needs triage labels May 15, 2024
@nedbat
Copy link
Owner

nedbat commented May 15, 2024

The error message emitted by coverage report and friends could be improved by hinting at parallel-mode being activated and/or that data exists, just not in the default .coverage directory.

As it happens, #1781 and #1782 are working on this.

@neutrinoceros
Copy link
Author

oh wow, great timing, thanks !

@nedbat
Copy link
Owner

nedbat commented May 15, 2024

I'll mark this as a dup of #1781.

@nedbat nedbat closed this as completed May 15, 2024
@nedbat nedbat added the duplicate This issue or pull request already exists label May 15, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants