NCAR / NCAR/ccpp-framework

Adopt a Python formatter and linter for the framework

Open
#702 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
25
Forks
67
Avg merge
3d 8h
Merged PRs (30d)
2

Description

Description

At the CCPP framework meeting on 12/4/2025 it was decided to adopt a Python formatter and linter.

One suggestion was a combination of black, flake8, and isort. An alternative suggestion was ruff.

@climbfuji asked the spack developers (spack uses black, flake8, isort at this time) about these tools and why they are not using ruff.

Their response:

We didn’t go with ruff because it didn’t exist 15 years ago. We are currently in the process of switching to ruff.
...
Use ruff. Maybe we’ll switch from mypy to ty when it’s ready. Too early just yet.

Solution

Decide which (set of) tool(s) to use for formatting and linting. Implement the chosen solution in GitHub actions but also look into ways to run this manually on the command line. Document solution as part of the implementation.

Alternatives (optional)

Do nothing

Related to (optional)

A related issue will be created for formatting and linting Fortran.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by comparing the proposed Black, Flake8, isort, and Ruff options, then review how the repository's GitHub Actions can run the selected tools. Done means the choice is implemented in GitHub Actions, can also be run manually from the command line, and is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, documentation, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.