Skip to content

speed up cli responsiveness #1972

Merged
atravitz merged 4 commits intomainfrom
fix/slow_cli_import
Apr 30, 2026
Merged

speed up cli responsiveness #1972
atravitz merged 4 commits intomainfrom
fix/slow_cli_import

Conversation

@atravitz
Copy link
Copy Markdown
Contributor

@atravitz atravitz commented Apr 30, 2026

as raised by @dwhswenson - calling the command line is taking ~5s as of v1.11. This PR rearranges some imports so that we're back to aroudn ~0.4 seconds.

Checklist

  • All new code is appropriately documented (user-facing code must have complete docstrings).
  • Added a news entry, or the changes are not user-facing.
  • Ran pre-commit: you can run pre-commit locally or comment on this PR with pre-commit.ci autofix.

Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).

Developers certificate of origin

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

❌ Patch coverage is 63.63636% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.97%. Comparing base (d60fb8e) to head (aa82e09).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/openfecli/commands/test.py 0.00% 4 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1972   +/-   ##
=======================================
  Coverage   94.97%   94.97%           
=======================================
  Files         216      216           
  Lines       20480    20481    +1     
=======================================
+ Hits        19451    19452    +1     
  Misses       1029     1029           
Flag Coverage Δ
fast-tests 90.51% <63.63%> (?)
slow-tests 94.94% <63.63%> (-0.04%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atravitz atravitz requested a review from dwhswenson April 30, 2026 16:46
@atravitz atravitz marked this pull request as ready for review April 30, 2026 16:47
@github-actions
Copy link
Copy Markdown

No API break detected ✅

Copy link
Copy Markdown
Member

@dwhswenson dwhswenson left a comment

Choose a reason for hiding this comment

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

Confirmed locally that this speeds up CLI! Thanks!

Pretty much the changes I expected, too. I note that CodeCov complaints are because the download_only option isn't tested, which seems to be an existing miss, not a new regression (just that some imports got moved in there).

@atravitz atravitz merged commit fa74a35 into main Apr 30, 2026
14 of 15 checks passed
@atravitz atravitz deleted the fix/slow_cli_import branch April 30, 2026 18:33
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