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

[R/save] check that comments are saved correctly #209

Merged
merged 11 commits into from
May 28, 2022
Merged

Conversation

JanMarvin
Copy link
Owner

I've crafted a new example file that contains both issues.

  1. the comment counting is off. we load comments1.xml and comments2.xml. Yet we try to save them with numbers matching their sheet index
  2. the comments are messed up internally


test_that("load comments", {

fl <- system.file("extdata", "pivot_notes.xlsx", package = "openxlsx2")
Copy link
Owner Author

Choose a reason for hiding this comment

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

Wonderful, did not add it and purged my folder 😢

@codecov-commenter
Copy link

codecov-commenter commented May 28, 2022

Codecov Report

Merging #209 (5b3ed30) into main (a16dc8b) will increase coverage by 0.54%.
The diff coverage is 98.03%.

@@            Coverage Diff             @@
##             main     #209      +/-   ##
==========================================
+ Coverage   82.70%   83.24%   +0.54%     
==========================================
  Files          36       36              
  Lines        7400     7414      +14     
==========================================
+ Hits         6120     6172      +52     
+ Misses       1280     1242      -38     
Impacted Files Coverage Δ
R/helperFunctions.R 78.51% <ø> (-0.69%) ⬇️
R/class-workbook.R 77.37% <92.85%> (+1.76%) ⬆️
R/class-comment.R 79.62% <100.00%> (+2.54%) ⬆️
R/wb_load.R 95.76% <100.00%> (-0.02%) ⬇️

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 a16dc8b...5b3ed30. Read the comment docs.

R/class-workbook.R Outdated Show resolved Hide resolved
@JanMarvin
Copy link
Owner Author

JanMarvin commented May 28, 2022

This is still a little work in progress, I've added another comment that needs to be resolved prior merging. Fixed

@jmbarbone part of the mess is caused by me removing strict naming conventions. This was previously a bit broken in openxlsx and (hopefully) is now a bit better implemented, though it is still far from what I want. I'd prefer a reference manager counting what goes in and where and collecting everything when writing the final output. Having all these tingling relationships hardcoded in various files is so annoying. Though fixing it correctly will be another mammoth of a task. Especially because we have references to various files in different places.

Oh and once this is merged, comment class will need another cleanup. we somehow always duplicate authors entry. This is fixed 🥳

@JanMarvin
Copy link
Owner Author

Oh and once this and the encoding part are merged, I'd like to make a minor version bump. Hopefully we've ironed out a good fraction of initial issues

…is an entry in worksheets_rels, we pick it and create our xml name from it. content type matches this id.
@JanMarvin JanMarvin merged commit 2a457f4 into main May 28, 2022
@JanMarvin JanMarvin deleted the comments_counting branch May 28, 2022 22:32
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