Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ms2rescore-rs to 0.4.0.post1 #49308

Closed
wants to merge 11 commits into from
Closed

Conversation

BiocondaBot
Copy link
Collaborator

@BiocondaBot BiocondaBot commented Jul 16, 2024

Update ms2rescore-rs: 0.2.00.4.0.post1

install with bioconda Conda

Info Link or Description
Recipe recipes/ms2rescore-rs (click to view/edit other files)
Summary Rust functionality for the MS²Rescore package.
Home https://github.com/compomics/ms2rescore-rs
Releases https://pypi.org/pypi/ms2rescore_rs/json
Recipe Maintainer(s) @compomics, @RalfG

This pull request was automatically generated (see docs).

@BiocondaBot BiocondaBot added autobump Automatic Version Update new version labels Jul 16, 2024
@martin-g
Copy link
Contributor

The OSX-64 build fails with:

2024-07-16T16:29:23.3787780Z 16:29:15 �[32mBIOCONDA INFO�[0m (ERR) ERROR: ms2rescore_rs-0.2.1-cp312-cp312-macosx_13_0_x86_64.whl is not a supported wheel on this platform.

I think the problem is that the installed deployment target is 13.3:

macosx_deployment_target_osx-64: 13.3-hdc1e006_1 

I don't know why the wheel uses 13.0!

@BiocondaBot BiocondaBot changed the title Update ms2rescore-rs to 0.2.1 Update ms2rescore-rs to 0.3.0 Jul 17, 2024
@BiocondaBot BiocondaBot changed the title Update ms2rescore-rs to 0.3.0 Update ms2rescore-rs to 0.4.0 Oct 24, 2024
Copy link
Contributor

coderabbitai bot commented Nov 5, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces several changes across three main files related to the ms2rescore-rs package. In build.sh, modifications streamline the build process for a Rust package by removing outdated comments and unnecessary conditional blocks. The command for building with maturin is updated to include the -b pyo3 option, and the installation command now includes --no-build-isolation and --no-cache-dir, along with an increase in verbosity from -vv to -vvv.

The meta.yaml file sees a version increment from 0.2.0 to 0.4.0.post1, an updated SHA256 checksum, and the addition of a patches entry. The build number is changed from 1 to 0, and the Python version requirement for skipping the build is updated from < 37 to < 38. The test section is altered, and new fields for license_family and dev_url are added.

Lastly, the setup.patch modifies the pyproject.toml and Cargo.toml files, introducing new configurations and updating the pyo3 dependency version from 0.20.0 to 0.21.2, enhancing the project configuration and dependency management.

Possibly related PRs

Suggested reviewers

  • martin-g: Suggested reviewer for the changes made in this pull request.

Warning

Rate limit exceeded

@BiocondaBot has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 19 minutes and 34 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 75465c8 and aa46d2c.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 75465c8 and aa46d2c.

📒 Files selected for processing (1)
  • recipes/ms2rescore-rs/meta.yaml (3 hunks)
🔇 Additional comments (5)
recipes/ms2rescore-rs/meta.yaml (5)

12-13: Verify the contents and purpose of setup.patch

Given the reported OSX-64 build failures, please ensure that setup.patch addresses the macOS deployment target issue mentioned in the PR comments (wheel targeting macOS 13.0 vs system 13.3).


16-17: Verify Python version requirement change

The minimum Python version requirement has been increased (skip: True for py<38). Please confirm:

  1. Is this change intentional and required by the new version?
  2. Has this been communicated to users who might be using Python 3.7?

Line range hint 21-33: Verify dependency requirements for new version

Given the significant version bump (0.2.0 → 0.4.0.post1), please verify that all dependency versions (especially maturin 1.5,<2.0) are still appropriate for the new version.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


43-45: LGTM! Metadata improvements

Good additions of license_family and dev_url fields, improving package metadata completeness.


Line range hint 1-53: Ensure comprehensive testing across platforms

Given the reported OSX build issues and the significant version bump, please ensure:

  1. The package builds successfully on all supported platforms
  2. Special attention to OSX builds with different deployment targets
  3. Backward compatibility is maintained where possible

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
recipes/ms2rescore-rs/meta.yaml (1)

Line range hint 1-52: Address OSX build failure

The reported OSX-64 build failure indicates a wheel compatibility issue with macOS deployment target (13.0 vs 13.3). Consider:

  1. Adding explicit MACOSX_DEPLOYMENT_TARGET in build configuration
  2. Updating build requirements to specify compatible macOS SDK version

Example addition to fix the OSX build:

build:
  script_env:
    - MACOSX_DEPLOYMENT_TARGET=13.3  # [osx]
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 7b8ba75 and 75465c8.

📒 Files selected for processing (3)
  • recipes/ms2rescore-rs/build.sh (1 hunks)
  • recipes/ms2rescore-rs/meta.yaml (3 hunks)
  • recipes/ms2rescore-rs/setup.patch (1 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/ms2rescore-rs/build.sh

[warning] 8-8: RUST_BACKTRACE appears unused. Verify use (or export if used externally).

(SC2034)

🔇 Additional comments (8)
recipes/ms2rescore-rs/build.sh (2)

10-10: Verify maturin build configuration for macOS compatibility

Given the reported OSX-64 build failure and wheel compatibility issues (macOS 13.0 vs 13.3), consider adding platform-specific build configurations.

Consider adding:

  1. Platform-specific target configuration for macOS
  2. Explicit minimum deployment target setting
    Would you like assistance in implementing these changes?

13-13: Consider pip install flags impact

The combination of --no-deps --no-build-isolation --no-cache-dir flags:

  1. Skips dependency installation (--no-deps)
  2. Bypasses build isolation (--no-build-isolation)
  3. Disables pip cache (--no-cache-dir)

While this might speed up installation, it could mask dependency-related issues. The increased verbosity (-vvv) will help in debugging.

recipes/ms2rescore-rs/setup.patch (2)

9-12: LGTM! Verify these build configuration changes resolve the OSX build issues.

The added maturin configurations are good practices for production builds:

  • Explicit Python source directory specification
  • Binary stripping for reduced size
  • Release profile for optimizations

21-27: Verify compatibility with PyO3 0.21.2 upgrade.

The PyO3 dependency has been upgraded from 0.20.0 to 0.21.2 with added error handling features. While this is a good improvement:

  1. Ensure compatibility with the new PyO3 version
  2. Test the error handling with the new "anyhow" feature
recipes/ms2rescore-rs/meta.yaml (4)

2-3: LGTM: Version and checksum update verified

The version bump to 0.4.0 and its corresponding SHA256 checksum are correctly updated.


12-13: Verify the setup.patch contents for OSX compatibility

Given the reported OSX-64 build failure related to wheel compatibility, please ensure the setup.patch properly addresses macOS deployment target settings.

Could you share the contents of setup.patch to verify if it handles the macOS deployment target issue mentioned in the PR comments?


16-17: Review Python version constraint change

The Python version constraint has been updated from py < 37 to py < 38. Please verify:

  1. This aligns with the package's compatibility requirements
  2. This won't affect existing users negatively

43-43: LGTM: Enhanced metadata

Good addition of license_family and dev_url fields, improving package metadata completeness.

Also applies to: 45-45

Comment on lines +7 to +8
# build statically linked binary with Rust
RUST_BACKTRACE=1
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Address unused environment variable

The RUST_BACKTRACE=1 environment variable is set but not exported, making it ineffective for the subsequent commands.

Apply this fix:

-RUST_BACKTRACE=1
+export RUST_BACKTRACE=1
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# build statically linked binary with Rust
RUST_BACKTRACE=1
# build statically linked binary with Rust
export RUST_BACKTRACE=1
🧰 Tools
🪛 Shellcheck

[warning] 8-8: RUST_BACKTRACE appears unused. Verify use (or export if used externally).

(SC2034)

@BiocondaBot BiocondaBot changed the title Update ms2rescore-rs to 0.4.0 Update ms2rescore-rs to 0.4.0.post1 Nov 20, 2024
@RalfG
Copy link
Contributor

RalfG commented Nov 21, 2024

@mencian, the recent build fails with the same error message, but for Linux:

ERROR: ms2rescore_rs-0.4.0.post1-cp311-cp311-manylinux_2_24_x86_64.whl is not a supported wheel on this platform.

Not sure why the wheels are not recognized for the platform. Could it have been introduced in the cleanup work in the recipe?

@martin-g
Copy link
Contributor

martin-g commented Nov 21, 2024

Usually this error means that you try to use a wheel that is built for another version of Python, i.e. your wheel is for 3.11 but the current version of Python is non 3.11.

@RalfG
Copy link
Contributor

RalfG commented Nov 22, 2024

Could this have to do with the manylinux tag? I noticed other recipes with Maturin get a manylinux2014 / manylinux_ 2_17 wheels, but this one gets a manylinux_2_24 wheel. I tried to force auditwheel to repair it to manylinux2014 locally, but it's not possible with this package:

12:15:21 BIOCONDA INFO (OUT)   Caused by: Error ensuring manylinux_2_17 compliance
12:15:21 BIOCONDA INFO (OUT)   Caused by: Your library is not manylinux_2_17 (aka manylinux2014) compliant because of the presence of too-recent versioned symbols: ["libstdc++.so.6 offending symbols: _ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_@GLIBCXX_3.4.21, _ZSt24__throw_out_of_range_fmtPKcz@GLIBCXX_3.4.20, _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_@GLIBCXX_3.4.21, _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm@GLIBCXX_3.4.21, _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm@GLIBCXX_3.4.21, _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4copyEPcmm@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_mutateEmmPKcm@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE14_M_replace_auxEmmmc@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm@GLIBCXX_3.4.21, _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE8_M_eraseEmm@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_@GLIBCXX_3.4.21, _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm@GLIBCXX_3.4.21, _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEmmRKS4_@GLIBCXX_3.4.21, _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_@GLIBCXX_3.4.21, _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4swapERS4_@GLIBCXX_3.4.21"]. Consider building in a manylinux docker container

@RalfG
Copy link
Contributor

RalfG commented Nov 22, 2024

With the following updated build script, it does build and install with the correct Python versions:

#!/bin/bash

# -e = exit on first error
# -x = print every executed command
set -ex

# build statically linked binary with Rust
RUST_BACKTRACE=1
# Build the package using maturin - should produce *.whl files.
maturin build --interpreter "${PYTHON}" -b pyo3 --release --strip

# Install *.whl files using pip
${PYTHON} -m pip install target/wheels/*.whl --no-deps --no-build-isolation --no-cache-dir -vvv

@RalfG
Copy link
Contributor

RalfG commented Dec 6, 2024

@martin-g, unless I misread the logs, it is building and testing with the correct Python versions. I did notice that the built wheel is manylinux_2_24, not 2_17 / 2014. Is there a requirement for manylinux tag for Bioconda?

@martin-g
Copy link
Contributor

martin-g commented Dec 6, 2024

target/wheels/ms2rescore_rs-0.4.0.post1-cp311-cp311-manylinux_2_24_x86_64.whl - from here I understand that the wheel is for Python 3.11. Correct ?

But earlier the logs show:

2024-11-20T09:20:24.2615598Z     python-3.10.15             |h4a871b0_2_cpython        24.1 MB  conda-forge

and

2024-11-20T09:20:07.7905506Z Extracting python-3.12.7-hc5c86c4_0_cpython.conda

You could add a debug statement in build.sh to see which version of Python is actually used but to me it still looks like a mismatch of the versions.

@martin-g
Copy link
Contributor

martin-g commented Dec 6, 2024

I did notice that the built wheel is manylinux_2_24, not 2_17 / 2014. Is there a requirement for manylinux tag for Bioconda?

You might be right here!
I just read about manylinux (I am not a Python fan!) and 2_24 means the version of Glibc!
So, yes! Bioconda uses sysroot 2.17, i.e. Glibc 2.17:

2024-11-20T09:26:40.1322385Z 09:26:08 �[32mBIOCONDA INFO�[0m (OUT)     sysroot_linux-64:                  2.17-h4a8ded7_18        conda-forge�

@RalfG
Copy link
Contributor

RalfG commented Dec 9, 2024

It is using the correct Python version. In the latest log (https://github.com/bioconda/bioconda-recipes/actions/runs/11930282933/job/33250889144?pr=49308), Python 3.10 is used by bioconda utils on the build system, but for building and testing 3.11 is used consistently:

09:29:32 BIOCONDA INFO (OUT)   File "$PREFIX/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 147, in _fail_if_link_is_unsupported_wheel
09:29:32 BIOCONDA INFO (OUT)     raise UnsupportedWheel(msg)
09:29:32 BIOCONDA INFO (OUT) pip._internal.exceptions.UnsupportedWheel: ms2rescore_rs-0.4.0.post1-cp311-cp311-manylinux_2_24_x86_64.whl is not a supported wheel on this platform.

Do note that if run successfully, it will build and test for various Python versions.

Is there a way to build and test with glibc 2.24 for manylinux_2_24 support?

@martin-g
Copy link
Contributor

martin-g commented Dec 9, 2024

AFAIK there is no way to use different version of sysroot/glibc - https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/d3a9f984e7a73dc954e566463b603637c96e3ea2/recipe/conda_build_config.yaml#L17C1-L21C1

@RalfG
Copy link
Contributor

RalfG commented Dec 9, 2024

It does confuse me that the GitHub Action for PyPI manages to build a manylinux_2014 / manylinux_2_17, while the Bioconda build can at best do 2_27. I tried to force maturin to repair the wheel to 2_17, but that failed.

@BiocondaBot BiocondaBot closed this Jan 8, 2025
@BiocondaBot BiocondaBot deleted the bump/ms2rescore_rs branch January 8, 2025 15:20
@RalfG
Copy link
Contributor

RalfG commented Jan 16, 2025

Hi @martin-g,

Thanks for looking further into this! Ultimately, the solution was relatively simple: Disabling manylinux altogether in the maturin options.

Currently trying to fix an issue in the macOS build in #53247.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autobump Automatic Version Update new version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants