Skip to content

Conversation

Tuna2222
Copy link
Contributor

@Tuna2222 Tuna2222 commented May 21, 2025

Check list:

  • Implement: add method-related files (and helpers) in src/Solvers/Loggers folder.
  • Include: include method-related files in src/Solvers/Loggers.jl.
  • Exports & Imports: any new imports and exports in RLinearAlgebra.jl.
  • Test:
    1. Add test files (and helpers) in test/Solvers/Loggers folder.
    2. (Add new folders to runtests.jl if needed.)
  • Doc:
    1. Add docs for all newly added structs and functions in docs/src/api.loggers.md.
    2. Add references in refs.bib.

Closes #103.

@Tuna2222 Tuna2222 self-assigned this May 21, 2025
@Tuna2222 Tuna2222 added the enhancement New feature or request label May 21, 2025
Copy link

codecov bot commented May 23, 2025

Codecov Report

Attention: Patch coverage is 78.37838% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Solvers/Loggers/ma_helpers/ma_info.jl 68.75% 10 Missing ⚠️
src/Solvers/Loggers/moving_average_logger.jl 85.71% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Tuna2222 Tuna2222 requested a review from Copilot June 14, 2025 14:37
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds a new moving average logger along with its supporting methods, tests, and documentation updates.

  • Implement moving average logger (MALogger and MALoggerRecipe) and helper functions (update_ma! and MAInfo).
  • Add test cases for the moving average logger in the test folder.
  • Update export lists and documentation to include the new logger types and functions.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/Solvers/Loggers/moving_average_logger.jl Adds tests for the new moving average logger functionality.
src/Solvers/Loggers/moving_average_logger.jl Implements MALogger and MALoggerRecipe with moving average functionality.
src/Solvers/Loggers/ma_helpers/ma_info.jl Implements MAInfo and update_ma! helper functions.
src/Solvers/Loggers/basic_logger.jl Minor documentation update from mutable to struct.
src/Solvers/Loggers.jl Updates inclusion of logger files to incorporate the new moving average logger.
src/RLinearAlgebra.jl Updates exports to include the new logger types and functions.
docs/src/refs.bib & docs/src/api/loggers.md Updates documentation and references for the new moving average logger.
Comments suppressed due to low confidence (1)

test/Solvers/Loggers/moving_average_logger.jl:12

  • [nitpick] The variable 'b' is first used for a random vector and later reassigned to a logger object, which may lead to confusion. Consider using a distinct name for the logger instance (e.g., 'logger') to improve clarity.
b = rand(n_rows)

Comment on lines +62 to +64
throw(ArgumentError("Field `colection_rate` must be positive."))
elseif collection_rate > max_it && max_it > 0
throw(ArgumentError("Field `colection_rate` must be smaller than `max_it`."))
Copy link
Preview

Copilot AI Jun 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a spelling error in the error message; 'colection_rate' should be 'collection_rate'.

Suggested change
throw(ArgumentError("Field `colection_rate` must be positive."))
elseif collection_rate > max_it && max_it > 0
throw(ArgumentError("Field `colection_rate` must be smaller than `max_it`."))
throw(ArgumentError("Field `collection_rate` must be positive."))
elseif collection_rate > max_it && max_it > 0
throw(ArgumentError("Field `collection_rate` must be smaller than `max_it`."))

Copilot uses AI. Check for mistakes.

Comment on lines +62 to +64
throw(ArgumentError("Field `colection_rate` must be positive."))
elseif collection_rate > max_it && max_it > 0
throw(ArgumentError("Field `colection_rate` must be smaller than `max_it`."))
Copy link
Preview

Copilot AI Jun 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message contains a misspelling; it should use 'collection_rate' instead of 'colection_rate'.

Suggested change
throw(ArgumentError("Field `colection_rate` must be positive."))
elseif collection_rate > max_it && max_it > 0
throw(ArgumentError("Field `colection_rate` must be smaller than `max_it`."))
throw(ArgumentError("Field `collection_rate` must be positive."))
elseif collection_rate > max_it && max_it > 0
throw(ArgumentError("Field `collection_rate` must be smaller than `max_it`."))

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant