-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
IMP: Simplify qe.timeit function with verbose parameter and update version to 0.10.1 #797
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
Conversation
Co-authored-by: mmcky <[email protected]>
|
@copilot let's remove the |
- Remove silent parameter from Timer class entirely - Remove silent parameter from timeit function - Update all logic to use only verbose parameter - Update all tests to use verbose=False instead of silent=True - Remove backward compatibility tests for silent parameter - Simplify API to have only one parameter controlling output behavior Co-authored-by: mmcky <[email protected]>
Done! I've removed the Key changes:
Commit: 08efcc0 |
|
@copilot can you please update the version to |
Co-authored-by: mmcky <[email protected]>
The
qe.timeitfunction had two main issues that made it less user-friendly:silentandverboseparameters controlled output, creating unnecessary complexityThis PR addresses all issues by simplifying the API and adding cleaner output formatting:
New Parameters
verbose(default True): Controls output formatting. WhenTrue, all timing information is collected and printed cleanly in one block at the end. WhenFalse, suppresses all output.results(default False): Controls return value. WhenTrue, returns timing dictionary for analysis. WhenFalse, returnsNonefor cleaner interactive use.API Simplification
silentparameter: Eliminated the confusing dual-parameter system. Now onlyverbosecontrols output behavior.verboseparameter instead ofsilent.Before and After
Before:
After:
Usage Examples
Breaking Changes
silentparameter removed: Code usingsilent=Trueshould be updated toverbose=Falsestats_onlyparameter continues to work as beforeVersion Update
Updated package version to
0.10.1in preparation for the new release.Fixes #796.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.