juftin / hatch-pip-compile

hatch plugin to use pip-compile (or uv) to manage project dependencies and lockfiles
http://juftin.com/hatch-pip-compile/
MIT License
76 stars 3 forks source link

🐛 Replace temporary lockfile name properly on Windows #76

Closed GeeTransit closed 7 months ago

GeeTransit commented 7 months ago

Hello!

I'm using your plugin on Windows and it works really well. However, it doesn't properly detect the temporary requirements.in filename, leading to this in my lockfile:

httpx==0.22.0
    # via -r C:\Users\xxx\AppData\Local\Temp\tmp_kn984om\test-two.in

The regex used to replace this is rf"-r \S*/{self.environment.name}\.in", which doesn't account for backslashes. I changed it to rf"-r \S*[\\/]{self.environment.name}\.in".

codecov[bot] commented 7 months ago

Codecov Report

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

Project coverage is 95.88%. Comparing base (7ac1068) to head (1e5c855). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #76 +/- ## ========================================== + Coverage 95.81% 95.88% +0.06% ========================================== Files 18 18 Lines 956 972 +16 Branches 160 160 ========================================== + Hits 916 932 +16 Misses 25 25 Partials 15 15 ```

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

juftin commented 7 months ago

Nice! Thank you very much. I'm honestly terrible with RegEx, this was super useful.

juftin commented 7 months ago

:tada: This PR is included in version 1.11.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: