Hey, I was trying to turn on coverage for my pytho...
# general
c
Hey, I was trying to turn on coverage for my python project and was getting errors. Initially thought it was related to remote execution since I was setting that up, but it fails in CI/CD with remote off as well. Running pants
2.3.0
this worked in
2.2.1
, which was the last version I was using.
Copy code
[2021-04-06T23:57:47.143Z] ERROR: usage: __main__.py [options] [file_or_dir] [file_or_dir] [...]
[2021-04-06T23:57:47.143Z] __main__.py: error: unrecognized arguments: --cov-report= --cov --cov config --cov dashboards --cov data_lake --cov entity_resolution --cov hooks --cov ml --cov mlop --cov schema --cov task_runner --cov test_fixtures --cov test_util --cov tools --cov util <test file> 
[2021-04-06T23:57:47.143Z]   inifile: None
[2021-04-06T23:57:47.143Z]   rootdir: /tmp/process-execution7UcNHu
[2021-04-06T23:57:47.143Z] 
[2021-04-06T23:57:47.143Z]
I can't repo locally only in CI/CD, so probably an issue there, but I can always repo with remote execution.
Turned if off initially to do unblock remote execution.
e
Checking the more obvious stuff - does CI use additional toml configs or env var config that would be different from local? Or is your local comparison fully apples to apples?
c
You're correct
Copy code
[GLOBAL]
dynamic_ui = false
colors = true
pantsd = false

remote_execution = false

[test]
    [pytest]
    pytest_plugins = []
e
Aha, ok - so that's a CI specific config and you nuke pytest-cov from the pytest plugins list?
👍 1
c
Is the ci overrides, and it seems like toml isn't merging options which I was silly assumed it would do.
Thank you
e
You're welcome.
We should probably blow up when a plugin we expect is removed from requirements. Its ok to tweak versions, but probably ~never ok to remove outright.
👍 1
c
I was trying to pull out
ipdb
from the CI config and did that with adding remote which is too many changes at once.
toml has a way to remove it so was using the tool wrong
e
Ah, gotcha. The relevant list options doc is here: https://www.pantsbuild.org/docs/options#config-file-entries-3
c
Yes my bad thanks John
❤️ 1