SciTools / cf-units

Units of measure as required by the Climate and Forecast (CF) Metadata Conventions
https://cf-units.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
66 stars 49 forks source link

Add repo-review #456

Closed ukmo-ccbunney closed 1 month ago

ukmo-ccbunney commented 1 month ago

🚀 Pull Request

Adds repo-review checker as a pre-commit task

Description

Uses the sp-repo-review plugin to run repository checks based on the Scientific Python Developer Guide

ukmo-ccbunney commented 1 month ago

ci-repo-review task currently (correctly) failing with errors from sp-repo-review checker. Example output: https://github.com/ukmo-ccbunney/cf-units/actions/runs/10906871427/attempts/1#summary-30269150465

bjlittle commented 1 month ago

Have you considered using the pre-commit hook instead?

This would get run by the pre-commit.ci service, but also force contributors to catch non-compliances prior to pushing the pull-request (if they install the pre-commit hooks).

This is the approach I've taken on GeoVista, see here.

I think it's a slicker workflow 👍

ukmo-ccbunney commented 1 month ago

Have you considered using the pre-commit hook instead?

This would get run by the pre-commit.ci service, but also force contributors to catch non-compliances prior to pushing the pull-request (if they install the pre-commit hooks).

This is the approach I've taken on GeoVista, see here.

I think it's a slicker workflow 👍

Thanks @bjlittle - I'll checkout the pre-commit approach.

ukmo-ccbunney commented 1 month ago

Modified this to hook in sp-repo-review as a pre-commit task, rather than a GHA.

sp-repo-review reports plenty of failures (expected), so I have added these to the ignore list for now in the pyproject.toml. Assumedly, we will want to raise separate Issues for those we want to address.

bjlittle commented 1 month ago

Bingo! Nice one @ukmo-ccbunney :fire::rocket: