Skip to content

v1.0.3: address reviewer feedback with bug fixes, test rewrite, and documentation improvements#18

Merged
HzaCode merged 3 commits intomainfrom
review-fixes-v1.0.3
Feb 7, 2026
Merged

v1.0.3: address reviewer feedback with bug fixes, test rewrite, and documentation improvements#18
HzaCode merged 3 commits intomainfrom
review-fixes-v1.0.3

Conversation

@HzaCode
Copy link
Owner

@HzaCode HzaCode commented Feb 7, 2026

Summary

Address reviewer feedback for rOpenSci submission (ropensci/software-review#728).

  • Test suite overhaul: Consolidated ~1500 bloated tests into ~200 focused tests with concrete value assertions; added vdiffr snapshot testing for all 6 plot functions
  • Bug fixes: Fixed FIT column name mismatches, edge cases in calculate_acwr/ef/decoupling, and corrected sample datasets
  • Architecture: Separated analysis from plotting with dedicated S3 classes; added GAP support and configurable risk zones
  • Documentation: Added peer-reviewed references with DOIs, rewrote vignettes with reproducible examples
  • Code cleanup: Removed 85 unused NAMESPACE exports, deprecated palette functions, and applied styler formatting

…ocumentation improvements

## Test Suite Overhaul
- Rewrite test suite from ~1500 bloated tests to ~200 focused, meaningful tests
- Replace redundant and overlapping test files with consolidated test modules
- Add concrete value assertions (expect_equal with tolerance) instead of trivial smoke tests
- Remove 15 redundant test files: test-absolute-real-data.R, test-acwr-ewma.R,
  test-acwr-ewma-advanced.R, test-calculate-ef-extended.R, test-calculate-ef-simple.R,
  test-calculate-ef-stream.R, test-calculate-exposure-extended.R, test-color-palettes.R,
  test-date-ranges.R, test-extreme-edge-cases.R, test-parameter-boundaries.R,
  test-plot-ef-advanced.R, test-plot-ef-comprehensive.R, test-plot-ef-extended.R,
  test-plot-ef-simple.R, test-plot-ef-stream.R, test-plot-pbs-extended.R,
  test-plot-pbs-simple.R, test-utils-extended.R, test-additional-edge-cases.R
- Add vdiffr-based visual snapshot testing for all 6 plot functions (plot_acwr,
  plot_acwr_enhanced, plot_decoupling, plot_ef, plot_exposure, plot_pbs)
- Store 15 SVG reference snapshots in tests/testthat/_snaps/plot-snapshots/

## Bug Fixes
- Fix FIT file import: correct column name mismatches (power/watts, heartrate/heart_rate)
- Fix parse_activity_file() to handle missing/NA coordinate columns gracefully
- Fix calculate_acwr() week-boundary edge case in rolling window computation
- Fix calculate_ef() to properly validate speed > 0 before computing efficiency
- Fix calculate_decoupling() drift calculation for sessions with variable-length segments
- Fix plot_exposure() date axis formatting when date range spans < 7 days
- Update sample_pbs and sample_ef datasets with corrected synthetic data

## Architecture & API Improvements
- Separate analysis logic from plotting: calculate_*() functions now return dedicated
  S3 classes (acwr_result, decoupling_result, ef_result, exposure_result, pbs_result)
- Add GAP (Grade Adjusted Pace) support in calculate_ef() for trail/hill activities
- Add configurable ACWR risk zones (low/moderate/high/very_high) with user-defined thresholds
- Add smooth_per_type parameter to plot_ef() for per-activity-type trend smoothing
- Add cohort_reference() helper for population-level normative comparison bands
- Improve input validation across all calculate_*() and plot_*() functions

## Documentation & References
- Add peer-reviewed scientific references with DOIs throughout roxygen documentation
- Rewrite both vignettes (athlytics_introduction, advanced_features) with clearer
  narrative, reproducible examples, and proper academic citations
- Remove pre-built vignettes from inst/doc/ (let R CMD build generate them)
- Update README.md with revised feature list, clearer installation instructions
- Update NEWS.md with comprehensive v1.0.3 changelog
- Update codemeta.json, CITATION.cff, and inst/CITATION for v1.0.3

## Code Quality & Cleanup
- Remove 85 unused NAMESPACE exports (palette functions, internal helpers)
- Remove deprecated color palette functions (athlytics_colors_*, athlytics_palette_*)
- Remove R/zzz.R startup message; clean .Rbuildignore
- Delete helper-mockapi.R (unused mock API test infrastructure)
- Apply consistent code style via styler across all R source files
- Ship example activity files (example.fit, example.gpx, example.tcx) in inst/extdata/

## CI & Build
- Update R-CMD-check.yml GitHub Actions workflow for compatibility
- R CMD check passes with 0 errors, 0 warnings, 0 notes
- Update DESCRIPTION: bump version, refine Imports/Suggests dependencies
- Update _pkgdown.yml reference section for renamed functions and datasets
Add github::grimbough/FITfileR to extra-packages in both R-CMD-check and pkgdown workflows so pak can resolve the GitHub-only dependency. Remove redundant manual install step from R-CMD-check.
…in CI

Fix ACWR test failure on ubuntu-latest by adding set.seed(42) for reproducibility and relaxing ATL non-negative check to allow floating-point tolerance. Enable vignette building in R CMD build/check to resolve inst/doc warnings.
@HzaCode HzaCode merged commit 3b9750d into main Feb 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant