AstraZeneca / rexmex

A general purpose recommender metrics library for fair evaluation.
https://rexmex.readthedocs.io/
275 stars 26 forks source link

Ensure consistent ordering of imports #25

Closed cthoyt closed 2 years ago

cthoyt commented 2 years ago

Summary

This PR adds configuration to the lint environment in the tox.ini configuration to run isort, a tool for automatically sorting your imports in a consistent and deterministic way. It also adds some configuration to make it play nice with the black code formatter and an entry into the flake8 configuration so CI checks that isort was applied.

Changes

  1. Add isort to lint environment
  2. Add isort configuration in pyproject.toml
  3. Apply isort
codecov-commenter commented 2 years ago

Codecov Report

Merging #25 (28ed97f) into main (49b4171) will decrease coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
- Coverage   99.87%   99.87%   -0.01%     
==========================================
  Files          15       15              
  Lines         787      770      -17     
==========================================
- Hits          786      769      -17     
  Misses          1        1              
Impacted Files Coverage Δ
rexmex/dataset.py 100.00% <ø> (ø)
rexmex/__init__.py 100.00% <100.00%> (ø)
rexmex/metrics/__init__.py 100.00% <100.00%> (ø)
rexmex/metrics/ranking.py 100.00% <100.00%> (ø)
rexmex/metrics/rating.py 100.00% <100.00%> (ø)
rexmex/metricset.py 98.33% <100.00%> (-0.13%) :arrow_down:
rexmex/scorecard.py 100.00% <100.00%> (ø)
rexmex/utils.py 100.00% <100.00%> (ø)
tests/integration/test_aggregation.py 100.00% <100.00%> (ø)
tests/unit/test_dataset.py 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 49b4171...28ed97f. Read the comment docs.

cthoyt commented 2 years ago

Not really sure what's going on with the code coverage on the diff here