NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 62 forks source link

Post capgen unification: pylint code #547

Open climbfuji opened 4 months ago

climbfuji commented 4 months ago

Description

As of 2024-03-08:

> cd test
> ./pylint_test.sh
...
------------------------------------------------------------------
Your code has been rated at 8.48/10 (previous run: 8.48/10, +0.00)

This is likely going to change while we transition from prebuild to capgen and add, remove, modify features.

Solution

Fix coding style after capgen unification

Alternatives (optional)

Leave as is - not a good idea

Related to (optional)

n/a

nusbaume commented 4 months ago

It would be great too to make a Github Action that automatically runs pylint against the relevant files and fails if the score is below some threshold. Although if there is interest then it should probably be done after pylint_test.sh produces good scores, or else the test will constantly fail.

climbfuji commented 4 months ago

Also, we don't have to use pylint. There are other utilities like pycodestyle and black.

mkavulich commented 3 months ago

@nusbaume Rather than have a specific threshold I wonder if it would be possible to just not allow the pylint score to decrease? That way we're either doing no harm, or improving things.