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

Add repo-review #456

Merged
merged 5 commits into from
Sep 20, 2024
Merged

Add repo-review #456

merged 5 commits into from
Sep 20, 2024

Conversation

ukmo-ccbunney
Copy link
Contributor

@ukmo-ccbunney ukmo-ccbunney commented Sep 17, 2024

🚀 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
Copy link
Contributor Author

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
Copy link
Member

bjlittle commented Sep 17, 2024

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
Copy link
Contributor Author

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 ukmo-ccbunney changed the title Add repo-review GHA Add repo-review Sep 18, 2024
@ukmo-ccbunney
Copy link
Contributor Author

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.

Copy link
Contributor

@HGWright HGWright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the one thing to do and then I'm happy to merge this in!

pyproject.toml Show resolved Hide resolved
@ukmo-ccbunney ukmo-ccbunney marked this pull request as ready for review September 19, 2024 14:08
Copy link
Contributor

@HGWright HGWright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @ukmo-ccbunney!

@HGWright HGWright merged commit 9efd012 into SciTools:main Sep 20, 2024
14 checks passed
@bjlittle
Copy link
Member

Bingo! Nice one @ukmo-ccbunney 🔥🚀

stephenworsley added a commit to rcomer/cf-units that referenced this pull request Sep 24, 2024
* main:
  [pre-commit.ci] pre-commit autoupdate (SciTools#425)
  Adopt cython3 (require >=3) (SciTools#460)
  Add repo-review (SciTools#456)
  Fully support Python 3.12 (SciTools#461)
  Bump peter-evans/create-pull-request from 6.0.4 to 7.0.5 (SciTools#459)
  Fix for bad git path in GHA macos instances. (SciTools#464)
  test macos wheels (SciTools#458)
  Bump pypa/cibuildwheel from 2.20.0 to 2.21.1 (SciTools#457)
  Fixes for CI wheels (SciTools#455)
  Dependabot check weekly. (SciTools#439)

# Conflicts:
#	.pre-commit-config.yaml
#	cf_units/tests/test_coding_standards.py
#	pyproject.toml
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.

adopt repo-review (with initial config)
3 participants