Add Pyreverse primer#10974
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (90.71%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #10974 +/- ##
==========================================
- Coverage 96.18% 96.13% -0.06%
==========================================
Files 178 183 +5
Lines 19662 19845 +183
==========================================
+ Hits 18911 19077 +166
- Misses 751 768 +17
🚀 New features to boost your workflow:
|
|
@Pierre-Sassoulas I noticed that you have been working very actively on the pylint primer so it might be better to convert this to a draft for now |
|
🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉 This comment was generated for commit fd77cee |
|
I'm going to add the 'changed' messages concept for the pylint side, but it should be compatible. Maybe we should find what's generic before I commit to what I was planning ? (Tbh the Claude implementation is very verbose and not satisfactory right now) |
|
I assume you are referring to #10973? I think it makes sense to make the primer output more structured and I like the new format better. Looking at it, both implementations look quite similar ==> so I would say the following things can likely be unified in a base
Main differences are command implementations and the way targets are defined (pylint primer will reference a full package) while the pyreverse primer operates on classes as targets. Also One thing that seems wasteful is to run pyreverse primer in a separate workflow ==> should run in the same workflow with pyreverse as an optional step (based on pyreverse label or some other trigger). |
|
I was thinking of #10914 (where there's a diff introduced for "changed message", but I'm not sure if it's that easy to reuse) Maybe we can add the arg for the package we want to use pyreverse on in the json defining the repo we prime ? |
|
I see, I do not think there is much logic to be shared with the Pyreverse primer because it operates on sets of messages instead of bare line diffs. I agree with you ==> prior to this PR we should first focus on a common config interface that can be used for both primers. For rest the logic is quite different and needs individual implementations anyway |
Type of Changes
Description
Based on the discussion in #10820 I tried to implement a pyreverse primer. Currently contains a lot of duplicate code which can likely be unified with the pylint primer. This is an initial attempt, feedback is welcome :)