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

Rebuild muse recipe #52155

Merged
merged 5 commits into from
Nov 18, 2024
Merged

Rebuild muse recipe #52155

merged 5 commits into from
Nov 18, 2024

Conversation

mencian
Copy link
Contributor

@mencian mencian commented Nov 18, 2024

Describe your pull request here


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues

Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.

Bot commands for PR management

Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

mencian and others added 3 commits November 18, 2024 02:21

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Copy link
Contributor

coderabbitai bot commented Nov 18, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces modifications to the install_muse.sh script, meta.yaml file, and a new patch file version.patch for the MuSE package. The install_muse.sh script now includes a conditional check for the operating system to set the appropriate compiler, updates the Boost library version, and simplifies the build process by adjusting the b2 command and the copying of files. Additionally, it clones a newer version of the gperftools repository and updates the htslib library version, enhancing the script's adaptability and streamlining the installation process.

In the meta.yaml file, a new patch related to versioning is introduced, and the build number is incremented. The file now also includes support for the linux-aarch64 platform. The version.patch file adds command-line argument handling to print the application's version, improving user interaction. Overall, these changes enhance the build configuration and compatibility of the MuSE package across different platforms.

Possibly related PRs

  • Update MuSE to latest version 2.1.2 #47957: The changes in install_muse.sh regarding the Boost library version and installation process are directly related to the updates made in the build.sh script in this PR, which also modifies the handling of Boost.
  • Add M1 builds for PopPUNK #50011: This PR includes modifications to the meta.yaml file, which is relevant as the main PR also updates the meta.yaml for the MuSE package, indicating a connection in terms of package management.
  • Rebuild MaSuRCA recipe #51662: The changes in the install.sh script for the MasurCA software, particularly regarding build configurations and cleanup, may relate to the overall improvements in installation scripts seen in the main PR.
  • Update staden_io_lib recipe #51704: The updates to the build.sh script for the Staden I/O library, which include improvements in build processes, are relevant as they reflect similar enhancements in the install_muse.sh script in the main PR.
  • Update meta-neuro version 1.0.0 #51826: The changes in the meta.yaml file for the meta-neuro package, which involve dependency management and versioning, are relevant as they parallel the updates made in the meta.yaml for the MuSE package in the main PR.

Suggested labels

please review & merge

Suggested reviewers

  • martin-g

Warning

Rate limit exceeded

@mencian has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 15 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 1bd0d2f and c3340f7.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1bd0d2f and c3340f7.

📒 Files selected for processing (2)
  • recipes/muse/fix-install_muse.sh.patch (4 hunks)
  • recipes/muse/meta.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • recipes/muse/fix-install_muse.sh.patch
  • recipes/muse/meta.yaml

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: 0

🧹 Outside diff range and nitpick comments (3)
recipes/muse/version.patch (1)

8-29: Consider using a command-line argument parsing library

The current approach to command-line argument handling, while functional, could benefit from using a dedicated argument parsing library. This would provide:

  • Standardized help messages
  • Automatic version flag handling
  • Better error handling
  • Easier addition of new options in the future

Consider using libraries like boost::program_options or CLI11 which are well-suited for C++ applications.

recipes/muse/fix-install_muse.sh.patch (2)

Line range hint 2-19: Consider using conda-build's compiler infrastructure

The OS-specific compiler selection might override conda-build's compiler infrastructure. Instead of setting TOOL directly, consider:

  1. Using ${CC} and ${CXX} environment variables which are properly set by conda-build
  2. Falling back to OS-specific defaults only if these aren't set
-if [[ `uname` == "Darwin" ]]; then
-	export TOOL=clang
-else
-	export TOOL=gcc
-fi
+# Use conda-build's compiler if available, otherwise fall back to OS defaults
+if [ -z "${CC}" ]; then
+    if [[ `uname` == "Darwin" ]]; then
+        export CC=clang
+        export CXX=clang++
+    else
+        export CC=gcc
+        export CXX=g++
+    fi
+fi
+export TOOL=$(basename ${CC})

19-27: Use PREFIX variable for consistency

The bootstrap command uses $(pwd) for prefix while other commands use ${PREFIX}. For consistency and to ensure proper installation paths:

-./bootstrap.sh --with-toolset="${TOOL}" --prefix="$(pwd)"
+./bootstrap.sh --with-toolset="${TOOL}" --prefix="${PREFIX}"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between bd51407 and 1bd0d2f.

📒 Files selected for processing (3)
  • recipes/muse/fix-install_muse.sh.patch (4 hunks)
  • recipes/muse/meta.yaml (2 hunks)
  • recipes/muse/version.patch (1 hunks)
🔇 Additional comments (10)
recipes/muse/version.patch (4)

2-3: LGTM: Appropriate file permission adjustment

Removing executable permissions from source files is a good security practice.


11-21: LGTM: Improved code formatting

The indentation changes enhance code readability while maintaining the original logic.


30-31: LGTM: Improved control flow

Moving the return statement outside the conditional blocks improves code structure and ensures consistent return behavior.


22-25: Verify Version string initialization and consider flag consolidation

While the version flag implementation is functionally correct, consider:

  1. The code assumes Version is properly initialized. Verify this variable is always defined.
  2. Consider using only --version as the standard flag, as having both --version and --v might be confusing.
recipes/muse/meta.yaml (3)

21-21: LGTM: Build number increment is appropriate

The build number increment is correct as there are recipe changes (new patch and platform support).


63-64: Verify dependency availability for linux-aarch64

Before enabling aarch64 support, we need to ensure all dependencies are available for this architecture.

#!/bin/bash
# Description: Verify critical dependencies are available for linux-aarch64

# Check if key dependencies have aarch64 builds
DEPS=("boost" "libcurl" "icu" "bzip2" "xz" "zlib")
echo "Checking dependencies for linux-aarch64:"

for dep in "${DEPS[@]}"; do
  # Search for conda packages with aarch64 builds
  conda search --json "$dep" | jq '.[] | select(.platform == "linux-aarch64" or .platform == "noarch") | {name, version, platform}'
done

# Check if there are any architecture-specific build flags
rg "aarch64|arm64" recipes/muse/

Consider adding CI tests for the aarch64 platform to ensure compatibility.


15-15: Verify the version.patch file

The addition of version support is good practice. However, let's verify the patch file exists and follows conda-forge/bioconda guidelines.

✅ Verification successful

Let me try another verification approach to check the patch file.


Patch file looks good and follows proper conventions

The version.patch file:

  • Exists and has proper permissions
  • Follows standard patch format with correct diff headers
  • Makes a clean modification to add --version support
  • Contains proper context lines and clean indentation fixes
  • Implements version display in a standard way using --version and --v flags
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the version.patch file exists and follows guidelines

# Check if patch file exists
if ! fd "version.patch" recipes/muse/; then
  echo "Error: version.patch not found"
  exit 1
fi

# Check patch format
rg -U "^diff|^index|^\+\+\+|^---" recipes/muse/version.patch

# Check if patch applies cleanly (look for fuzz/offset warnings)
rg "Hunk.*fuzz|offset" recipes/muse/version.patch

Length of output: 1603


Script:

#!/bin/bash
# Let's check if the patch file exists and examine its contents
ls -l recipes/muse/version.patch
cat recipes/muse/version.patch

Length of output: 1038

recipes/muse/fix-install_muse.sh.patch (3)

Line range hint 30-48: LGTM! Good improvements to gperftools build

The changes improve the build configuration by:

  • Using proper prefix paths
  • Implementing parallel builds with CPU_COUNT
  • Updating to a newer, stable version

89-91: LGTM! Proper cleanup implementation

The cleanup section properly removes all temporary build artifacts and directories.


Line range hint 49-88: Verify libcurl dependencies in meta.yaml

The addition of --enable-libcurl will require curl development libraries. Please ensure these dependencies are properly declared in meta.yaml.

@mencian mencian merged commit af160e6 into master Nov 18, 2024
5 of 6 checks passed
@mencian mencian deleted the muse branch November 18, 2024 09:15
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.

None yet

1 participant