Skip to content

Adding block2 - #34432

Open
chillenb wants to merge 11 commits into
conda-forge:mainfrom
chillenb:block2
Open

Adding block2#34432
chillenb wants to merge 11 commits into
conda-forge:mainfrom
chillenb:block2

Conversation

@chillenb

@chillenb chillenb commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

block2 is an efficient and highly scalable implementation of the Density Matrix Renormalization Group (DMRG) for quantum chemistry, based on the Matrix Product Operator (MPO) formalism. The code is highly optimized for production level calculation of realistic systems. It also provides plenty of options for tuning performance and new algorithm development.

The linux-64 build should succeed once this PR is merged; it is only failing due to the 6 hour time limit.

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@chillenb
chillenb marked this pull request as draft August 5, 2026 16:44
@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/block2/recipe.yaml) and found some lint.

Here's what I've got...

For recipes/block2/recipe.yaml:

  • ❌ If python is a host requirement, it should be a run requirement.
  • ❌ This recipe is using a compiler, which now requires adding a build dependence on ${{ stdlib("c") }} as well. Note that this rule applies to each output of the recipe using a compiler. For further details, please see META: {{ stdlib("c") }} migration conda-forge.github.io#2102.

For recipes/block2/recipe.yaml:

  • ℹ️ No valid build backend found for Python recipe for package block2 using pip. Python recipes using pip need to explicitly specify a build backend in the host section. If your recipe has built with only pip in the host section in the past, you likely should add setuptools to the host section of your recipe.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/31026661928. Examine the logs at this URL for more detail.

@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/block2/recipe.yaml) and found it was in an excellent condition.

@conda-forge-admin

conda-forge-admin commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I failed to even lint the recipe, probably because of a conda-smithy bug 😢. This likely indicates a problem in your meta.yaml, though. To get a traceback to help figure out what's going on, install conda-smithy and run conda smithy recipe-lint --conda-forge . from the recipe directory. You can also examine the workflow logs for more detail.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/31037511480. Examine the logs at this URL for more detail.

@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/block2/recipe.yaml) and found it was in an excellent condition.

@hczhai

hczhai commented Aug 6, 2026

Copy link
Copy Markdown

Thanks @chillenb for preparing this recipe! I am the upstream author and maintainer of block2. I approve this PR and I am happy to be listed as a recipe maintainer.

@chillenb
chillenb marked this pull request as ready for review August 6, 2026 01:38
@chillenb

chillenb commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Marking this ready for review now!

The linux-64 build is only failing because it is taking over 6 hours to build for all versions of Python. Also, windows and osx-arm64 are skipped for now.

I think the appropriate review team for this would be @conda-forge/help-python-c ?

@chillenb

Copy link
Copy Markdown
Contributor Author

@conda-forge-admin, please ping conda-forge/help-c-cpp

@conda-forge-webservices

Copy link
Copy Markdown

Hi! This is the friendly automated conda-forge-webservice.

I was asked to ping @conda-forge/help-c-cpp and so here I am doing that.

@chillenb

Copy link
Copy Markdown
Contributor Author

@conda-forge-admin, please ping conda-forge/help-python-c

@conda-forge-webservices

Copy link
Copy Markdown

Hi! This is the friendly automated conda-forge-webservice.

I was asked to ping @conda-forge/help-python-c and so here I am doing that.

@chillenb

Copy link
Copy Markdown
Contributor Author

@conda-forge-admin, please ping conda-forge/help-c-cpp

@conda-forge-webservices

Copy link
Copy Markdown

Hi! This is the friendly automated conda-forge-webservice.

I was asked to ping @conda-forge/help-c-cpp and so here I am doing that.

@chillenb

Copy link
Copy Markdown
Contributor Author

@conda-forge-admin, please ping conda-forge/help-python-c

@conda-forge-webservices

Copy link
Copy Markdown

Hi! This is the friendly automated conda-forge-webservice.

I was asked to ping @conda-forge/help-python-c and so here I am doing that.

@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/block2/recipe.yaml) and found some lint.

Here's what I've got...

For recipes/block2/recipe.yaml:

  • ❌ Non noarch packages should have python requirement without any version constraints.
  • ❌ Non noarch packages should have python requirement without any version constraints.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/33288164378. Examine the logs at this URL for more detail.

@conda-forge-admin

Copy link
Copy Markdown
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/block2/recipe.yaml) and found it was in an excellent condition.

@chillenb

Copy link
Copy Markdown
Contributor Author

At Huanchen's (@hczhai) suggestion, I disabled quite a few features to reduce compile time, so that the CI passes. They can be added back after merging.

@chillenb

chillenb commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@conda-forge-admin, please ping conda-forge/help-c-cpp

@conda-forge-webservices

Copy link
Copy Markdown

Hi! This is the friendly automated conda-forge-webservice.

I was asked to ping @conda-forge/help-c-cpp and so here I am doing that.

tests:
- python:
imports:
- pyblock2

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It seems that block2 is also importable, should it try to import it here?

@traversaro

Copy link
Copy Markdown
Contributor

I am a bit confusion by the version, it seems that the 0.5.3 tag actually advertise the python library as having version 1.1.0 ? See https://github.com/block-hczhai/block2-preview/blob/v0.5.3/setup.py#L147 .

@traversaro traversaro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See comments.

@hczhai

hczhai commented Sep 6, 2026

Copy link
Copy Markdown

I am a bit confusion by the version, it seems that the 0.5.3 tag actually advertise the python library as having version 1.1.0 ? See https://github.com/block-hczhai/block2-preview/blob/v0.5.3/setup.py#L147 .

Sorry for the confusion. The setup.py file is used as a template and the version number is replaced by the actual one when preparing the PyPI release (https://github.com/block-hczhai/block2-preview/blob/v0.5.3/.github/workflows/build.yml#L717). Not sure whether we can do the same thing here.

@chillenb

chillenb commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@traversaro, thanks for the feedback!

  1. block2 should indeed be importable. I can check this import in addition to pyblock2. I'll also add a few of the faster tests from the original test suite.
  2. It'd be relatively simple to adapt @hczhai's versioning sed command to recipe.yaml.

Would these changes address your concerns?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants