Skip to content

Commit 398981b

Browse files
authored
Merge branch 'develop_sarima' into claude/analyze-develop-sarima-readiness-011DRvwF82ZaGu8xt9QKtNhD
2 parents 2a1a142 + ba6bc50 commit 398981b

32 files changed

Lines changed: 3434 additions & 463 deletions

.Rbuildignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,15 @@
2626
^coverage_report\.html$
2727
^coverage_data\.rds$
2828
^tests/TESTING_GUIDE\.md$
29+
^README_uk\.md$
30+
^MONTE_CARLO_README\.md$
31+
^dev_load\.R$
32+
^force_rebuild\.R$
33+
^monte_carlo_seasonal_comparison\.R$
34+
^monte_carlo_seasonal_results\.rds$
35+
^regenerate_docs\.R$
36+
^run_monte_carlo_example\.R$
37+
^run_sma_monte_carlo\.R$
38+
^test_debug_sar\.R$
39+
^test_sarma_sarima\.R$
40+
^visualize_monte_carlo_results\.R$

CRAN_CHECK_INSTRUCTIONS.md

Lines changed: 42 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,53 @@
1-
# CRAN Submission: Critical Issues and Instructions
1+
# CRAN Submission: Current Checklist (v0.1.3)
22

3-
## Critical Issue Found: Ukrainian Documentation
3+
The translation work called out in earlier notes has been completed. All roxygen blocks, vignettes, and README files are now in English, so the remaining CRAN-prep focus is on **validation**, **documentation freshness**, and **submission hygiene**.
44

5-
**CRAN REQUIREMENT**: All package documentation must be in English.
6-
7-
### Problem
8-
All R source files currently contain Ukrainian text in:
9-
- Roxygen documentation comments (`#'`)
10-
- Function parameter descriptions
11-
- Examples
12-
- Internal comments in user-facing functions
13-
14-
### Files Affected
15-
The following R files contain Ukrainian documentation:
16-
- `R/pmm2_package.R` - **FIXED**
17-
- `R/pmm2_main.R`
18-
- `R/pmm2_classes.R`
19-
- `R/pmm2_common.R`
20-
- `R/pmm2_inference.R`
21-
- `R/pmm2_monte_carlo.R`
22-
- `R/pmm2_ts_design.R`
23-
- `R/pmm2_ts_main.R`
24-
- `R/pmm2_ts_methods.R`
25-
- `R/pmm2_utils.R`
26-
27-
## Required Actions
28-
29-
### 1. Translate All Documentation to English
30-
31-
You need to translate all roxygen documentation (`#'` comments) in the R files listed above from Ukrainian to English.
32-
33-
**Important**:
34-
- Keep the same structure and roxygen tags (@param, @return, @export, etc.)
35-
- Translate parameter descriptions, function descriptions, details, and examples
36-
- Internal code comments (non-roxygen `#` comments) can remain in Ukrainian if they're not user-facing, but it's better to translate them too
37-
38-
### 2. Regenerate Documentation
39-
40-
After translating the R source files, regenerate the man pages:
5+
## 1. Align Monte Carlo Evidence
6+
- Canonical SMA benchmark lives in `run_sma_monte_carlo.R` (n = 120, γ-innovations). Keep this script as the reference when CRAN asks about statistical validation.
7+
- The combined script `monte_carlo_seasonal_comparison.R` is broader (multiple n and scenarios). Document both in README/NEWS so reviewers understand the longer run time.
418

9+
## 2. Regenerate Documentation
4210
```r
43-
# Install roxygen2 if needed
44-
install.packages("roxygen2")
45-
46-
# Regenerate documentation
47-
roxygen2::roxygenize()
48-
49-
# Or use devtools
5011
library(devtools)
51-
document()
12+
document() # roxygen → man/
13+
build_vignettes()
5214
```
15+
Make sure `inst/doc/` is cleaned before running `build_vignettes()` (the directory is auto-populated by `R CMD build`).
5316

