sync-pre-commit-lock icon indicating copy to clipboard operation
sync-pre-commit-lock copied to clipboard

feat: also synchronize additional dependencies for Python hooks

Open noirbizarre opened this issue 1 year ago • 1 comments

Hey 👋🏼

Here's the additional dependencies support.

I have been in another direction from your branch, but I'll update it with ~the debug statements and some of the missing error handling~ (done).

Sorry it was a big one, but I start I tried as much as possible not to change the signatures, but at some point it was just adding more complexity (eg., mapping, mapping_reverse_by_url as params,...)

PDM

image

Poetry

image

[!NOTE] The structure/algorithm make it easy to also handle repository renaming (like ruff). I'll submit it in another pull requests later as it is already done too but based on this PR

[!NOTE] I added 2 dev scripts, pdm test and pdm test-all that were actually useful to me so I decided too submit them in the process, but I can totally remove them

[!NOTE] Not done in this PR (as it is already a big one) but given packging is now a dependency, maybe it's worth replacing the GenericLockedPackage type by packging.requirements.Requirement

noirbizarre avatar Aug 19 '24 12:08 noirbizarre

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.69%. Comparing base (e3205ab) to head (85840b3). Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #37      +/-   ##
==========================================
+ Coverage   94.06%   95.69%   +1.62%     
==========================================
  Files           9        9              
  Lines         472      557      +85     
  Branches       81      104      +23     
==========================================
+ Hits          444      533      +89     
+ Misses         24       21       -3     
+ Partials        4        3       -1     
Flag Coverage Δ
unittests 95.51% <100.00%> (+1.65%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 19 '24 12:08 codecov[bot]

README updated 👍🏼 I also added a checkbox for the repository URL update support.

Agreed for the release. It's ready, I'll submit the PR ASAP after this one is merged 👍🏼

Thanks to you, great tool, very useful !

noirbizarre avatar Aug 21 '24 23:08 noirbizarre