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

metacache: add linux-aarch64 build #51106

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

martin-g
Copy link
Contributor

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

    • Enhanced build script for improved performance and debugging.
    • Added support for the "linux-aarch64" platform in the package metadata.
  • Bug Fixes

    • Updated license to a more permissive version.
  • Chores

    • Incremented build number for the metacache package.

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

coderabbitai bot commented Oct 2, 2024

📝 Walkthrough

Walkthrough

The pull request includes modifications to the build.sh script and the meta.yaml file for the metacache package. The build.sh script enhancements involve enabling verbose command execution, updating compilation flags, and allowing parallel builds. The meta.yaml file sees an increment in the build number, a change in the license specification, and the addition of a new supported platform, while the version and other sections remain unchanged.

Changes

File Change Summary
recipes/metacache/build.sh Updated to set -xe for debugging, modified CFLAGS and CXXFLAGS to include -I$PREFIX/include, added -j ${CPU_COUNT} to make for parallel compilation.
recipes/metacache/meta.yaml Build number incremented from 0 to 1, license changed from "GPL-3.0" to "GPL-3.0-or-later", added additional-platforms: - linux-aarch64.

Possibly related PRs

  • Update metacache to 2.4.3 #51078: Updates the meta.yaml file for the metacache package, involving changes to versioning and build number, closely related to the modifications in this PR.

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.

@martin-g
Copy link
Contributor Author

martin-g commented Oct 2, 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 metacache-2.4.3-hdcf5f25_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>
linux-aarch64 metacache-2.4.3-h7f4e536_1.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/6e6a4b22-c409-488c-ab5a-bf28af1e423e/artifacts/0/tmp/artifacts/packages <package name>

Docker image(s) built:

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

@martin-g
Copy link
Contributor Author

martin-g commented Oct 2, 2024

mgrigorov in 🌐 euler-arm-22 in /tmp/metacache via 🅒 test123 took 2s 
❯ tar xvf metacache-2.4.3-h7f4e536_1.tar.bz2                                                                                                                                                               (test123) 
info/run_exports.json
info/hash_input.json
info/files
info/test/run_test.sh
info/index.json
info/recipe/build.sh
info/recipe/meta.yaml.template
info/paths.json
info/recipe/meta.yaml
info/recipe/conda_build_config.yaml
info/about.json
info/licenses/LICENSE
info/git
bin/metacache-db-info
bin/download-ncbi-taxmaps
bin/metacache-partition-genomes
bin/metacache-build-refseq
bin/download-ncbi-taxonomy
bin/download-ncbi-genomes
bin/summarize-results
bin/metacache


