Closed gwdekker closed 2 months ago
Thanks for raising this! You're right, check-external
is only looking at the required dependencies. I think it makes sense to add a CLI option like --include-extras
, maybe even letting the user specify which extras to include. I should be able to get to this soon, but will see if there is another contributor who'd like to tackle it in the meantime!
ok, but pandera itself is not an extra here, but a required dependency. Its only installed with extras as part of the definition in the pyproject.toml file. So pandera is an integral part of the list of required dependencies, not an extra. My guess is that the parsing somehow fails, and therefore pandera itself is not recognized as being part of pyproject.toml. Hope this clarifies?
Yes, totally my mistake! I read through the issue too quickly and misunderstood.
Now I see that the issue is pandera's extras (specified within the brackets) are not recognized by check-external, and so it doesn't map pandera correctly onto its imports in the code. This is a bug and a fix should be out soon.
@emdoyle Created a PR solving the same, ran the tests. Take a look!
In my repo, in my
pyproject.toml
I have a dependency on pandera with extras:"pandera[strategies]>=0.18.3",
Running
tach check-external
reports "Undeclared dependencies" for the places where we usepandera
, presumably because the extras are not properly parsed?