Most specify_*() functions are lumped into R/specify_cls.R, with comment tags such as # chr ---- to divide out class-specific functions.
- See if the
specify_*() and specify_*_scalar() functions can be further abstracted without breaking any tests, since their signatures are very similar. I imagine a situation where we pass the specify_* function (eg specify_chr) to a constructor (a tweaked .specify_cls(), probably), and that function figures out which arguments are specifically set. We might need to simplify the signatures of the specify_*() functions to make this work; I can imagine changing their specific arguments to ... and documenting with @inheritDotParams, but I'd rather include all the arguments explicitly, in part because that makes auto-suggestions easier to use.
- Once the structure of the stabilizers is "finalized" and all tests still pass, split each class section off into a
R/stabilize_*.R file (and split its tests to a corresponding test file). Ensure that each of these new files has 100% file-level test coverage, and that the helpers that remain behind in R/stabilize_cls.R also have 100% file-level test coverage in their own test file.
Only include a NEWS bullet if we end up having to change the specify_*() arguments to ...; otherwise this should be invisible to users. DO add this issue number to the issue tags in tests, though (eg, ".specify_cls builds the expected function with no args (#150)" becomes ".specify_cls builds the expected function with no args (#150, #325)").
Most
specify_*()functions are lumped intoR/specify_cls.R, with comment tags such as# chr ----to divide out class-specific functions.specify_*()andspecify_*_scalar()functions can be further abstracted without breaking any tests, since their signatures are very similar. I imagine a situation where we pass thespecify_*function (egspecify_chr) to a constructor (a tweaked.specify_cls(), probably), and that function figures out which arguments are specifically set. We might need to simplify the signatures of thespecify_*()functions to make this work; I can imagine changing their specific arguments to...and documenting with@inheritDotParams, but I'd rather include all the arguments explicitly, in part because that makes auto-suggestions easier to use.R/stabilize_*.Rfile (and split its tests to a corresponding test file). Ensure that each of these new files has 100% file-level test coverage, and that the helpers that remain behind inR/stabilize_cls.Ralso have 100% file-level test coverage in their own test file.Only include a NEWS bullet if we end up having to change the
specify_*()arguments to...; otherwise this should be invisible to users. DO add this issue number to the issue tags in tests, though (eg,".specify_cls builds the expected function with no args (#150)"becomes".specify_cls builds the expected function with no args (#150, #325)").