BAMWelDX / weldx

The welding data exchange format
https://www.bam.de/weldx
BSD 3-Clause "New" or "Revised" License
20 stars 10 forks source link

use Ruff linter pre-commit actions #824

Closed marscher closed 1 year ago

marscher commented 1 year ago

Changes

Note that I also removed flake8-deprecations, which only checked for a hard coded dictionary of super old deprecations inside the std lib.

Checks

github-actions[bot] commented 1 year ago

Test Results

2 184 tests  ±0   2 183 :heavy_check_mark: ±0   3m 37s :stopwatch: +58s        1 suites ±0          1 :zzz: ±0         1 files   ±0          0 :x: ±0 

Results for commit 84ec757c. ± Comparison against base commit db750a4c.

:recycle: This comment has been updated with latest results.

codecov[bot] commented 1 year ago

Codecov Report

Merging #824 (84ec757) into master (db750a4) will increase coverage by 0.00%. The diff coverage is 98.48%.

@@           Coverage Diff           @@
##           master     #824   +/-   ##
=======================================
  Coverage   96.82%   96.83%           
=======================================
  Files          92       92           
  Lines        6055     6071   +16     
=======================================
+ Hits         5863     5879   +16     
  Misses        192      192           
Impacted Files Coverage Δ
weldx/geometry.py 96.61% <ø> (ø)
weldx/transformations/local_cs.py 96.34% <ø> (ø)
weldx/welding/groove/iso_9692_1.py 99.52% <ø> (ø)
weldx/transformations/cs_manager.py 98.60% <80.00%> (+<0.01%) :arrow_up:
weldx/asdf/file.py 96.27% <100.00%> (+0.06%) :arrow_up:
weldx/asdf/util.py 91.19% <100.00%> (ø)
weldx/constants.py 100.00% <100.00%> (ø)
weldx/core/generic_series.py 89.29% <100.00%> (+0.09%) :arrow_up:
weldx/core/time_series.py 97.72% <100.00%> (+0.01%) :arrow_up:
weldx/measurement.py 95.62% <100.00%> (+0.01%) :arrow_up:
... and 3 more

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

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

CagtayFabry commented 1 year ago

I think the config looks very clean now that nbqa-ruff is also available @marscher 👍

Just some errors to look into with the latest versions

CagtayFabry commented 1 year ago

we could also think about removing isort for the ruff implementation

marscher commented 1 year ago

With ruff-0.0.208 the error output does not contain the originating file name. This renders the output useless.

CagtayFabry commented 1 year ago

With ruff-0.0.208 the error output does not contain the originating file name. This renders the output useless.

oh that sounds bad, I hope ruff will introduce an option to toggle this at least..?

marscher commented 1 year ago

oh that sounds bad, I hope ruff will introduce an option to toggle this at least..?

However, this only seems to happen on Github and there some kind of annotations api is used. So the files will be flagged in the "changes" section of the PR :+1:

marscher commented 1 year ago

Honestly I do not know how to approach the notebook errors related to implicitly imported attributes.

marscher commented 1 year ago

we could also think about removing isort for the ruff implementation

yes, we should do that. I do not know if Ruff respects the tool settings of isort inside pyproject.toml or refers to its own isort section.

marscher commented 1 year ago

Thanks!