Skip to content

Refactor loop indices to use seq_along for improved readability and p…#61

Merged
ehrlinger merged 4 commits into
mainfrom
copilot_refactor
Mar 4, 2026
Merged

Refactor loop indices to use seq_along for improved readability and p…#61
ehrlinger merged 4 commits into
mainfrom
copilot_refactor

Conversation

@ehrlinger
Copy link
Copy Markdown
Owner

This pull request makes minor improvements to the codebase by replacing instances of seq_len(length(...)) with seq_along(...) for iterating over indices. This change improves code clarity and robustness by using a more idiomatic approach for indexing.

Most important changes:

Code quality improvements:

  • Replaced seq_len(length(gg_dta)) with seq_along(gg_dta) in the plot.gg_roc function in R/plot.gg_roc.R to iterate over the elements more safely and idiomatically.
  • Updated test loops in tests/testthat/test_gg_variable.R to use seq_along() instead of seq_len(length(...)) for both classification and regression test cases, ensuring consistency and reducing potential indexing errors. [1] [2]…erformance

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.26%. Comparing base (ec215ca) to head (584a476).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #61   +/-   ##
=======================================
  Coverage   83.26%   83.26%           
=======================================
  Files          23       23           
  Lines        1805     1805           
=======================================
  Hits         1503     1503           
  Misses        302      302           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ehrlinger ehrlinger merged commit 9dc6c9c into main Mar 4, 2026
1 of 14 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