-
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
ReferenceClass cleanup #14
Conversation
* corrects assert_style() * adds package option * updates class checks for package * adds all enhancements for classes
* moves bulk of style creation to Style$new() * adds validators for readability * adds better default options that work with match.arg()
Update rc-cleanup
…nto rc-cleanup
@JanMarvin looking at the commit history on If there were updates to the any of the RC classes they may not have been carried over because of the file name changes. Let me know know if there were any I missed and I can reimplement them. |
Thanks, that's huge! I'll try to look at it tomorrow and hope to get it merged soon. |
Seeing this: "Some wrapper functionality have been moved inside the classes (e.g., createStyle() had many checks that have been moved into Style$new(), figuring that initiating the object should also validate the inputs); there are still more to be done" Just to avoid unnecessary work, I highly appreciate the work you do in the cleaning process, but cannot guarantee that the internal functions will look the same. In #10 I began swinging the axe at the styleObject upon which many internal functions rely on. Borders, fonts, fills etc. (In my opinion the creation and handling should be reimagined, but aside from the obvious styles.xml file not everything will remain intact.) Even though this is still a draft in early stages (and maybe I'll have to revert everything in two months, trying brings the option of failing), please don't spend lots of time improving the old code regarding these matters. Getting familiar with the logic ofc is more than welcome. |
No worries. The I think most of my changes are really to test the package logic. Break apart some things, move them around, see if it still works. More untangling than improving so we can be sure we're not removing anything terribly important and make it easier to see where bigger improvements can be made. |
Thanks, I merge as is |
This will be one of several merges of
main
<-rc-cleanup
. This will probably have the largest changes (see below) so I wanted to get this merged before getting into other small clean-up tasks throughout the package.It's not going to be feasible to review everything (128 files and 8000+ lines?!) but all the tests work and these changes should make it easier to debug future failures. Most of the changes are not even functional.
Short summary
class-object
setRefClass()
rather than scatter throughout one or more files (this also removes the Collate field in DESCRIPTION so we don't need a specific file order to work!)createStyle()
had many checks that have been moved intoStyle$new()
, figuring that initiating the object should also validate the inputs); there are still more to be done.self$object <- value
rather thanobject <<- value
R6
will make up for the small increase