-
Notifications
You must be signed in to change notification settings - Fork 11
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
Thoughts / observations about arguments / fn name consistency. #681
Comments
Regarding snapshot tests, I never read the docs, the folder appeared, I set it to be ignored. I don't know what it's good for,
The remaining issues have to wait for another time. I'm really tired and it's been a long day/week already. You have a good eye and I'm impressed by your hands on approach, thanks! |
No problem! I really appreciate your work! I think it can be really useful. Always appreciate an actively maintained package. No rush, I just wanted to record my thoughts while browsing the source code! Regarding tibbles, I understand, I may just make my own wrappers when needed, it's pretty simple |
Just so I am sure of where the package is headed:
It is because I probably want to do another PR to update examples, tweak the reference function index and finalize vignettes review/ Also, before removing It would be very good to do an article/blog post of openxlsx2 0.7.1 -> openxlsx2 1.0.0 to summarise thoughts / philosophy |
# pipe
wb <- wb_workbook() |> wb_add_worksheet()
# chain
wb <- wb_workbook()$add_worksheet() In The vignettes should be updated, that's a task for the release, but can be done after 1.0. To me 1.0 is merely a fix point from whereon I want to call the API somewhat stable. Like it is not changing unless really required. I will still develop for and with it, therefore it is not the end of the line or necessarily a full tested entirely stable package. But a huge reason why I'm so annoyed by the tidyverse is the constantly changing API. I get it from a developer point of view, but ... I'm not employed as a developer and in my job I need some continuity. If I have to rerun an analysis from last year, I do not have the time to read into the newest tidyverse packages and relearn everything from scratch (I know about I'll think about the blog post, but I'm of the opinion that not so much is changing here. It's still not easy to get peoples opinion on your software. Maybe people are using and loving |
More camelCase from class_workbook_wrappers.R (I reenabled the
|
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Regarding Regarding the |
I think they should be kept around, but I think they shouldn't be advertised i.e export + document, but not mentioning in reference index, or vignettes. |
Unless you want to rewrite them, I'd say we leave this. As stated, I do not care, they work for me and it's unlikely that others want to use this.
It's a long term to do. Not high on my long To-Do list
Yeah, it's the underlying driver for
Unfortunately I do not think there is much for us to do. Jordan and I agreed that we didn't want to duplicate the roxygen code and even the pkgdown page is very much unreadable. The user should always try to look for the wrapper function man page.
Can live with the current example. After all, this is a function that is probably never going to be used ever. Creating custom table styles is quite a complex task and I would not recommend it at all. Instead I would try to create a function for custom pivot table styles! :)
Ongoing task
Should be fine now. All public facing functions should now use
We might make it internal and ignore the short timespan it was publicly used.
Would be nice, but ... we'll see if there is time.
If we make this internal, we do not have to care anymore. And now for the controversial part...
I don't want to change this.
I dont like either, because
I don't see anything wrong with this. Yes we have
I don't want to become a fanatic now, tackling ever camel case I see, but this should be simple, just match the snake case code in the function.
Usually these will go in some file that will never be touched again, maybe even
It's a known behavior of R6 (see also #251). Unfortunately the answer seems to be: for autocomplete use pipes. |
Thanks for your reply! I edited in the original comment to reflect this! On my part, I may open 1-2 more doc-related PRs if that's okay with you |
Sure! But please, before you put in a lot of time into something, ask if this is something worth going for. I know I'm a bit annoying with what I want and what I don't. This is just to avoid frustration for everyone involved. |
I am sorry that I caused frustration, :( Hope my latest PR is not as bad as the last one. But I was thinking 3 PRs
|
No sorry, you got that wrong. I'm not frustrated, I want to avoid frustration on your side. Sometimes people want to contribute a huge pull request, but it's either not the right time, or not wanted by the author(s). Obviously if one has invested a lot of time on something, this rejection obviously causes frustration. Therefore, I often feel that a mutual agreement on the course of action can avoid this or at least soften the severity. For a while I've been doing this solely, now at least there's someone actively looking at the code! |
Finally, I came across the
I think that the
Or maybe, some set functions are the exact copy of add, in this case, deprecate and suggest the add function. |
Ideally Since modifications in these would break much of the API, this would be a task for |
I completely understand! I may add some of these explanations in the function index. I just wanted to point it out! And if someone has the need for a new |
|
Yes we can switch it for consistency. I'm a bit under the weather and open a PR soon. Might be last minute change for the pending release 0.8 |
Thanks for the work and your patience! Closing this for now! I may come back when / if you decide to another round of cleanups, but the package looke good now imo! less exported functionw consistent arguments and function names Bravo! |
I have to thank you for the input. Really appreciate it! Hopefully you too got something out of this experience. Maybe a better working package or a broader understanding of what's going on inside |
I understand completely! This is your package after all. You have more experience than I have also. I am really glad you listened to my advice. Because for me, this important gain in consistency will allow me to write for production, teach and recommend it around me. Props on the argument changes, this looked long to do, but a worthwhile change for the future! I like that the syntax of openxlsx2 is now much more intuitive than openxlsx (I always struggled with it) hopefully, many more people start using it and openxlsx2 will be the reference package in a few years. Edit: I have never done that, but I may write a blog post about this, trying to advertise it a little more on social medias. |
Don't sell yourself and your contributions short! Well see what the future brings, I fear a small few fallout will happen. Some of my own old code was already screaming at me, but after all, like you said, it should be a change for the future. Edit1: Haha, well go ahead! From time to time I try to add references in stack overflow, but I'm not a sales person and I don't really care if others us my projects. First and foremost I write packages because I need the functionality. Edit2: I'm not creative enough for a logo and the previous one was thrown at Philip and me, and that was somewhat unpleasant even though I like it. I had experimented with something in text to image functions like "XML going into a spreadsheet", but you can imagine how well that worked. Maybe a tiny turtle or something. Anyways another thing I don't care about, I never choose software because of a fancy logo or something. At least I like to think so! 😄 |
Priorities
xlsx_file
argument (may open an issue for that for discussion?really could just be
file
, other data import packages like readxl, haven, readr use path or file. I disagree with usingx
as it's more widely used for a vector or for data, not for a file.file
is used inwb_load()
(Gh issue 681 pt2 #708)path
->file
inwb_save()
What I may do
wb_row_heights.Rd
, other examples. Separatecreate_comment()
fromwb_add/remove()
for consistency.Low priorities
wbChartSheet
is untested, and I couldn't find much doc.'wb_chartsheet()
which can be used withwb_add_mschart()
and loaded charts. There is not much to test.params
inwb_add_conditional_formatting()
to snake_caseDone
Snapshot tests should not be git ignored (i.e.Oops no snapshot tests, my bad._snaps
), but I guess you had your reasons why?openxlsx2 doesn't really work, I see that you copied yourworks after Update vignettes to snake_case, and other code quality updates #682openxlsx2.R
fromopenxlsx.R
vertAlign
(Gh issue 681 pt1 #693)Export(wb_dims() provide wb_dims() #691 ) Userowcol_to_dim
to be put indims
helper, or userowcol_to_dims()
everywhere. and use the internal helperrowcol_to_dim()
if length is 1?wb_dims()
when necessary (Gh issue 681 pt1 #693)In some exported functions, the default argument isrowcol_to_dim(...)
, which is undocumented currently.ws_*
prefix,->wb_
(Gh issue 681 pt1 #693)wb_add_comment()
@keywords internal
tag, (Stop advertising functions that don't fit in openxlsx2 API #694) and separatewb_add_data_table()
doc.data_table
vsdatatable
(this may be not that useful, as it's only for internal consistency.), thewrite_datatable()
exists.write_data()
andwrite_datatable()
are powered bywrite_data_table()
. (Stop advertising functions that don't fit in openxlsx2 API #694)wbWorkbook
doc improvement (ImprovewbWorkbook
documentation. #718)Not planned
The helperNot planned, however, I think that maybe downloading the zip with https://github.com/JanMarvin/openxlsx-data/archive/refs/heads/main.zip may be of interest, later. Fixed!download_testfiles()
did not work for me. (I had to manually download them from the repo, and place them in thetestfiles
directory.na.strings
, I think should be justna
, (readr and readxl uses this argument)na.numbers
could be merged.. (I am not aware of all use cases however.. but anyway, should be renamed to snake case toofont_name
will not change, sofont
andfont_name
coexistpackage options will remain in camelCase as they are not used in code, it doesn't matter.
Autocomplete works only for pipe functions
wb_*
, as it is a known behavior of R6 (custom `.DollarNames` #251 is related)The text was updated successfully, but these errors were encountered: