Skip to content
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

75 page setup #146

Merged
merged 10 commits into from
Apr 28, 2022
Merged

75 page setup #146

merged 10 commits into from
Apr 28, 2022

Conversation

jmbarbone
Copy link
Collaborator

related to #75

A few smaller fixes, too

op <- openxlsx_options()
on.exit(options(op), add = TRUE)

wb_page_setup <- function(
Copy link
Owner

Choose a reason for hiding this comment

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

just for reference: I named it ws_ because it's impacting only a single worksheet and not an entire workbook.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, I see. I think right now the wb_ prefix denotes three main things:

  1. first param is a wbWorkbook
  2. the wbWorkbook object is altered
  3. the wbWorkbook object is returned

A ws_ prefix would make sense, to me, if this accepted, altered, and returned a wbWorksheet object rather than the wbWorkbook object.

wb <- 
  wb_workbook() |>
  wb_add_worksheet("a") |>
  wb_page_setup("a", ...)

ws <- 
  # but here the wb_ prefix creates and returns the ws object...
  wb_worksheet() |> 
  ws_page_setup()

wb <- 
  wb_workbook() |>
  wb_add_worksheet(ws)

Copy link
Owner

Choose a reason for hiding this comment

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

I agree, it's just why I named it the way I did. My last defence: you didn't stop me :)

@JanMarvin
Copy link
Owner

Codecov Report

Merging #146 (9a1abcf) into main (297d88a) will increase coverage by 0.05%.
The diff coverage is 80.41%.

@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
+ Coverage   72.81%   72.87%   +0.05%     
==========================================
  Files          37       37              
  Lines        7250     7266      +16     
==========================================
+ Hits         5279     5295      +16     
  Misses       1971     1971              
Impacted Files Coverage Δ
R/class-workbook.R 69.17% <75.32%> (+0.25%) ⬆️
R/class-workbook-wrappers.R 47.67% <100.00%> (-2.53%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 297d88a...9a1abcf. Read the comment docs.

@JanMarvin JanMarvin merged commit 4ac93d4 into main Apr 28, 2022
@JanMarvin
Copy link
Owner

Another-one in!

@jmbarbone jmbarbone deleted the 75-page-setup branch May 5, 2022 15:00
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.

None yet

2 participants