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

Adopt ruff as the central tool for linting and formatting #920

Merged
merged 8 commits into from
Jan 21, 2025

Conversation

tomvothecoder
Copy link
Collaborator

@tomvothecoder tomvothecoder commented Jan 17, 2025

Description

Summary of Changes

  • Replace black, isort, flake8, and flake8-isortwithruff
    • Affected files: .pre-commit-config.yaml, e3sm_diags.code-workspace, Makefile, dev.yml, ci.yml, pyproject.toml, project-standards.rst
    • Delete setup.cfg
  • Address ruff issues

Future ruff issues to address (ignored)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

If applicable:

  • New and existing unit tests pass with my changes (locally and CI/CD build)
  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have noted that this is a breaking change for a major release (fix or feature that would cause existing functionality to not work as expected)

@tomvothecoder tomvothecoder marked this pull request as ready for review January 17, 2025 20:26
@tomvothecoder
Copy link
Collaborator Author

tomvothecoder commented Jan 21, 2025

FYI @chengzhuzhang and @forsyth2 this PR consolidates the DevOps tooling to just ruff. You just need to rebuild the e3sm_diags dev env to use it

conda env create -f conda/dev.yml
conda activate e3sm_diags_dev
pre-commit install
pre-commit run --all-files

@tomvothecoder tomvothecoder merged commit df39bf4 into main Jan 21, 2025
6 checks passed
@tomvothecoder tomvothecoder self-assigned this Jan 21, 2025
@tomvothecoder tomvothecoder added the DevOps CI/CD, configuration, etc. label Jan 21, 2025
@tomvothecoder tomvothecoder deleted the devops/918-ruff branch January 21, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment