Skip to content

Conversation

@marcosbento
Copy link
Contributor

@marcosbento marcosbento commented Jan 23, 2026

Description

Implement changes requested by https://jira.ecmwf.int/browse/ECKIT-650.

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

🌦️ >> Documentation << 🌦️
https://sites.ecmwf.int/docs/dev-section/eckit/pull-requests/PR-248

Copy link

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 PR removes the deprecated BaseOption::setDefaultValue() method and updates code to specify default values via constructor parameters instead of the deprecated fluent API method.

Changes:

  • Removed deprecated BaseOption::setDefaultValue() method from Option.h
  • Updated BaseOption constructor to use forwarding reference (T&&) instead of const lvalue reference (const T&)
  • Fixed incorrect base class constructor call in VectorOption.cc
  • Updated test to use constructor-based default value specification with C++17 CTAD

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/eckit/option/Option.h Removes deprecated defaultValue() method and changes constructor parameter from const T& to T&&
src/eckit/option/VectorOption.cc Fixes incorrect base constructor call that was wrapping parameters in non-existent Option() constructor
tests/option/eckit_test_option_cmdargs.cc Updates test to use constructor-based default values with CTAD instead of deprecated defaultValue() method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.00%. Comparing base (11172fe) to head (75dfb67).
⚠️ Report is 1 commits behind head on release/2.0.0.

Additional details and impacted files
@@                Coverage Diff                @@
##           release/2.0.0     #248      +/-   ##
=================================================
+ Coverage          65.98%   66.00%   +0.01%     
=================================================
  Files               1128     1128              
  Lines              57536    57529       -7     
  Branches            4380     4380              
=================================================
+ Hits               37966    37971       +5     
+ Misses             19570    19558      -12     

☔ 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.

@marcosbento marcosbento force-pushed the feature/remove_deprecated_baseoption_default_value branch 3 times, most recently from 83b5e6a to ce66f53 Compare January 30, 2026 12:38
@marcosbento marcosbento changed the base branch from develop to release/2.0.0 January 30, 2026 15:25
This change takes the default value by value and moves it into the
optional data member.

Re ECKIT-650
@marcosbento marcosbento force-pushed the feature/remove_deprecated_baseoption_default_value branch from ce66f53 to 75dfb67 Compare February 3, 2026 08:55
@marcosbento marcosbento marked this pull request as ready for review February 3, 2026 08:56
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.

3 participants