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

merquryfk & fastk: add linux-aarch64 build #51369

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

martin-g
Copy link
Contributor

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>.

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
@martin-g martin-g added the aarch64 Related to adding linux-aarch64 support label Oct 14, 2024
Copy link
Contributor

coderabbitai bot commented Oct 14, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces modifications to two primary files: build.sh and meta.yaml for the MERQURYFK package. In build.sh, the script has been enhanced with the addition of the set -xe command, which ensures the script exits on errors and prints commands before execution. Furthermore, the make command has been updated to utilize parallel execution with the -j"${CPU_COUNT}" flag, improving build efficiency. The meta.yaml file has seen a version update, where the build number has increased from 0 to 1, and a skip directive for macOS has been added to prevent builds on that platform. Additionally, support for the linux-aarch64 architecture has been specified in a new extra section. The requirements and about sections of the meta.yaml file remain unchanged.

Possibly related PRs

Suggested reviewers

  • mencian
  • bgruening

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3f4eb64 and a6a09e6.

📒 Files selected for processing (2)
  • recipes/fastk/build.sh (1 hunks)
  • recipes/fastk/meta.yaml (2 hunks)
🧰 Additional context used
🔇 Additional comments (6)
recipes/fastk/build.sh (4)

3-3: Excellent addition of set -xe for improved debugging and error handling.

The addition of set -xe enhances the script's robustness:

  • -x enables debugging by printing each command before execution.
  • -e causes the script to exit immediately if any command fails.

This change will make it easier to identify and diagnose issues during the build process.


11-11: Great optimization: Parallel compilation for HTSLIB.

The addition of -j"${CPU_COUNT}" to the make command enables parallel compilation:

  • Utilizes all available CPU cores.
  • Can significantly speed up the build process, especially on multi-core systems.
  • The use of ${CPU_COUNT} ensures adaptability to different environments.

This change will improve build efficiency without compromising stability.


15-15: Excellent: Consistent parallel compilation for LIBDEFLATE and fastk.

The addition of -j"${CPU_COUNT}" to the make commands for LIBDEFLATE and fastk:

  • Applies the parallel compilation optimization consistently across all components.
  • Ensures that the entire build process benefits from improved efficiency.
  • Maintains a uniform approach to optimization throughout the script.

This consistency in optimization is commendable and will result in a more efficient overall build process.

Also applies to: 18-18


Line range hint 1-20: Overall excellent improvements to the build script.

The changes made to this build script are well-thought-out and consistent:

  1. Addition of set -xe improves debugging and error handling.
  2. Parallel compilation with -j"${CPU_COUNT}" is applied consistently to all components (HTSLIB, LIBDEFLATE, and fastk).

These modifications will significantly enhance the build process by:

  • Improving build speed, especially on multi-core systems.
  • Facilitating easier debugging and issue identification.
  • Ensuring consistent behavior across different build environments.

The changes align well with the PR objectives and demonstrate a good understanding of build optimization techniques.

recipes/fastk/meta.yaml (2)

16-16: LGTM: Build number increment is appropriate.

The build number increment from 0 to 1 is correct. This change is necessary when modifying the package without changing its version, which is the case here with the addition of the linux-aarch64 platform.


40-42: LGTM: Addition of linux-aarch64 platform is appropriate.

The addition of linux-aarch64 as an additional platform aligns with the PR objectives. This change correctly uses the 'extra' section to specify the new build platform.

To ensure compatibility, please verify that the package can be successfully built and run on the linux-aarch64 architecture. Run the following script to check for any architecture-specific code or dependencies:


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/merquryfk/build.sh (2)

8-8: Great optimization for build performance!

The modification to use make -j"${CPU_COUNT}" is an excellent improvement:

  • It enables parallel execution of the make process, utilizing multiple CPU cores.
  • This can significantly reduce build times, especially on multi-core systems.

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

Consider updating the line to:

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

This ensures that if ${CPU_COUNT} is not set, it defaults to using a single core, preventing potential issues.


Line range hint 11-20: Consider adding error checking for copy operations

While the current script looks good, we can further improve its robustness by adding error checking for the copy operations. This ensures that the script fails if any of the required binaries are not successfully copied.

Consider wrapping the copy operations in a function with error checking:

copy_binary() {
    if ! cp "$1" "$PREFIX/bin"; then
        echo "Failed to copy $1 to $PREFIX/bin" >&2
        exit 1
    fi
}

mkdir -p "$PREFIX/bin"

copy_binary HAPmaker
copy_binary ASMplot
copy_binary CNplot
copy_binary HAPplot
copy_binary MerquryFK
copy_binary KatComp
copy_binary KatGC
copy_binary PloidyPlot

This approach will cause the script to exit with an error if any of the copy operations fail, making it easier to diagnose issues during the build process.

recipes/merquryfk/meta.yaml (1)

53-56: LGTM: Extra section correctly specifies linux-aarch64 support.

The addition of the extra section with linux-aarch64 as an additional platform directly addresses the PR objective. This is consistent with the macOS skip directive in the build section.

Consider removing the blank line 53 for better YAML formatting:

 about:
   license: https://github.com/thegenemyers/MERQURY.FK/blob/main/LICENSE
   summary: MerquryFK replaces meryl with the FastK k-mer counter suite to considerably speed up analyses.
   home: https://github.com/thegenemyers/MERQURY.FK
-
 extra:
   additional-platforms:
     - linux-aarch64
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1c1935d and 3f4eb64.

📒 Files selected for processing (2)
  • recipes/merquryfk/build.sh (1 hunks)
  • recipes/merquryfk/meta.yaml (2 hunks)
🧰 Additional context used
🔇 Additional comments (3)
recipes/merquryfk/build.sh (1)

3-3: Excellent addition for improved error handling and debugging!

The addition of set -xe is a great practice for shell scripts:

  • -e flag ensures the script exits immediately if any command fails, preventing cascading errors.
  • -x flag enables command tracing, which is invaluable for debugging as it prints each command before execution.

These options significantly enhance the script's robustness and make troubleshooting easier.

recipes/merquryfk/meta.yaml (2)

16-17: LGTM: Build section changes are appropriate.

The build number increment and the addition of the macOS skip directive are correct. These changes align with the PR objectives of adding a linux-aarch64 build. The presence of the run_exports section is also good for maintaining compatibility with downstream recipes.


Line range hint 1-52: LGTM: Unchanged sections maintain package consistency.

The package version, requirements, and test commands remain unchanged. This consistency is appropriate for a PR that's adding a new build architecture without modifying the core package functionality.

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
@martin-g martin-g changed the title merquryfk: add linux-aarch64 build merquryfk & fastk: add linux-aarch64 build Oct 14, 2024
@martin-g
Copy link
Contributor Author

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built are ready for inspection:

Arch Package Zip File / Repodata CI Instructions
linux-64 fastk-1.0.0-h4ef89c6_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-64 merquryfk-1.1.0-h4ef89c6_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 fastk-1.0.0-h722ab72_1.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/b4e7e65a-10f9-4606-8836-79959b7bea30/artifacts/0/tmp/artifacts/packages <package name>
linux-aarch64 merquryfk-1.1.0-h722ab72_1.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/b4e7e65a-10f9-4606-8836-79959b7bea30/artifacts/0/tmp/artifacts/packages <package name>

Docker image(s) built:

Package Tag CI Install with docker
fastk 1.0.0--h4ef89c6_1 Azure
showImages for Azure are in the LinuxArtifacts zip file above.gzip -dc LinuxArtifacts/images/fastk:1.0.0--h4ef89c6_1.tar.gz | docker load
merquryfk 1.1.0--h4ef89c6_1 Azure
showImages for Azure are in the LinuxArtifacts zip file above.gzip -dc LinuxArtifacts/images/merquryfk:1.1.0--h4ef89c6_1.tar.gz | docker load

@martin-g
Copy link
Contributor Author

mgrigorov in 🌐 euler-arm-22 in /tmp/fastk via 🅒 test123 took 5s 
❯ tar xvf fastk-1.0.0-h722ab72_1.tar.bz2                                                                                                                                                                   (test123) 
info/run_exports.json
info/test/run_test.sh
info/files
info/hash_input.json
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/recipe/patch
info/about.json
info/git
bin/Fastrm
bin/Fastmv
bin/Fastcp
bin/Vennex
bin/Haplex
bin/Homex
bin/Fastmerge
bin/Symmex
bin/Logex
bin/Profex
bin/Histex
bin/Tabex
bin/FastK

