Conversation
There was a problem hiding this comment.
Code Review
This pull request transitions the package to version 0.2.0, refactoring all functions to use snake_case while deprecating the previous camelCase names. Key additions include a Makefile for automated development workflows and updated documentation and tests. Reviewers identified documentation typos in R/build.R and R/music-package.R, suggested using a more specific name for the deprecated functions' documentation file, and noted a redundant test case calling a deprecated function.
There was a problem hiding this comment.
Pull request overview
This PR updates the music R package public API to use snake_case function names for v0.2.0 while keeping the previous camelCase names as deprecated wrappers.
Changes:
- Renamed core exported functions to
snake_case(e.g.,build_scale(),play_wave(),format_note()), updating call sites and documentation accordingly. - Added deprecated wrapper functions for the old names to preserve backward compatibility with warnings.
- Added build/check tooling (
Makefile) and updated package metadata/news for the 0.2.0 release.
Reviewed changes
Copilot reviewed 77 out of 100 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/musicTests.R | Removed legacy test script (replaced by new filename). |
| tests/music-tests.R | Added updated test script exercising new snake_case APIs (and deprecated ones). |
| Readme.md | Added v0.2.0 note about function renaming / deprecations. |
| R/zzz.R | Removed package-level roxygen block from zzz.R; keeps attach hook. |
| R/music-package.R | New package-level roxygen entry + deprecated wrappers for old function names. |
| R/build.R | Renamed builders to build_scale(), build_chord(), build_progression() and updated internal calls/docs. |
| R/play.R | Renamed play helpers to play_wave(), play_freq(), play_note(), play_chord(), play_progression(). |
| R/music_fn.R | Renamed helpers to format_note(), note_distance(), format_notation() and updated references. |
| R/note2freq.R | Updated to use new helper names (format_note(), note_distance()) and reformatted signature. |
| R/freq2wave.R | Updated docs/inheritance to new play function name and reformatted code. |
| R/mplot.R | Formatting-only refactor for readability; no apparent behavior change. |
| R/delay_time.R | Formatting-only refactor for readability; no apparent behavior change. |
| R/cplot_piano.R | Updated default/formatting to use build_scale() + format_note() and reformatted output code. |
| NEWS.md | Added v0.2.0 entry documenting the snake_case switch + deprecations. |
| DESCRIPTION | Bumped version to 0.2.0 and updated roxygen config field. |
| NAMESPACE | Exported both new snake_case and deprecated old names. |
| man/build_scale.Rd | Updated help page for build_scale() naming/params/examples. |
| man/build_chord.Rd | Updated help page for build_chord() naming/params/examples. |
| man/build_progression.Rd | Updated help page for build_progression() naming/params/examples. |
| man/play_wave.Rd | Updated help page for play_wave() naming/examples. |
| man/play_freq.Rd | Updated help page for play_freq() naming/examples. |
| man/play_note.Rd | Updated help page for play_note() naming/examples. |
| man/play_chord.Rd | Updated help page for play_chord() naming/examples. |
| man/play_progression.Rd | Updated help page for play_progression() naming/examples. |
| man/format_note.Rd | Updated help page for format_note() naming/examples. |
| man/format_notation.Rd | Updated help page for format_notation() naming/examples. |
| man/note_distance.Rd | Updated help page for note_distance() naming/examples. |
| man/note2freq.Rd | Updated examples to use new builder names. |
| man/mplot.Rd | Updated author/formatting in docs. |
| man/strings.Rd | Updated example to reference play_chord() in docs. |
| man/music-package.Rd | Updated package doc source reference to R/music-package.R. |
| man/myPackage-deprecated.Rd | Added deprecated-function help page (generated from R/music-package.R). |
| .gitignore | Updated dev dir ignore; currently missing ignore for *.Rcheck/. |
| .Rbuildignore | Added ignores for dev dirs and Makefile; currently missing ignore for *.Rcheck. |
| Makefile | Added convenience targets for formatting/docs/build/check/test. |
| music.Rcheck/00check.log | R CMD check output artifact (should not be committed). |
| music.Rcheck/00install.out | R CMD check output artifact (should not be committed). |
| music.Rcheck/music-Ex.R | R CMD check examples output artifact (should not be committed). |
| music.Rcheck/music-Ex.Rout | R CMD check examples output artifact (should not be committed). |
| music.Rcheck/music-manual.log | R CMD check manual build log artifact (should not be committed). |
| music.Rcheck/Rdlatex.log | R CMD check LaTeX log artifact (should not be committed). |
| music.Rcheck/tests/startup.Rs | R CMD check test startup artifact (should not be committed). |
| music.Rcheck/tests/music-tests.R | R CMD check copied tests artifact (should not be committed). |
| music.Rcheck/tests/music-tests.Rout | R CMD check test output artifact (should not be committed). |
| music.Rcheck/music/DESCRIPTION | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/NEWS.md | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/NAMESPACE | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/INDEX | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/html/R.css | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/html/00Index.html | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/help/aliases.rds | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/help/AnIndex | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/help/music.rdb | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/help/music.rdx | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/help/paths.rds | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/Meta/features.rds | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/Meta/hsearch.rds | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/Meta/links.rds | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/Meta/nsInfo.rds | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/Meta/package.rds | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/Meta/Rd.rds | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/R/music | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/R/music.rdb | Installed/check tree artifact (should not be committed). |
| music.Rcheck/music/R/music.rdx | Installed/check tree artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/DESCRIPTION | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/NEWS.md | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/NAMESPACE | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/tests/music-tests.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/zzz.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/play.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/note2freq.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/music-package.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/music_fn.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/mplot.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/freq2wave.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/delay_time.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/cplot_piano.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/R/build.R | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/build_scale.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/build_chord.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/build_progression.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/cplot_piano.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/delay_time.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/format_notation.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/format_note.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/freq2wave.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/mplot.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/music-package.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/myPackage-deprecated.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/note2freq.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/note_distance.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/play_wave.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/play_freq.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/play_note.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/play_chord.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/play_progression.Rd | Packaged source snapshot artifact (should not be committed). |
| music.Rcheck/00_pkg_src/music/man/strings.Rd | Packaged source snapshot artifact (should not be committed). |
Files not reviewed (7)
- man/cplot_piano.Rd: Language not supported
- man/delay_time.Rd: Language not supported
- man/freq2wave.Rd: Language not supported
- man/mplot.Rd: Language not supported
- man/music-package.Rd: Language not supported
- man/myPackage-deprecated.Rd: Language not supported
- man/note2freq.Rd: Language not supported
Comments suppressed due to low confidence (1)
R/music-package.R:79
- There’s a broken word split in the roxygen comment (
"flats a"/"nd sharps"), which will render as "a nd" in generated documentation. Please change it to a single "and".
#' @inheritParams build_progression
#' @param formatNotation Logical: If TRUE, format notes to include both flats a
#' nd sharps to avoid repeating the same letter. e.g. convert c("Gb4", "G4") to
#' c("F#4", "G4")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.