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

gxf2bed: add aarch64/arm64 builds #51120

Merged
merged 1 commit into from
Oct 3, 2024
Merged

Conversation

martin-g
Copy link
Contributor

@martin-g martin-g commented Oct 3, 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>.

Summary by CodeRabbit

  • New Features
    • Updated support for additional platforms: linux-aarch64 and osx-arm64.
  • Improvements
    • Enhanced script execution for better error handling and command visibility.
    • Generalized Rust compiler requirement for improved compatibility.
  • Version Update
    • Incremented build number for the gxf2bed package.

Signed-off-by: Martin Tzvetanov Grigorov <mgrigorov@apache.org>
@martin-g martin-g added aarch64 Related to adding linux-aarch64 support osx-arm64 Related to adding osx-arm64 support labels Oct 3, 2024
Copy link
Contributor

coderabbitai bot commented Oct 3, 2024

📝 Walkthrough

Walkthrough

The changes in this pull request involve modifications to the build.sh script and the meta.yaml file for the gxf2bed package. The build.sh script has been updated to improve environment variable handling and the execution of the cargo install command, including the removal of a previous SSH workaround. The meta.yaml file reflects an updated build number, a change in the Rust compiler requirement, and the addition of support for new platforms.

Changes

File Change Summary
recipes/gxf2bed/build.sh Modified to handle environment variables better; removed SSH workaround; added --no-track option to cargo install.
recipes/gxf2bed/meta.yaml Updated build number from 0 to 1; changed Rust requirement to {{ compiler("rust") }}; added support for linux-aarch64 and osx-arm64.

Possibly related PRs

Suggested labels

please review & merge

Suggested reviewers

  • bgruening

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 (1)
recipes/gxf2bed/build.sh (1)

6-6: Improved cargo install command with debugging support

The modifications to the cargo install command are beneficial:

  1. Adding RUST_BACKTRACE=1 enables full backtraces, which is excellent for debugging potential issues.
  2. The --no-track option is appropriate for Conda build environments where the installation directory may be temporary.

These changes, combined with the removal of previous workarounds, suggest an improved and more standardized build process.

Consider adding a comment explaining the purpose of --no-track for future maintainers:

 # build statically linked binary with Rust
-RUST_BACKTRACE=1 cargo install --verbose --path . --root ${PREFIX} --no-track
+# Use --no-track to prevent Cargo from tracking the installation in its local tracking file
+RUST_BACKTRACE=1 cargo install --verbose --path . --root ${PREFIX} --no-track
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 73b7059 and 51ebd9e.

📒 Files selected for processing (2)
  • recipes/gxf2bed/build.sh (1 hunks)
  • recipes/gxf2bed/meta.yaml (2 hunks)
🔇 Additional comments (6)
recipes/gxf2bed/build.sh (2)

3-3: Excellent addition of set -xe

The inclusion of set -xe is a great improvement to the script. It enables verbose execution (-x) which aids in debugging, and causes the script to exit immediately if any command fails (-e), preventing potential cascading errors. This change aligns with best practices for robust shell scripting.


1-6: Overall improvements support aarch64/arm64 builds

The changes to this build script are well-aligned with the PR's objective of adding aarch64/arm64 builds:

  1. The script has been simplified by removing previous workarounds, suggesting an improved build environment.
  2. The addition of set -xe and RUST_BACKTRACE=1 enhances debugging capabilities, which is crucial when supporting new architectures.
  3. The use of --no-track with cargo install is appropriate for Conda build environments.

Importantly, these improvements are architecture-agnostic, maintaining good maintainability while supporting the new builds. The script is now more robust and easier to debug across all supported architectures.

recipes/gxf2bed/meta.yaml (4)

13-13: LGTM: Build number increment is correct.

Incrementing the build number from 0 to 1 is the right approach when making changes to the package without updating its version. This follows Conda packaging best practices.


36-38: LGTM: Additional platforms added correctly.

The addition of linux-aarch64 and osx-arm64 to the additional-platforms list is correct and aligns with the PR objectives. This change will enable the package to be built and used on ARM-based systems, increasing its accessibility.

To ensure full compatibility with these new architectures, please verify that:

  1. The package builds successfully on these new platforms.
  2. All dependencies are available for these architectures.

You can use the following command to check if there are any architecture-specific build issues:

#!/bin/bash
# Description: Check build logs for any architecture-specific issues
gh run list --limit 1 --json conclusion,url --jq '.[] | select(.conclusion == "success") | .url' | xargs -I {} gh run view {} --log | grep -E "aarch64|arm64"

Line range hint 1-41: Overall LGTM: Changes align with PR objectives and best practices.

