bitcoin-dev-project / warnet

Monitor and analyze the emergent behaviors of Bitcoin networks
https://warnet.dev
MIT License
93 stars 35 forks source link

tool: pin ruff version #625

Closed willcl-ark closed 1 month ago

willcl-ark commented 1 month ago

Hopefully this will fix the ruff inconsistencies between local and CI envs.

Install the correct version using uv:

# install
$ uv tool install ruff@0.6.8

# use
$ uvx ruff@0.6.8 check .

If this is the only version you have installed then it may be possible to still use the shorthand, if the version comes back correct:

$ uvx ruff --version
ruff 0.6.8

$ uvx ruff check.
pinheadmz commented 1 month ago
--> uv tool install ruff@0.6.8
error: Failed to parse: `ruff@0.6.8`
  Caused by: Expected path (`/Users/matthewzipkin/0.6.8`) to end in a supported file extension: `.whl`, `.zip`, `.tar.gz`, `.tar.bz2`, `.tar.xz`, or `.tar.zst`
ruff@0.6.8
     ^^^^^
pinheadmz commented 1 month ago

I do like this:

(.venv) --> uvx ruff check .
ruff failed
  Cause: Required version `==0.6.8` does not match the running version `0.6.9`
pinheadmz commented 1 month ago

ok the command that worked for me was uvx install tool 'ruff==0.6.8'

bdp-DrahtBot commented 1 month ago

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

willcl-ark commented 1 month ago

Id suggest adding to the docs somewhere how to install the right version, then lets merge this!

Done