cytomining / cytominer-eval

[Deprecated] Common Evaluation Metrics for DataFrames
BSD 3-Clause "New" or "Revised" License
7 stars 11 forks source link

add black to pre-commit and github actions #70

Closed alxndrkalinin closed 2 years ago

alxndrkalinin commented 2 years ago

closes #57

This PR:

alxndrkalinin commented 2 years ago

@gwaygenomics Another suggestion is to also add flake8 to enforce style, like no unused imports, missing docstrings, etc. Wdyt?

codecov-commenter commented 2 years ago

Codecov Report

Merging #70 (e6073f5) into master (3c907ea) will increase coverage by 0.06%. The diff coverage is 96.55%.

@@            Coverage Diff             @@
##           master      #70      +/-   ##
==========================================
+ Coverage   98.87%   98.93%   +0.06%     
==========================================
  Files          33       33              
  Lines        1064     1032      -32     
==========================================
- Hits         1052     1021      -31     
+ Misses         12       11       -1     
Flag Coverage Δ
unittests 98.93% <96.55%> (+0.06%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cytominer_eval/__about__.py 100.00% <ø> (ø)
cytominer_eval/evaluate.py 100.00% <ø> (ø)
cytominer_eval/operations/enrichment.py 100.00% <ø> (ø)
cytominer_eval/operations/grit.py 100.00% <ø> (ø)
cytominer_eval/operations/hitk.py 95.23% <ø> (ø)
cytominer_eval/operations/mp_value.py 100.00% <ø> (ø)
cytominer_eval/operations/precision_recall.py 100.00% <ø> (ø)
...miner_eval/operations/replicate_reproducibility.py 100.00% <ø> (ø)
cytominer_eval/tests/test_evaluate.py 100.00% <ø> (ø)
...iner_eval/tests/test_operations/test_enrichment.py 100.00% <ø> (ø)
... and 18 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

alxndrkalinin commented 2 years ago

@gwaybio Finally back to this. I tested linting with flake8 under python versions 3.5-3.9 and the requirements seem consistent.

New changes make code flake8-compliant – mostly removing unused imports, variables, etc. It's not checking for docstring formatting, because it produces a ton of small issues – like only single-line docstring is allowed at the top of the file – I'm not sure are that important at this point.