masa-finance / masa-bittensor

Bittensor Subnet Config
https://masa.ai
MIT License
0 stars 0 forks source link

Add Nox for Black formatting and Flake8 linting on pre-commit & CI #106

Open juanmanso opened 1 week ago

juanmanso commented 1 week ago

Description

After #103, we want to implement Nox with some very simple tasks to keep building on top of it whenever needed in the future.

The goal is to have the framework set to enforce code styling both on commits and CI. However, won't turn that on yet, since current codebase does not comply with all the linting rules (task [tbd] is meant to do that).

Acceptance criteria

It is expected that these checks fail so:

Related issues

obasilakis commented 3 days ago

Can we please just do pre-merge formatting and linting checks instead of pre-commit? Oftentimes you just want to add a WIP commit and these hooks slow down development.

juanmanso commented 3 days ago

I don't mind which path we chose tbh. I'd say we could:

  1. Have pre-commit hooks but use --no-verify on commits to avoid getting blocked on WIP commits
  2. Have pre-commit setup with warning rather than error (not block commits)
  3. Not having pre-commits at all

I'd say that for development pre-commits are better due to fail fast philosophy. Still, it might go against some of our workflows as @obasilakis described so we could keep it flexible with options 1 and 2