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

Add support for osx-arm64 #50991

Merged
merged 10 commits into from
Oct 2, 2024
Merged

Conversation

danydoerr
Copy link
Contributor

@danydoerr danydoerr commented Sep 26, 2024

Panacus compiles and runs on osx-arm64. This update brings panacus also to this plattform.

Summary by CodeRabbit

  • New Features

    • Expanded compatibility of the panacus tool to include macOS systems with ARM64 architecture and Linux systems with ARM64 architecture.
    • Added a development URL for easier access to the development repository.
  • Chores

    • Incremented the build number for the panacus recipe.
    • Updated the build requirement to use the Rust compiler.
    • Replaced the seaborn dependency with seaborn-base.
    • Clarified the summary description for the panacus tool.
    • Adjusted paths in the installation process for the panacus executable.

Copy link
Contributor

coderabbitai bot commented Sep 26, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request updates the meta.yaml file for the panacus recipe by incrementing the build number from 0 to 2, replacing the C++ compiler requirement with a Rust compiler requirement, and removing the minimum version requirement for Rust. It also changes the dependency from seaborn to seaborn-base, adds osx-arm64 and linux-aarch64 to the additional platforms, updates the summary description, and introduces a new dev_url field. The build.sh script is modified to change the installation method of the panacus executable from a build process to an installation process.

Changes

Files Change Summary
recipes/panacus/meta.yaml Incremented build number from 0 to 2; replaced C++ compiler with Rust; removed minimum Rust version; updated dependency from seaborn to seaborn-base; added osx-arm64 and linux-aarch64 to extra.additional-platforms; updated summary and added dev_url in the about section.
recipes/panacus/build.sh Changed installation method to cargo install; updated path for copying the executable to $PREFIX/bin/panacus.

Possibly related PRs

Suggested labels

osx-arm64, aarch64


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5b18eb3 and 5ab5cd3.

📒 Files selected for processing (2)
  • recipes/panacus/build.sh (1 hunks)
  • recipes/panacus/meta.yaml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • recipes/panacus/build.sh
  • recipes/panacus/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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3650ed5 and 0914309.

📒 Files selected for processing (1)
  • recipes/panacus/meta.yaml (3 hunks)
🔇 Additional comments (4)
recipes/panacus/meta.yaml (4)

13-13: Build number increment looks good, but clarification needed.

The build number has been incremented from 0 to 2, which is good practice when updating a package. However, could you please clarify why it was incremented by 2 instead of 1? Was there an intermediate build that's not reflected in this PR?


21-24: Build requirements for Rust look good.

The addition of the Rust compiler as a build requirement and specifying a minimum Rust version (>=1.68) are appropriate changes. These additions will ensure that the package can be built correctly on the osx-arm64 platform and maintain consistency across different build environments.


48-49: Addition of osx-arm64 to additional-platforms is appropriate.

The inclusion of 'osx-arm64' in the 'additional-platforms' list is consistent with the PR objective of adding support for the osx-arm64 platform. This change will ensure that the package is built and available for macOS systems using ARM64 architecture.


Line range hint 1-50: Overall, changes align well with PR objectives, with one point needing clarification.

The modifications made to the meta.yaml file are generally consistent with the PR objective of adding support for the osx-arm64 platform. Key changes include:

  1. Incrementing the build number (clarification requested on the jump from 0 to 2).
  2. Adding Rust compiler requirements, which is appropriate for the target platform.
  3. Including osx-arm64 in the list of additional platforms.

These changes should enable the compilation and execution of Panacus on the osx-arm64 platform as intended. However, clarification is needed regarding the 'native_and_emulated' addition in the test section to ensure it's correctly implemented.

Once the points raised in the previous comments are addressed, this PR should be ready for approval.

@@ -31,6 +32,7 @@ requirements:
- seaborn

test:
native_and_emulated
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Unrecognized 'native_and_emulated' test command in recipes/panacus/meta.yaml.

The native_and_emulated command in the test section does not appear to be a valid conda build test command based on existing documentation and usage in other recipes. Please verify if this is a custom command and ensure it is correctly implemented.

🔗 Analysis chain

Clarification needed on the 'native_and_emulated' test command.

The addition of 'native_and_emulated' in the test section is likely related to testing the package on both native and emulated environments, which is relevant for osx-arm64 support. However, the syntax of this line is unusual for a conda recipe test section. Could you please clarify:

  1. What does the 'native_and_emulated' command do?
  2. Is this the correct syntax for adding this test in a conda recipe?
  3. Should this be part of the 'commands:' subsection instead?
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if 'native_and_emulated' is a valid conda build option or command

# Test 1: Search for 'native_and_emulated' in conda build documentation
echo "Searching for 'native_and_emulated' in conda build documentation:"
rg --type md "native_and_emulated" $(fd -t d "conda-build" .)

# Test 2: Check if 'native_and_emulated' is used in other recipe files
echo "Checking usage of 'native_and_emulated' in other recipe files:"
rg --type yaml "native_and_emulated" recipes/

Length of output: 441

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

🧹 Outside diff range and nitpick comments (1)
recipes/panacus/build.sh (1)

Line range hint 1-7: Consider optimizing build settings and clarify environment variable usage

While reviewing the entire script, I noticed a couple of points that might benefit from clarification or optimization:

  1. The script uses RUST_BACKTRACE=1. While this is helpful for debugging, it might produce unnecessary verbose output in a production build.

  2. CARGO_HOME is set to a path within BUILD_PREFIX. This seems unusual and might be a workaround for some build system limitations.

Consider the following suggestions:

  1. Use RUST_BACKTRACE=1 only for debug builds:

    if [ "${DEBUG:-}" = 1 ]; then
        export RUST_BACKTRACE=1
    fi
  2. Clarify why CARGO_HOME is set to a path within BUILD_PREFIX. If it's not necessary for all builds, consider making it conditional.

Could you provide more context on these choices, especially if they're related to the osx-arm64 support?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4dfee5a and 808f5d6.

📒 Files selected for processing (1)
  • recipes/panacus/build.sh (1 hunks)

cp target/release/panacus $PREFIX/bin
cp scripts/panacus-visualize.py $PREFIX/bin/panacus-visualize
cp $PREFIX/target/release/panacus $PREFIX/bin
cp $PREFIX/scripts/panacus-visualize.py $PREFIX/bin/panacus-visualize
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Issue Found: panacus-visualize.py is missing in the expected source paths.

  • The source file panacus-visualize.py was not found at /scripts/panacus-visualize.py nor at scripts/panacus-visualize.py. This may indicate that the file has been deleted or moved without updating the build script accordingly.
🔗 Analysis chain

Verify the changes to panacus-visualize.py copying

Two changes have been made to the copying of panacus-visualize.py:

  1. The source path now includes $PREFIX.
  2. The destination filename has been changed from panacus-visualize.py to panacus-visualize.

Please confirm:

  1. Is the change in the source path necessary for all platforms or specific to osx-arm64?
  2. Is the removal of the .py extension intentional? If so, ensure that:
    • The script has the correct shebang line.
    • All documentation and user instructions are updated to reflect this change.

To verify the existence of the file and its contents, you can run:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence and contents of panacus-visualize.py
if [ -f "$PREFIX/scripts/panacus-visualize.py" ]; then
    echo "panacus-visualize.py exists at $PREFIX/scripts/panacus-visualize.py"
    echo "First line of the script:"
    head -n 1 "$PREFIX/scripts/panacus-visualize.py"
else
    echo "panacus-visualize.py not found at $PREFIX/scripts/panacus-visualize.py"
fi

# Check if the old path still exists
if [ -f "scripts/panacus-visualize.py" ]; then
    echo "panacus-visualize.py also exists at scripts/panacus-visualize.py"
fi

Length of output: 221

@@ -3,5 +3,5 @@
RUST_BACKTRACE=1 CARGO_HOME="${BUILD_PREFIX}/.cargo" cargo build --release

mkdir -p $PREFIX/bin
cp target/release/panacus $PREFIX/bin
cp scripts/panacus-visualize.py $PREFIX/bin/panacus-visualize
cp $PREFIX/target/release/panacus $PREFIX/bin
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

panacus executable not found at the specified source path

The cp command is attempting to copy the panacus executable from $PREFIX/target/release/panacus, but the file does not exist at this location. This will prevent the installation from succeeding.

  • Ensure that the build process correctly generates the panacus executable in $PREFIX/target/release/.
  • Verify that the build steps for the osx-arm64 platform are correctly configured to output the executable to the expected directory.
🔗 Analysis chain

Verify the necessity of changing the source path for panacus

The source path for copying the panacus executable has been changed to include $PREFIX. While this change might be related to supporting osx-arm64, it's not immediately clear why this is necessary.

Please confirm:

  1. Is this change specific to osx-arm64 or does it apply to all platforms?
  2. Does $PREFIX/target/release/panacus always exist after the build process?

To verify the existence of the file, you can run:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the existence of panacus executable
if [ -f "$PREFIX/target/release/panacus" ]; then
    echo "panacus executable exists at $PREFIX/target/release/panacus"
else
    echo "panacus executable not found at $PREFIX/target/release/panacus"
fi

# Check if the old path still exists
if [ -f "target/release/panacus" ]; then
    echo "panacus executable also exists at target/release/panacus"
fi

Length of output: 193

@mencian mencian merged commit efa52a2 into bioconda:master Oct 2, 2024
7 checks passed
@danydoerr
Copy link
Contributor Author

Thanks a lot, @mencian!

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.

2 participants