Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial setup of QA pre-commit tools [cf-units] #522

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

ukmo-ccbunney
Copy link
Contributor

🚀 Pull Request

Description

Added following pre-commit hooks:

  • Extra "default" hooks from pre-commit (trailing whitespace, etc)
  • MyPy
  • codespell
  • validate_pyproject
  • numpydoc

sp-repo-review was already setup for cf-units, but have updated the ignore list as various tests now pass.

ruff was enabled, but with only selected tests. Have enabled "all" tests.

For all QA tools above, the results of any "auto-fixes" have been included in this repo, mainly fixes for:

  • trailing whitespace
  • missing newline at end of file
  • docstring reformatting
  • some code style linting from ruff

All other failing tests have been added to ignore lists. See separate issues:

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 81.48148% with 10 lines in your changes missing coverage. Please review.

Project coverage is 58.40%. Comparing base (cdf7172) to head (f014c41).

Files with missing lines Patch % Lines
cf_units/__init__.py 80.76% 8 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #522      +/-   ##
==========================================
- Coverage   58.41%   58.40%   -0.02%     
==========================================
  Files          62       62              
  Lines        6435     6433       -2     
  Branches     1150     1150              
==========================================
- Hits         3759     3757       -2     
  Misses       2385     2385              
  Partials      291      291              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ukmo-ccbunney and others added 3 commits November 15, 2024 15:54
- Add trailing / to mypy exclude paths
Added extra ignores in mypy for _udunits generated code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant