Skip to content

Use ruff format for code formatting #1032

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

ptgolden
Copy link
Member

@ptgolden ptgolden commented Apr 1, 2025

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)

Copy link

netlify bot commented Apr 1, 2025

Deploy Preview for monarch-app canceled.

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

@ptgolden
Copy link
Member Author

ptgolden commented Apr 1, 2025

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

Copy link

codecov bot commented Apr 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.39%. Comparing base (2f7bef4) to head (fbee551).
Report is 23 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1032      +/-   ##
==========================================
+ Coverage   70.97%   71.39%   +0.42%     
==========================================
  Files          91       92       +1     
  Lines        3128     3188      +60     
==========================================
+ Hits         2220     2276      +56     
- Misses        908      912       +4     

☔ 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
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
Copy link
Collaborator

glass-ships commented May 13, 2025

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!

Copy link

netlify bot commented May 13, 2025

Deploy Preview for monarch-app ready!

Name Link
🔨 Latest commit fbee551
🔍 Latest deploy log https://app.netlify.com/sites/monarch-app/deploys/68236e99976d800008a6accb
😎 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 site configuration.

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