-
Notifications
You must be signed in to change notification settings - Fork 38
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
Disable automatically detecting the use of frameworks in Prospector #1719
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1719 +/- ##
=======================================
Coverage 91.47% 91.47%
=======================================
Files 206 206
Lines 11204 11204
=======================================
Hits 10249 10249
Misses 955 955 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Please make sure to add a label before merging 🚀
one sec, I want to run a GA testy-test on it |
😄 Do you have a suggestion for a label? I couldn't find any that matches. |
#bearatadinnerparty 🐻 |
Not really, also thought of the good old bear 🐻 😃 |
awesome job @bouweandela - ran a set of GA tests just to make sure Django is unchained (doesn't get picked up, +1 if you get the movie reference haha) 🍺 |
Wait...The GH test you showed lists
Shouldn't this PR prevent this? |
indeed |
But was |
yes, big hefty Django comes in brought in by prospector (cheers @zklaus for pointing that out, I thought Django was brought in by pylint-django) |
alas, having said all that, reading the documentation that Bouwe linked from the PR description, it seems that now prospector shouldn't bring in the |
But why does it not appear in the GH action tests? And if |
it does, but only after pip installing, when prospector gets installed; and yes, those issues were from the plugin complaining Django wasn't properly installed right? Well, now it's not at all installed anymore so I wonder if it'll complain anymore 🤣 |
so now |
so here's the thing - I'm not sure we can get rid of that
On the other hand, it's possible the Django from conda be correctly configured? |
Ok - the crux of this PR is not really working: prospector still installs all the pylint plugins that nobody needs:
I suggest we open an issue on the prospector GH, prob more on the pylint side actually and tell them it's not quite working out what they thought the |
Maybe we should merge this and test if the Codacy problem disappears? E.g., here? Maybe the installation of the plugin cannot be disabled, but the the actual use of it can... |
totally do! I'm just annoyed we get crap in our env we don't need, celery above all else, I hate celery 🥕 😁 |
I am afraid this will not help. What this PR should achieve is that Prospector doesn't run pylint-django, but it is still installed as a dependency. If it is installed via conda-forge, that will also pull in django because of this. The problem is that the Codacy problem did not come from the Prospector tool, but directly from the Pylint tool, so we need to prevent Pylint from running pylint-django, not only Prospector. I was surprised though that Pylint did run it, since the Codacy configuration defers to our Pylint config file which makes no mention of the plugin and I could also not find anything about autodetection in Pylint itself, though I didn't look very thoroughly yet. |
@zklaus good points! There is this old PR pylint-dev/pylint-django#137 that decoupled Django from Pylint, but it seems they're still chained somehow |
Good find, @valeriupredoi. It seems conda-forge is overdepending. I added an issue at conda-forge/pylint-django-feedstock#39. However, that doesn't solve our issue with Pylint running the plugin outside of Prospector. |
we should definitely tell the prospector folk about this. I did the following experiment: I installed prospector with |
Plugins are indeed disabled in the pylint configuration file: Line 23 in 55d630c
so I'm not sure why Codacy is still running pylint-django if it uses our configuration file. |
I will close this now because it seems unlikely to solve our problem. |
@bouweandela I think this would have been useful after all - in theory, this should have done the job, so it's solid implementation from you (us as a package), so I would merge this, and flag the issue at |
This is really not needed. If you look at the error message on Codacy carefully, like I didn't do and @zklaus did, then you'll see that they are generated by pylint and not prospector. |
Description
Disable automatically detecting prospector plugins that we do not use.
Link to documentation: https://prospector.landscape.io/en/master/profiles.html#libraries-used-and-autodetect
Closes #1703
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: