fix(cli): honor --folderoutput for xlsx output - #3117
Open
twelfthlabor wants to merge 1 commit into
Open
twelfthlabor wants to merge 1 commit into
twelfthlabor wants to merge 1 commit into
Conversation
The txt and csv branches join --folderoutput into the result path
(and create the directory if missing), but the xlsx branch hardcoded
f'{username}.xlsx', writing the spreadsheet to the current working
directory and silently ignoring --folderoutput.
Mirror the csv branch's path handling for the xlsx filename.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3115
Problem
--folderoutputis honored by the--txtand--csvbranches, but the--xlsxbranch hardcodesDataFrame.to_excel(f"{username}.xlsx", ...)and always writes to the current working directory, silently ignoring--folderoutput.Fix
Mirror the csv branch's path handling verbatim in the xlsx branch:
os.makedirs(folderoutput, exist_ok=True)+os.path.join(folderoutput, f"{username}.xlsx"). No changes to txt/csv branches,--outputhandling, or theresponse_time_slogic (#2891/#3077 territory — intentionally untouched).Testing
test_xlsx_honors_folderoutput(offline, spies onpd.DataFrame.to_excelto capture the resolved path):master(CWD-relative path)--folderoutput)pytest tests -m "not online" -q→ 15 passedruff check: zero new findings vs masterVerification
Independently re-verified on a fresh checkout: diff touches only the xlsx call site (+8/-1) and tests; csv mirror fidelity confirmed side-by-side; no-
--folderoutputbehavior byte-identical to master.