The changes made to this recipe are well-structured and align with the PR objectives of adding aarch64/arm64 builds. Here's a summary of the changes:

  1. Build number incremented correctly.
  2. Rust compiler requirement updated to use the Conda-forge compiler syntax.
  3. Additional platforms (linux-aarch64 and osx-arm64) added to support ARM architectures.

These changes follow Conda packaging best practices and should enable the package to be built and used on ARM-based systems.

To ensure the changes are fully effective, please perform the following final verifications:

  1. Confirm successful builds on all platforms, including the new ARM architectures.
  2. Verify that all dependencies are available for the new architectures.
  3. Run basic functionality tests on the ARM builds to ensure the package works as expected.

You can use the following command to get an overview of the build status across different platforms:

#!/bin/bash
# Description: Check build status across different platforms
gh run list --limit 1 --json conclusion,url --jq '.[] | select(.conclusion == "success") | .url' | xargs -I {} gh run view {} --log | grep -E "Build summary|linux-64|osx-64|linux-aarch64|osx-arm64"

If all these checks pass, the PR should be ready for merging.


20-20: LGTM: Rust compiler requirement updated correctly.

Changing from rust >=1.39 to {{ compiler("rust") }} is a good practice. It allows for more flexibility and easier maintenance by letting the build system choose the appropriate Rust compiler version.

To ensure this change doesn't introduce any compatibility issues, please verify that the package builds successfully with this new compiler specification. You can use the following command to check the build logs:

@martin-g
Copy link
Contributor Author

martin-g commented Oct 3, 2024

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built are ready for inspection:

Arch Package Zip File / Repodata CI Instructions
linux-64 gxf2bed-0.2.3-h919a2d8_1.tar.bz2 LinuxArtifacts.zip Azure
showYou may also use conda to install after downloading and extracting the zip file. From the LinuxArtifacts directory: conda install -c ./packages <package name>
osx-64 gxf2bed-0.2.3-hfd5405d_1.tar.bz2 OSXArtifacts.zip Azure
showYou may also use conda to install after downloading and extracting the zip file. From the OSXArtifacts directory: conda install -c ./packages <package name>
osx-arm64 gxf2bed-0.2.3-h2892f54_1.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/4bec7665-cf24-461c-a7d8-11e11d873cf9/artifacts/0/tmp/artifacts/packages <package name>
linux-aarch64 gxf2bed-0.2.3-h2c59f48_1.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/5a896021-e326-45d7-9c97-6f92bd4e33a2/artifacts/0/tmp/artifacts/packages <package name>

Docker image(s) built:

Package Tag CI Install with docker
gxf2bed 0.2.3--h919a2d8_1 Azure
showImages for Azure are in the LinuxArtifacts zip file above.gzip -dc LinuxArtifacts/images/gxf2bed:0.2.3--h919a2d8_1.tar.gz | docker load

@martin-g
Copy link
Contributor Author

martin-g commented Oct 3, 2024

mgrigorov in 🌐 euler-arm-22 in /tmp/gxf2bed via 🅒 test123 took 3s 
❯ tar xvf gxf2bed-0.2.3-h2c59f48_1.tar.bz2                                                                                                                                                                 (test123) 
info/files
info/run_exports.json
info/test/run_test.sh
info/recipe/build.sh
info/hash_input.json
info/index.json
info/paths.json
info/recipe/meta.yaml.template
info/licenses/LICENSE
info/recipe/meta.yaml
info/recipe/conda_build_config.yaml
info/about.json
info/git
bin/bench
bin/gxf2bed

mgrigorov in 🌐 euler-arm-22 in /tmp/gxf2bed via 🅒 test123 
❯ file bin/*                                                                                                                                                                                               (test123) 
bin/bench:   ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not stripped
bin/gxf2bed: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not stripped

mgrigorov in 🌐 euler-arm-22 in /tmp/gxf2bed via 🅒 test123 
❯ ./bin/gxf2bed                                                                                                                                                                                            (test123) 

##### GXF2BED #####
Fastest GTF/GFF-to-BED converter chilling around.
Repository: https://github.com/alejandrogzi/gxf2bed
Feel free to contact the developer if any issue/bug is found.
Version: 0.2.3

error: the following required arguments were not provided:
  --input <GXF>
  --output <BED>

Usage: gxf2bed --input <GXF> --output <BED>

For more information, try '--help'.

LGTM!

@martin-g
Copy link
Contributor Author

martin-g commented Oct 3, 2024

@BiocondaBot please add label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aarch64 Related to adding linux-aarch64 support osx-arm64 Related to adding osx-arm64 support please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants