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

install ruff in dev environment #1514

Closed

Conversation

danieleades
Copy link
Contributor

@danieleades danieleades commented Feb 11, 2024

installs ruff inside the poetry environment

  • pins the ruff linter/formatter version (prevents unrelated changes in PRs due to changes in lint rules or formatting)
  • consistent linting/formatting for all contributors
  • the ruff vscode extension prefers ruff version installed in environment to bundled version
  • allow contributors to call ruff manually (poetry run ruff ...)

Copy link

codecov bot commented Feb 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (74bba54) 97.33% compared to head (747fa2b) 97.33%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1514   +/-   ##
=======================================
  Coverage   97.33%   97.33%           
=======================================
  Files          48       48           
  Lines        4537     4543    +6     
=======================================
+ Hits         4416     4422    +6     
  Misses        121      121           
Flag Coverage Δ
unittests 97.33% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@danieleades
Copy link
Contributor Author

what needs to be updated to get the flake.nix jobs working? these are a complete mystery to me

Copy link
Member

@sisp sisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project uses Nix for setting up the dev environment including tools like pre-commit and Ruff. Hence, Ruff shouldn't be installed via Poetry. I believe that if you set up your dev environment via Nix and start VS Code from an active Nix environment, then VS Code's Ruff extension should pick up the ruff binary installed by Nix.

/cc @yajo

@danieleades
Copy link
Contributor Author

danieleades commented Feb 11, 2024

This project uses Nix for setting up the dev environment including tools like pre-commit and Ruff. Hence, Ruff shouldn't be installed via Poetry. I believe that if you set up your dev environment via Nix and start VS Code from an active Nix environment, then VS Code's Ruff extension should pick up the ruff binary installed by Nix.

/cc @yajo

ah i see, i was using the Poetry environment

so what sets the version of Ruff?

@danieleades
Copy link
Contributor Author

I had a deeper dive into the way the nix environment is set up in this repo. It's... complex. There's an awful lot of indirection there.
Nevertheless, I think it renders this PR redundant, no?

@sisp
Copy link
Member

sisp commented Feb 11, 2024

I had a deeper dive into the way the nix environment is set up in this repo. It's... complex. There's an awful lot of indirection there.

Interest in joining #1468?

Nevertheless, I think it renders this PR redundant, no?

Yes 🙁

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

Successfully merging this pull request may close these issues.

2 participants