yuvipanda / hubtraf

Traffic simulator for JupyterHub
BSD 3-Clause "New" or "Revised" License
40 stars 24 forks source link

Add and run pre-commit to fix unused imports etc #48

Closed consideRatio closed 8 months ago

consideRatio commented 8 months ago

There was an unused async_timeout import that also wasn't an explicit dependency, this led to issues in tljh's test system that relies on hubtraf thar surfaced using debian:12 (and ubuntu:24.04 later) that provides Python 3.11+.

codecov-commenter commented 8 months ago

Codecov Report

Attention: Patch coverage is 32.25806% with 42 lines in your changes are missing coverage. Please review.

Project coverage is 38.18%. Comparing base (cf134f0) to head (d5117f3). Report is 4 commits behind head on master.

Files Patch % Lines
hubtraf/user.py 58.82% 14 Missing :warning:
hubtraf/simulate.py 0.00% 10 Missing :warning:
hubtraf/auth/lti.py 0.00% 7 Missing :warning:
hubtraf/check.py 0.00% 5 Missing :warning:
hubtraf/parser/__init__.py 0.00% 4 Missing :warning:
hubtraf/auth/dummy.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #48 +/- ## ========================================== + Coverage 37.53% 38.18% +0.65% ========================================== Files 6 6 Lines 373 364 -9 ========================================== - Hits 140 139 -1 + Misses 233 225 -8 ```

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

consideRatio commented 8 months ago

I've verified that this PR fixes use of hubtraf in TLJH tests when Python 3.11 and 3.12 is used.

consideRatio commented 8 months ago

@yuvipanda this PR includes a lot of changes - but most automatic via pre-commit hooks, and could therefor be a somewhat quick review still.

I revisit this PR since i hope to get tljh's tests go green

consideRatio commented 8 months ago

Thank you @yuvipanda!!