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 pre-commit hooks with ruff formatter/linter rules #26

Merged
merged 5 commits into from
Nov 10, 2023
Merged

Commits on Nov 10, 2023

  1. 🔧 Add pre-commit config with pre-commit-hooks and ruff

    Adding a .pre-commit-config.yaml file with some pre-commit hooks and the ruff linter/formatter. The ruff linter is configured to do autofix, and will run on python scripts and jupyter notebooks.
    weiji14 committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    6d659d7 View commit details
    Browse the repository at this point in the history
  2. 🔧 Configure ruff rules with pyproject.toml file

    Enforce certain ruff formatting and lint rules such as UNIX-style line-endings, pycodestyle, pyflakes, isort, numpy, pylint and pyupgrade.
    weiji14 committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    a3c72aa View commit details
    Browse the repository at this point in the history
  3. 🚨 Fix F841 by returning cli variable

    Fix `F841: Local variable `cli` is assigned to but never used` on trainer.py.
    weiji14 committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    d4ab67a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    012a7a8 View commit details
    Browse the repository at this point in the history
  5. 🔧 Configure pre-commit.ci to run autoupdates on quarterly basis

    Setting up pre-commit.ci to only run updates quarterly instead of the weekly default. Also explicitly stating that Pull Requests will be autofixed.
    weiji14 committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    2510fce View commit details
    Browse the repository at this point in the history