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 Nox for Black formatting and Flake8 linting on pre-commit & CI #106

Open
juanmanso opened this issue Jun 21, 2024 · 2 comments
Open

Comments

@juanmanso
Copy link
Contributor

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

  • On commit by devs, pre-commit hook runs nox sessions for formatting and linting
  • On Push on protected branches, as well as on PRs, CI runs nox sessions for formatting and linting

It is expected that these checks fail so:

  • On commit, only staged code should be checked.
  • CI runs don't block PRs now (until we fix all issues)

Related issues

@obasilakis
Copy link
Contributor

obasilakis commented Jul 1, 2024

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants