Skip to content

code cleanup#790

Draft
manuschneider wants to merge 4 commits into
masterfrom
iostream
Draft

code cleanup#790
manuschneider wants to merge 4 commits into
masterfrom
iostream

Conversation

@manuschneider
Copy link
Copy Markdown
Collaborator

ensures that operator<< writes to the correct ostream
fixes python bindings
removes comments of the form // cout << ...
fixes and orders includes

ensures that operator<< writes to the correct ostream
fixes python bindings
removes comments of the form // cout << ...
fixes and orders includes
@manuschneider manuschneider added codex Pending check/approval Issue fixed, and need feedback labels May 1, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cba2cb15cb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/Gncon.cpp Outdated
Comment thread include/Network.hpp Outdated
Comment thread include/Gncon.hpp Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 1, 2026

Codecov Report

❌ Patch coverage is 8.86525% with 257 lines in your changes missing coverage. Please review.
✅ Project coverage is 36.22%. Comparing base (c4ad1cf) to head (2bee797).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/backend/Storage_base.cpp 1.75% 56 Missing ⚠️
src/RegularNetwork.cpp 0.00% 48 Missing ⚠️
src/Symmetry.cpp 0.00% 38 Missing ⚠️
src/DenseUniTensor.cpp 15.38% 22 Missing ⚠️
src/BlockFermionicUniTensor.cpp 0.00% 21 Missing ⚠️
src/stat/histogram.cpp 0.00% 14 Missing ⚠️
src/backend/StorageImplementation.cpp 0.00% 13 Missing ⚠️
src/LinOp.cpp 0.00% 7 Missing ⚠️
include/backend/Scalar.hpp 0.00% 5 Missing ⚠️
src/BlockUniTensor.cpp 75.00% 5 Missing ⚠️
... and 13 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #790      +/-   ##
==========================================
- Coverage   36.23%   36.22%   -0.01%     
==========================================
  Files         214      215       +1     
  Lines       33132    33128       -4     
  Branches    13171    13173       +2     
==========================================
- Hits        12005    12002       -3     
+ Misses      19184    19183       -1     
  Partials     1943     1943              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines 2851 to +2861
*/
void print() const {
this->_impl->print(std::cout);
std::cout << std::string(" Scalar dtype: [") << Type.getname(this->_impl->_dtype)
<< std::string("]") << std::endl;
void print() const { this->print(std::cout); }
/// @cond
void print(std::ostream &os) const {
this->_impl->print(os);
os << std::string(" Scalar dtype: [") << Type.getname(this->_impl->_dtype) << std::string("]")
<< std::endl;
}
/// @endcond
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What is the reason to add new methods which consume ostream?

@IvanaGyro
Copy link
Copy Markdown
Collaborator

IvanaGyro commented May 3, 2026

You did at least four things in one commit.

ensures that operator<< writes to the correct ostream
fixes python bindings
removes comments of the form // cout << ...
fixes and orders includes

To make a PR review by reviewers easier and more quickly, developers are asked to split their great works into multiple commit by logical feature. You can find many sources talking about this principle and try to review PRs.

5.2 Distributed Git - Contributing to a Project

Next, try to make each commit a logically separate changeset. If you can, try to make your changes digestible – don’t code for a whole weekend on five different issues and then submit them all as one massive commit on Monday. Even if you don’t commit during the weekend, use the staging area on Monday to split your work into at least one commit per issue, with a useful message per commit.

Linux kernel submitting guidelines

Separate each logical change into a separate patch.

For example, if your changes include both bug fixes and performance enhancements for a single driver, separate those changes into two or more patches. If your changes include an API update, and a new driver which uses that new API, separate those into two patches.

On the other hand, if you make a single change to numerous files, group those changes into a single patch. Thus a single logical change is contained within a single patch.

Git Contribution Guidelines

Give an explanation for the change(s) that is detailed enough so that people can judge if it is good thing to do, without reading the actual patch text to determine how well the code does what the explanation promises to do.

If your description starts to get too long, that’s a sign that you probably need to split up your commit to finer grained pieces. That being said, patches which plainly describe the things that help reviewers check the patch, and future maintainers understand the code, are the most beautiful patches. Descriptions that summarize the point in the subject well, and describe the motivation for the change, the approach taken by the change, and if relevant how this differs substantially from the prior version, are all good things to have.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d4d2e135bb

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/Accessor.cpp
Comment thread include/backend/Storage.hpp Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 08d7678a1a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread include/backend/Storage.hpp Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c7407b253

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread include/backend/Storage.hpp Outdated
@manuschneider manuschneider marked this pull request as draft May 6, 2026 02:11
@manuschneider manuschneider removed the Pending check/approval Issue fixed, and need feedback label May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants