django-cms / django-filer

File and Image Management Application for django
https://django-filer.readthedocs.io/
Other
1.73k stars 575 forks source link

ci: Fix tests and add pre-commit #1306

Closed marksweb closed 1 year ago

marksweb commented 1 year ago

Description

This addresses issues with tests and adds pre-commit config for linting & basic checks to hopefully prevent the linter workflow failing on PRs.

Checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #1306 (0c94147) into master (6a4706d) will increase coverage by 0.02%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1306      +/-   ##
==========================================
+ Coverage   72.18%   72.21%   +0.02%     
==========================================
  Files          72       72              
  Lines        3236     3239       +3     
  Branches      559      563       +4     
==========================================
+ Hits         2336     2339       +3     
  Misses        734      734              
  Partials      166      166              
Impacted Files Coverage Δ
filer/urls.py 100.00% <ø> (ø)
filer/admin/folderadmin.py 71.82% <100.00%> (ø)
filer/thumbnail_processors.py 38.46% <100.00%> (ø)
filer/utils/compatibility.py 59.09% <100.00%> (ø)
filer/utils/files.py 69.87% <100.00%> (ø)
filer/admin/views.py 65.71% <0.00%> (+1.53%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

marksweb commented 1 year ago

I didn't know about pre-commit and will apply that to my other projects

@jrief It's a very neat tool for improving a workflow & catching issues before you get to a PR & workflows - especially linters.