mozilla / mozanalysis

A library for Mozilla experiments analysis
https://mozilla.github.io/mozanalysis/
Mozilla Public License 2.0
9 stars 13 forks source link

Set python version, Replace black and flake8 with RUFF #211

Closed jaredsnyder closed 5 months ago

jaredsnyder commented 5 months ago

pytest-black appears to be dead, and a recent update to pytest has caused it to start throwing error. This PR replaces it with pytest-ruff, and because ruff is both a linter and a formatter it replaces black and flake8.

Meant to address #210

jaredsnyder commented 5 months ago

Also updated the python CI version to 3.10 and added python_requires to the setup.py

codecov-commenter commented 5 months ago

Codecov Report

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

Project coverage is 78.99%. Comparing base (f079729) to head (a254f28). Report is 3 commits behind head on main.

Files Patch % Lines
src/mozanalysis/experiment.py 50.00% 8 Missing :warning:
src/mozanalysis/sizing.py 76.92% 3 Missing :warning:
src/mozanalysis/frequentist_stats/sample_size.py 81.81% 2 Missing :warning:
src/mozanalysis/bayesian_stats/binary.py 50.00% 1 Missing :warning:
src/mozanalysis/bq.py 0.00% 1 Missing :warning:
src/mozanalysis/frequentist_stats/bootstrap.py 50.00% 1 Missing :warning:
src/mozanalysis/metrics/__init__.py 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #211 +/- ## ========================================== + Coverage 77.23% 78.99% +1.75% ========================================== Files 23 23 Lines 1028 1033 +5 ========================================== + Hits 794 816 +22 + Misses 234 217 -17 ``` | [Flag](https://app.codecov.io/gh/mozilla/mozanalysis/pull/211/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla) | Coverage Δ | | |---|---|---| | [project](https://app.codecov.io/gh/mozilla/mozanalysis/pull/211/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla) | `78.99% <71.18%> (?)` | | | [py38](https://app.codecov.io/gh/mozilla/mozanalysis/pull/211/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mozilla#carryforward-flags-in-the-pull-request-comment) to find out more.

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

jaredsnyder commented 5 months ago

Okay changes reverted and select is set to ['E', 'F']