mgrigorov in 🌐 euler-arm-22 in /tmp/fastk via 🅒 test123 
❯ file bin/*                                                                                                                                                                                               (test123) 
bin/Fastcp:    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/FastK:     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/Fastmerge: 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/Fastmv:    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/Fastrm:    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/Haplex:    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/Histex:    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/Homex:     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/Logex:     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/Profex:    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/Symmex:    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/Tabex:     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/Vennex:    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/fastk via 🅒 test123 
❯ ./bin/FastK                                                                                                                                                                                              (test123) 

Usage: FastK [-k<int(40)>] -t[<int(1)>]] [-p[:<table>[.ktab]]] [-c] [-bc<int(0)>]
               [-v] [-N<path_name>] [-P<dir(/tmp)>] [-M<int(12)>] [-T<int(4)>]
                 <source>[.cram|.[bs]am|.db|.dam|.f[ast][aq][.gz] ...

      -v: Verbose mode, output statistics as proceed.
      -T: Use -T threads.
      -N: Use given path for output directory and root name prefix.
      -P: Place block level sorts in directory -P.
      -M: Use -M GB of memory in downstream sorting steps of KMcount.

      -k: k-mer size.
      -t: Produce table of sorted k-mers & counts >= level specified
      -p: Produce sequence count profiles (w.r.t. table if given)
     -bc: Ignore prefix of each read of given length (e.g. bar code)
      -c: Homopolymer compress every sequence
mgrigorov in 🌐 euler-arm-22 in /tmp/merquryfk via 🅒 test123 
❯ tar xvf merquryfk-1.1.0-h722ab72_1.tar.bz2                                                                                                                                                               (test123) 
info/run_exports.json
info/files
info/hash_input.json
info/recipe/build.sh
info/test/run_test.sh
info/index.json
info/recipe/meta.yaml.template
info/paths.json
info/recipe/patch
info/recipe/meta.yaml
info/recipe/conda_build_config.yaml
info/about.json
info/git
bin/HAPmaker
bin/KatComp
bin/CNplot
bin/KatGC
bin/ASMplot
bin/HAPplot
bin/MerquryFK
bin/PloidyPlot

mgrigorov in 🌐 euler-arm-22 in /tmp/merquryfk via 🅒 test123 
❯ file bin/*                                                                                                                                                                                               (test123) 
bin/ASMplot:    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/CNplot:     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/HAPmaker:   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/HAPplot:    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/KatComp:    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/KatGC:      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/MerquryFK:  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/PloidyPlot: 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/merquryfk via 🅒 test123 
❯ ./bin/MerquryFK                                                                                                                                                                                          (test123) 

Usage: MerquryFK  [-w<double(6.0)>] [-h<double(4.5)>]
                  [-[xX]<number(x2.1)>] [-[yY]<number(y1.1)>]
                  [-vk] [-lfs] [-pdf] [-z] [-T<int(4)>] [-P<dir(/tmp)>]
                  <read>[.ktab] [ <mat>[.hap[.ktab]] <pat>[.hap[.ktab]] ]
                  <asm1:dna> [<asm2:dna>] <out>

      -w: width in inches of plots
      -h: height in inches of plots
      -x: max x as a real-valued multiple of x* with max
              count 'peak' away from the origin
      -X: max x as an int value in absolute terms
      -y: max y as a real-valued multiple of max count
              'peak' away from the origin
      -Y: max y as an int value in absolute terms

      -l: draw line plot
      -f: draw fill plot
      -s: draw stack plot
          any combo allowed, none => draw all

      -z: plot counts of k-mers unique to assembly

    -pdf: output .pdf (default is .png)

      -v: verbose output to stderr
      -k: keep plotting data as .cni, .asmi, and .hpi files
      -T: number of threads to use
      -P: Place all temporary files in directory -P.

LGTM!

@martin-g
Copy link
Contributor Author

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 14, 2024
@mencian mencian merged commit 7bf863a into bioconda:master Oct 14, 2024
7 checks passed
@martin-g martin-g deleted the aarch64-merquryfk branch October 15, 2024 07:14
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