test: remove AnomalyDetection dependency from time series tests (#36082)#1523
Open
hidekoji wants to merge 1 commit into
Open
test: remove AnomalyDetection dependency from time series tests (#36082)#1523hidekoji wants to merge 1 commit into
hidekoji wants to merge 1 commit into
Conversation
…ts (#36082)
AnomalyDetection (Twitter package) was removed from bundled packages in
milestone 15.5. Replace `data("raw_data", package = "AnomalyDetection")` with
inline synthetic hourly POSIXct data in all affected tests:
- test_anomaly_detection.R: delete tests 1-4 (require AnomalyDetection to run);
keep tests 5-7 which already use synthetic data
- test_arima_1.R: replace in 6 tests
- test_arima_2.R: replace in 1 test; update intentional time-gap date to match
new synthetic date range
- test_prophet_1.R: replace in 3 tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the AnomalyDetection package dependency from time-series tests so they no longer silently skip on Windows CI, while keeping core ARIMA/Prophet/anomaly-detection behaviors covered using inline synthetic fixtures.
Changes:
- Removed
do_anomaly_detection()tests that requiredAnomalyDetection::raw_data. - Replaced
data("raw_data", package="AnomalyDetection")with inline synthetic POSIXct fixtures in ARIMA and Prophet tests. - Updated the intentional time-gap date in
test_arima_2.Rto align with the new synthetic data range.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/testthat/test_prophet_1.R | Replaces AnomalyDetection::raw_data usage with an inline synthetic timestamp/count fixture in several Prophet tests. |
| tests/testthat/test_arima_2.R | Replaces external dataset usage with a synthetic fixture and updates the intentional gap date to the new range. |
| tests/testthat/test_arima_1.R | Replaces external dataset usage with a synthetic fixture across multiple ARIMA tests. |
| tests/testthat/test_anomaly_detection.R | Deletes anomaly-detection tests that required the removed external package dataset, keeping synthetic Date/POSIXct coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+7
| raw_data <- data.frame( | ||
| timestamp = seq(as.POSIXct("2014-01-01 00:00:00", tz="UTC"), by="1 hour", length.out=1400), | ||
| count = round(abs(rnorm(1400, mean=1000, sd=200))) | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AnomalyDetection (Twitter/GitHub-only package) was removed from bundled packages in milestone 15.5 (#36082). Tests that depended on
data("raw_data", package = "AnomalyDetection")were silently skipping on Windows CI because the package is not installed.Changes:
do_anomaly_detection()requiring the package. Keep tests 5-7 which use synthetic Date/POSIXct data and pass without the package.data("raw_data", ...)in 6 tests with inline synthetic hourly POSIXct data (1400 rows starting 2014-01-01).Test plan
Paired tam PR: https://github.com/exploratory-io/tam/pull/36276
🤖 Generated with Claude Code