54-
### 3. Run R CMD check --as-cran
55-
17+
## 3. Build + Check
5618
```bash
57-
# Build the package
5819
R CMD build .
59-
60-
# Check with CRAN standards
61-
R CMD check --as-cran EstemPMM_0.1.0.tar.gz
62-
```
63-
64-
### 4. Fix Any Warnings/Errors
65-
66-
Review the check output and fix any issues. Common CRAN notes that are acceptable:
67-
- "New submission" NOTE
68-
- "Non-standard directory 'docs'" (can be ignored if docs is in .Rbuildignore)
69-
70-
### 5. Alternative: Use devtools
71-
72-
```r
73-
# Install devtools if needed
74-
install.packages("devtools")
75-
76-
# Run CRAN checks
77-
library(devtools)
78-
check(cran = TRUE)
20+
R CMD check --as-cran EstemPMM_0.1.3.tar.gz
7921
```
80-
81-
### 6. Pre-build cleanup (required)
82-
83-
- Update `DESCRIPTION` with the new version number before calling `R CMD build` (e.g., 0.1.1) so the resulting tarball matches the intended release.
84-
- Remove generated artifacts from previous vignette builds: delete the contents of `inst/doc/` (they will be regenerated automatically).
85-
- Delete `demo/README.md` or move its content elsewhere—`demo/` may only contain `.R`/`.Rout` files and an optional `00Index`.
86-
- Verify that only portable file names remain (ASCII letters/digits plus `_` or `.`, no spaces) to avoid "invalid file names" warnings during `R CMD check`.
87-
88-
## Files Already Modified
89-
90-
The following files have been updated for CRAN compliance:
91-
1. **cran-comments.md** - Created with submission information
92-
2. **.Rbuildignore** - Updated to exclude non-package files (.github, docs, etc.)
93-
3. **R/pmm2_package.R** - Translated from Ukrainian to English
94-
4. **.github/workflows/R-CMD-check.yaml** - Added GitHub Actions workflow for automated CRAN checks
95-
96-
## GitHub Actions Workflow
97-
98-
A GitHub Actions workflow has been added that will automatically run R CMD check --as-cran on multiple platforms:
99-
- Ubuntu (R release, R devel, R oldrel-1)
100-
- Windows (R release)
101-
- macOS (R release)
102-
103-
This will run automatically when you push to branches matching `claude/**` or to `main`/`master`.
104-
105-
## Translation Example
106-
107-
**Before (Ukrainian)**:
108-
```r
109-
#' Pidhaniaie liniinu model za dopomohoiu PMM2
110-
#'
111-
#' @param formula Formula R dlia modeli
112-
#' @param data data.frame, shcho mistyt zminni u formuli
113-
#' @return Ob'iekt S4 \code{PMM2fit}
114-
```
115-
116-
**After (English)**:
117-
```r
118-
#' Fit linear model using PMM2
119-
#'
120-
#' @param formula R formula for the model
121-
#' @param data data.frame containing variables in the formula
122-
#' @return S4 object of class \code{PMM2fit}
123-
```
124-
125-
## Next Steps
126-
127-
1. Translate all roxygen documentation in the R files listed above
128-
2. Run `roxygen2::roxygenize()` to regenerate man pages
129-
3. Run `R CMD check --as-cran EstemPMM_*.tar.gz` locally
130-
4. Fix any warnings or errors
131-
5. Commit and push changes
132-
6. Review GitHub Actions check results
133-
7. When all checks pass, proceed with CRAN submission
134-
135-
## Useful Resources
136-
137-
- CRAN Repository Policy: https://cran.r-project.org/web/packages/policies.html
138-
- Writing R Extensions: https://cran.r-project.org/doc/manuals/r-release/R-exts.html
22+
Expected outcome: 0 errors, 0 warnings, ≤2 notes ("new submission" + possible spelling note for "PMM").
23+
24+
## 4. GitHub Actions / External Checks
25+
- Push to GitHub to trigger `.github/workflows/R-CMD-check.yaml` (Ubuntu + macOS + Windows).
26+
- Optional but recommended: `devtools::check_win_devel()` and `rhub::check_for_cran()`.
27+
28+
## 5. Update Submission Artifacts
29+
- `README.md` / `README_uk.md`: include CRAN install snippet (`install.packages("EstemPMM")`) and mention how to rebuild documentation/tests.
30+
- `NEWS.md`: ensure 0.1.3 section highlights documentation refresh + seasonal Monte Carlo evidence.
31+
- `cran-comments.md`: describe the environments and provide a short bullet list of notes (see template in file).
32+
- `CRAN_SUBMISSION_CHECKLIST.md`: mark the new version + date.
33+
34+
## 6. Pre-Submission Clean-up
35+
- Delete `inst/doc/*`, `vignettes/*.html`, and any `.DS_Store` before building.
36+
- Ensure `.Rbuildignore` excludes `docs/`, `test_results/`, `.github/`, Monte Carlo artifacts, and large PDFs.
37+
- Confirm no files > 5 MB remain under version control (CRAN auto-check complains about bloated tarballs).
38+
39+
## 7. Suggested Release Order
40+
1. `document()` + `build_vignettes()`
41+
2. `devtools::check()` (quick sanity)
42+
3. `R CMD build`
43+
4. `R CMD check --as-cran` on the tarball
44+
5. Update `cran-comments.md` with actual check output
45+
6. Tag release / create `EstemPMM_0.1.3.tar.gz` for upload
46+
7. Submit via https://cran.r-project.org/submit.html (attach tarball + `cran-comments.md`)
47+
48+
## 8. Useful Resources
49+
- CRAN policy: https://cran.r-project.org/web/packages/policies.html
50+
- Submission checklist: https://cran.r-project.org/web/packages/submission_checklist.html
13951
- R Packages book: https://r-pkgs.org/
52+
53+
_Last updated: 2025-11-14_

0 commit comments

Comments
 (0)