Conversation
The [[deprecated]] attribute and Doxygen comment on the 1-parameter relabels_() overload incorrectly directed users to the 2-parameter relabel_(old_labels, new_labels). Corrected to relabel_(new_labels). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both the vector<string> and initializer_list<char*> overloads of set_labels() were missing [[deprecated]] attributes despite all call sites having been replaced with relabel_(). Users will now get a compiler warning directing them to relabel_(new_labels). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The three base class declarations (set_labels, relabels_(new_labels), relabels_(old_labels, new_labels)) were missing [[deprecated]] attributes, so callers going through the base class pointer would get no compiler warning. Each now points to its relabel_ replacement. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tests for set_labels, relabels, and relabels_ were deleted by the PR, leaving no automated check that the deprecated wrappers still work. Restored all removed tests and wrapped them in: #pragma GCC diagnostic ignored "-Wdeprecated-declarations" so they compile cleanly while still exercising the deprecated API. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
c_set_labels, relabels (both overloads), and c_relabels_ (both overloads) now call PyErr_WarnEx(PyExc_DeprecationWarning, ...) before delegating to their relabel/relabel_ replacements, matching Python convention. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
@manuschneider Due to the complicit in original PR #729 . I do the rebased the code and create this new PR. This PR has addressed the issues raised by Claude Code during the code review. Please help to review this PR. After you merger this PR to the main branch. Please help to close the original PR #729 . |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #752 +/- ##
==========================================
+ Coverage 35.44% 35.46% +0.01%
==========================================
Files 215 215
Lines 33071 33057 -14
Branches 13170 13167 -3
==========================================
Hits 11723 11723
+ Misses 19424 19410 -14
Partials 1924 1924 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Replaces the deprecated use of
relabelsbyrelabel, and the use ofrelabels_andset_labelsbyrelabel_.Rebased version of #729 resolving the conflict in
src/linalg/Lanczos_Exp.cpp.Additional fixes applied during review:
relabels_(new_labels)deprecated message pointing to wrong overloadset_labels()overloads as[[deprecated]]in public UniTensor APIset_labelsandrelabels_as[[deprecated]]inUniTensor_base#pragmasuppressionDeprecationWarningfrom deprecated Python pybind bindings