-
Notifications
You must be signed in to change notification settings - Fork 8
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
Don't restrict specifications to PDF manual #508
Conversation
Closing the PR since I learned that the specifications were primarily for developers and not intended for end users. The original idea was probably from Yilong. |
Adding some extra context, since I had the same suggestion recently. I recently recommended that the documentation be updated to better distinguish the |
I feel all these specs can be deleted, or changed to ordinary R comments instead of using roxygen docs. I doubt if anyone would ever open the PDF manual to read the specs. |
I agree this section is weird to have... but maybe for a good reason. I think it was modeled after the proprietary documentation requirements from a legacy language to be as consistent as possible. @elong0527 |
The motivation of those spec sections was to follow organization SOP for software development life cycle requirement. |
@elong0527 Thanks for the explanation! This may be an example of Chesterton's fence :) Anyway, if it's important to follow SOP here, I think it may make more sense to develop a special tool similar to roxygen2. That is, we move the specs into the code, mark them as special comments, e.g., comments starting with ahr <- function(...) {
# - Validate if input enrollment rate contains stratum column.
# - Validate if input enrollment rate contains total duration column.
res <- pw_info(
enroll_rate = enroll_rate,
fail_rate = fail_rate,
total_duration = total_duration,
ratio = ratio)
#> Compute the proportion in each group.
setDT(res)
...
} Then we can extract the specs for all functions and build a full specs doc for whomever interested in reading them. This should be straightforward to implement (perhaps an afternoon would be enough). Another benefit is that the specs are blended into specific blocks of source code and can help authors/contributors understand the purpose of the code better. In case we need to update the specs or code, we can update them together since they are close to each other. |
Agree that will be a much cleaner solution! |
Nice discussions. I think we might have already implemented @yihui's proposal internally... 😅 Let me connect you with the code owner @BrianLang via email to see if it's possible to standardized it and build as open source. |
This PR is not super important. I was just wondering if there was a reason that the function specifications were hidden from the HTML help pages. If this was intentional, please feel free to close the PR.