Skip to content

Dev - #40

Merged
vertesy merged 12 commits into
mainfrom
dev
Sep 2, 2026
Merged

Dev#40
vertesy merged 12 commits into
mainfrom
dev

Conversation

@vertesy

@vertesy vertesy commented Sep 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

vertesy and others added 11 commits August 6, 2025 11:52
…-documentation

Polish function documentation
* Annotate code; flag 3 pre-existing bugs (not fixed)

* Fix 3 bugs flagged in PR #30 review

- read.simple.ssv(): add missing `asTibble` parameter (was referenced
  but never defined, erroring whenever wRownames = TRUE, the default).
- write.simple.xlsx(): assignRownames() now uses its own argument `x`
  instead of the undefined `df`, fixing has_row_names = FALSE.
- qs.2.table(): fix `qs:qread` -> `qs::qread`, use the real
  `stringi::stri_detect_regex` function, and define `base_filename`/
  `out_path` on every branch so the function actually runs. Also adds
  `stringi` to Imports/NAMESPACE since it's now genuinely used.

Co-authored-by: Abel Vertesy <5101911+vertesy@users.noreply.github.com>

* Fix qs.2.table()'s excel branch crashing on a bare data.frame

write.simple.xlsx() requires a list of sheets; qs.2.table() was
passing the loaded table directly, which fails its
is.data.frame(x)-per-element assertion. Wrap it in a list first.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Abel Vertesy <5101911+vertesy@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
# Conflicts:
#	DESCRIPTION
#	R/ReadWriter.R
#	R/list.of.functions.in.ReadWriter.md
#	README.md
#	man/column.2.row.names.Rd
#	man/read.simple.csv.named.vector.Rd
#	man/read.simple.ssv.Rd

Co-authored-by: vertesy <5101911+vertesy@users.noreply.github.com>
…on xlsx export

- DESCRIPTION: add stringi to Imports, since R/ReadWriter.R now calls
  stringi::stri_detect_regex() and NAMESPACE already declares the importFrom.
- write.simple.xlsx(): when has_row_names = FALSE, the identifier column is
  moved into row names via column.2.row.names() before writing. The final
  write.xlsx() call still passed the original has_row_names (FALSE) as
  rowNames, so those converted identifiers were dropped from the workbook.
  Track the post-conversion state separately (write_row_names) and pass that
  to write.xlsx() instead.

Co-authored-by: Abel Vertesy <5101911+vertesy@users.noreply.github.com>
Replaces the per-file file.remove() call with a single call that matches every generated list.of.functions.in.*.det.md report by pattern (this repo generates 2: ReadWriter and Deprecated.Functions -- only the first was ever cleaned up before). The old line is commented out, not deleted.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Pass dirname(path) as manual_directory and the extensionless
basename(path) as manual_file_name for every output branch, so
construct.file.path() no longer prepends getwd() to an already
absolute filename (Codex review feedback on #38).

Co-authored-by: Abel Vertesy <5101911+vertesy@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 394b1a012f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread R/ReadWriter.R
Comment on lines +1162 to +1163
out_dir <- dirname(base_filename)
out_name <- basename(base_filename)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Pass the split directory to the Excel writer

When out_file = "excel" and path is absolute, the newly computed out_dir and out_name are ignored by the Excel branch, which still passes the full base_filename as manual_file_name. Because write.simple.xlsx() leaves manual_directory unset, construct.file.path() prepends getwd(), so the write can target an invalid path and the reported out_path is not where the file was written. Pass these split components to the Excel writer as is done for the three text branches.

Useful? React with 👍 / 👎.

@vertesy

vertesy commented Sep 2, 2026

Copy link
Copy Markdown
Owner Author

@codex:

Please provide a proper solution in This PR, as a commit, which addresses the problem you raised.

" Pass the split directory to the Excel writer

When out_file = "excel" and path is absolute, the newly computed out_dir and out_name are ignored by the Excel branch, which still passes the full base_filename as manual_file_name. Because write.simple.xlsx() leaves manual_directory unset, construct.file.path() prepends getwd(), so the write can target an invalid path and the reported out_path is not where the file was written. Pass these split components to the Excel writer as is done for the three text branches."

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • Updated the Excel branch of qs.2.table() to pass the already-split out_name and out_dir values to write.simple.xlsx(), matching the text-output branches and preserving absolute output directories. R/ReadWriter.RL1158-L1178
  • Committed the change as 471b9b7 (Fix Excel output path for QS conversion).
  • Created PR metadata titled “Fix Excel output paths for QS conversion” with a summary and testing details.

Testing

  • ✅ git diff --check
  • ✅ R -q -e "parse(file = 'R/ReadWriter.R'); cat('R source parsed successfully\n')"
  • ⚠️ R -q -e "devtools::document()" (environment lacks the required Stringendo package, and installed roxygen2 7.3.1 is older than the required 7.3.2)
  • ⚠️ R -q -e "devtools::check(document = FALSE)" (environment lacks required packages: Stringendo, gtools, openxlsx, qs, and readr)
  • ✅ git status --short --branch (working tree clean after commit)

View task →

@vertesy
vertesy merged commit 8168a95 into main Sep 2, 2026
@vertesy
vertesy deleted the dev branch September 2, 2026 13:26
@vertesy
vertesy restored the dev branch September 2, 2026 13:27
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