bitcoin-dev-project/warnet

Ruff CI and external code

Closed this issue · 2 comments

Issue

The ruff CI check fails when I copy/paste the replacement cycling functional test into our scenarios folder.

Cause

Functional tests written by external authors do not necessarily conform to ruff's linting standards, and our CI won't pass unless ruff is happy.

Possible solutions

  1. Run ruff against other people's functional tests, altering their formatting to make ruff happy (current solution)
  2. Add the scenarios folder to ruff's exception list
  3. Create an external folder within scenarios to hold external scenarios, and add external to ruff's exception list

Id argue against 1 unless we are supplying an automatic formatter for people. Seems like it would just discourage people from writing scenarios and I don't see a lot of value anyways in ensuring scenarios are well formatted? 3 seems nice, or even just 2 for simplicity.

I propose the simplicity option here: #359

We currently have a single folder, and I figure keeping it simple for now will give us the opportunity to create more complex folder structures as specific needs arise.