mgrigorov in 🌐 euler-arm-22 in /tmp/metacache via 🅒 test123 
❯ file bin/*                                                                                                                                                                                               (test123) 
bin/download-ncbi-genomes:       Bourne-Again shell script, Unicode text, UTF-8 text executable
bin/download-ncbi-taxmaps:       Bourne-Again shell script, Unicode text, UTF-8 text executable
bin/download-ncbi-taxonomy:      Bourne-Again shell script, Unicode text, UTF-8 text executable
bin/metacache:                   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, stripped
bin/metacache-build-refseq:      Bourne-Again shell script, Unicode text, UTF-8 text executable
bin/metacache-db-info:           Bourne-Again shell script, ASCII text executable
bin/metacache-partition-genomes: Bourne-Again shell script, Unicode text, UTF-8 text executable
bin/summarize-results:           Python script, Unicode text, UTF-8 text executable

mgrigorov in 🌐 euler-arm-22 in /tmp/metacache via 🅒 test123 
❯ ./bin/metacache                                                                                                                                                                                          (test123) 
MetaCache  Copyright (C) 2016-2024  André Müller & Robin Kobus
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file 'LICENSE' for details.

USAGE:

    metacache <MODE> [OPTION...]

    Available modes:

    help          shows documentation
    build         build new database from reference sequences (usually genomes)
    modify        add reference sequences and/or taxonomy to existing database
    query         classify read sequences using pre-built database
    build+query   build new database and query directly afterwards
    merge         merge classification results of independent queries
    info          show database and reference sequence properties


EXAMPLES:

    Query single FASTA file 'myreads.fna' against pre-built database 'refseq':
        metacache query refseq myreads.fna -out results.txt
    same with output to the console:
        metacache query refseq myreads.fna

    Query all sequence files in folder 'test' againgst database 'refseq':
        metacache query refseq test -out results.txt

    Query paired-end reads in separate files:
        metacache query refseq reads1.fa reads2.fa -pairfiles -out results.txt

    Query paired-end reads in one file (a1,a2,b1,b2,...):
        metacache query refseq paired_reads.fa -pairseq -out results.txt

    View documentation for query mode:
        metacache help query

    View documentation on how to build databases:
        metacache help build

LGTM!

@martin-g
Copy link
Contributor Author

martin-g commented Oct 2, 2024

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 2, 2024
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/metacache/build.sh (1)

14-14: Improved build performance with parallel compilation.

The addition of -j ${CPU_COUNT} to the make command is a good optimization:

  • It enables parallel job execution, utilizing multiple CPU cores.
  • This can significantly speed up the build process, especially on multi-core systems.

For improved robustness, consider adding a fallback in case ${CPU_COUNT} is not set:

-make -j ${CPU_COUNT}
+make -j ${CPU_COUNT:-1}

This ensures that if ${CPU_COUNT} is not set, the build will still proceed with a single job, maintaining compatibility with all environments.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 5ca5963 and a953da4.

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

3-3: Improved error handling and debugging.

The change from set -e to set -xe enhances the script's behavior:

  • It maintains the fail-fast behavior (-e), exiting immediately if any command fails.
  • It adds verbose output (-x), printing each command before execution.

This modification will make it easier to debug issues during the build process by providing more detailed information about which commands are being executed.


Line range hint 1-24: Overall improvements to build process - LGTM!

The changes in this PR enhance the build script in two key ways:

  1. Improved debugging capabilities with the addition of the -x flag to the set command.
  2. Potential performance boost through parallel compilation using -j ${CPU_COUNT}.

These modifications will make the build process more transparent and potentially faster, without altering the actual build steps or output. This is particularly beneficial for the new linux-aarch64 build, as it will help identify any architecture-specific issues more easily.

The changes align well with the PR objective of adding a linux-aarch64 build for the metacache package. They improve the build process without introducing risks to the package functionality.

recipes/metacache/meta.yaml (4)

12-12: Build number increment looks good.

The build number has been correctly incremented from 0 to 1. This is the appropriate action when modifying a package without changing its version, which aligns with the PR's objective of adding a new build for linux-aarch64.


Line range hint 1-48: Overall, the changes look good and align with the PR objectives.

The modifications to add linux-aarch64 support, update the build number, and adjust the license are all appropriate. However, there are a few points that require verification:

  1. Confirm the license change with the upstream project.
  2. Verify the successful build and functionality of the package on linux-aarch64.

Once these verifications are complete, the PR should be ready for merging.


42-42: License update looks good, but needs verification.

The license has been updated from GPL-3.0 to GPL-3.0-or-later, which is more permissive. This change allows users to choose between GPL-3.0 or any later version.

Please confirm that this license change aligns with the upstream project's intentions. You can verify this by checking the project's GitHub repository or contacting the maintainers.


46-48: Addition of linux-aarch64 platform looks good.

The new 'extra' section with 'additional-platforms' specifying linux-aarch64 directly addresses the PR's main objective. This addition is correctly formatted and placed according to conda-forge standards.

To ensure the package can be built and run on linux-aarch64, please verify the following:

  1. Check if the CI/CD pipeline includes a successful build for linux-aarch64.
  2. If possible, test the package on an aarch64 Linux system to confirm it runs correctly.

You can use the following command to check the CI build status:

If this returns "success", it indicates that the linux-aarch64 build was successful in the CI pipeline.

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 please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants