pre-commit hooks for Cookbooks?

Open
#119 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
github
Domain
ci-cd, tooling

Research direction

Review the .pre-commit-config.yaml in the cookbook-template and compare it with the pre-commit.ci setup in Project Pythia Foundations. Check how existing Cookbook repositories were copied from the template and inspect the Contributor's Guide references. Done requires choosing one of the three consistency options and carrying it through for the affected repositories, with any needed guidance documented.

Written by the indexing model from the issue text.

Description

infrastructure

I'm confused about the current state of our reliance on pre-commit for code quality.

In Foundations we have pre-commit.ci running on every PR. This service runs as a GitHub App linked to the Foundations repo.

I don't think we've ever turned this on for any Cookbook repos.

However as of https://github.com/ProjectPythia/cookbook-template/pull/103 the Template repo has a .pre-commit-config.yaml, and pre-commit was run locally once on the repo.

All subsequent copies of the Template have the .pre-commit-config.yaml file included, but we're using it for anything.

It would be great to get this cleaned up for consistency. I see three options:

  1. Get rid of the .precommit-config.yaml file, don't enforce any code style
  2. Add guidance to our Contributor's Guide on how to install and run pre-commit locally on a Cookbook repo
  3. Switch on the pre-commit.ci service for all existing Cookbook repos, and add guidance on how to do this for new Cookbooks.

Option 3 results in the strictest adherence to consistent code quality and formatting, with some potential for user confusion.

Option 1 is the easiest.

Option 2 is a wishy-washy bad compromise in my opinion.

@ProjectPythia/infrastructure thoughts?

Dominant language
Jupyter Notebook
Stars
25
Forks
29
Avg merge
3d 16h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ProjectPythia/cookbook-template

All issues in ProjectPythia/cookbook-template

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.