Skip to content

Use ruff format for code formatting - #1032

Merged
glass-ships merged 9 commits into
mainfrom
issue-965-drop-black
Aug 5, 2025
Merged

Use ruff format for code formatting#1032
glass-ships merged 9 commits into
mainfrom
issue-965-drop-black

Conversation

@ptgolden

@ptgolden ptgolden commented Apr 1, 2025

Copy link
Copy Markdown
Member

Related issues

Summary

Drops black as a dependency, in favor of using ruff format as a formatter. On my machine, it's a ~100x speedup.

There's a small change to the makefile too. Instead of using the --exit-zero flag in ruff check, the command is prefixed with - to continue running even after a non-zero exit code.

Checks

  • All tests have passed (or issues created for failing tests)

@netlify

netlify Bot commented Apr 1, 2025

Copy link
Copy Markdown

Deploy Preview for monarch-app canceled.

Name Link
🔨 Latest commit ceec9f5
🔍 Latest deploy log https://app.netlify.com/sites/monarch-app/deploys/67ec5edff4be45000810ca5a

@ptgolden

ptgolden commented Apr 1, 2025

Copy link
Copy Markdown
Member Author

I'm not sure why the frontend linting test is failing. Is it not passing on main?

@codecov

codecov Bot commented Apr 1, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 72.07%. Comparing base (6b16e2c) to head (83df814).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
backend/src/monarch_py/utils/utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1032   +/-   ##
=======================================
  Coverage   72.07%   72.07%           
=======================================
  Files          92       92           
  Lines        3255     3255           
=======================================
  Hits         2346     2346           
  Misses        909      909           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@amc-corey-cox

Copy link
Copy Markdown
Collaborator

Hmm, @ptgolden I tried re-running the lint test again and it still failed. When you get a chance can you take another look at this?

@glass-ships

glass-ships commented May 13, 2025

Copy link
Copy Markdown
Contributor

I tried running bun run lint locally to see if i could just patch this real quick, but it's hanging on some new errors I haven't gotten before...

Depending on how we feel about #890, that has a number of frontend dependency updates and makes use of now-deprecated methods of eslint config etc. that may resolve this.

Edit: I was apparently missing some dependencies, bun install got me back in working order.
It may also be worth considering pre-commit and pre-commit ci, we use it pretty extensively at ORNL and it's been really nice!

@netlify

netlify Bot commented May 13, 2025

Copy link
Copy Markdown

Deploy Preview for monarch-app ready!

Name Link
🔨 Latest commit 83df814
🔍 Latest deploy log https://app.netlify.com/projects/monarch-app/deploys/687fa3133827fe0008b621d2
😎 Deploy Preview https://deploy-preview-1032--monarch-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@glass-ships

Copy link
Copy Markdown
Contributor

rebased from main to include the switch to uv from poetry

@glass-ships
glass-ships merged commit 399fd23 into main Aug 5, 2025
12 checks passed
@glass-ships
glass-ships deleted the issue-965-drop-black branch August 5, 2025 14:09
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.

Use ruff as code formatter

3 participants