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 fastplong #51498

Merged
merged 2 commits into from
Oct 20, 2024
Merged

Add fastplong #51498

merged 2 commits into from
Oct 20, 2024

Conversation

sfchen
Copy link
Contributor

@sfchen sfchen commented Oct 19, 2024

fastplong is a tool for ultra-fast preprocessing and quality control for long-read sequencing data

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

fastplong is a tool for ultra-fast preprocessing and quality control for long-read sequencing data
Copy link
Contributor

coderabbitai bot commented Oct 19, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request introduces two main components for the fastplong package. First, a new shell script named build.sh is added to the recipes/fastplong directory. This script is configured to exit on errors, print commands during execution, and handle unset variables and pipe errors. It creates a directory for binaries, builds the package using the make command with parallel jobs, and installs the built files.

Second, a new metadata file meta.yaml is created for the fastplong package, specifying its version as 0.2.0. This file includes essential details such as the source URL, SHA256 checksum, build and runtime dependencies, and a test command to verify installation. The meta.yaml also outlines additional supported platforms and provides general information about the package, including its homepage and licensing details.

Possibly related PRs

  • [Add recipe for consensify #50969] Update meta.yaml for spec2vec: This PR modifies a meta.yaml file, similar to the addition of a new meta.yaml in the main PR for fastplong, indicating a related context of package configuration.
  • [recipe for pgrc #50973] recipe for pgrc: This PR introduces a new meta.yaml file for the pgrc package, which is akin to the new meta.yaml added for fastplong, suggesting a parallel in package setup.
  • [Add dbghaplo #51035] Add dbghaplo: The introduction of a new meta.yaml file for dbghaplo aligns with the creation of a meta.yaml for fastplong, indicating a similar purpose in defining package metadata.
  • [Add FMSI #51277] Add FMSI: The addition of a new build.sh script and meta.yaml for FMSI parallels the changes made in the main PR, which also includes a new build.sh and meta.yaml, indicating a commonality in package setup processes.

Suggested labels

please review & merge, aarch64

Suggested reviewers

  • mencian

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

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

1-6: Overall LGTM with minor enhancement suggestions.

The build script is well-structured and follows good practices for a Conda build script. It covers the essential steps of setting up the environment, building, and installing the package.

To further enhance the script, consider:

  1. Adding error checking after critical steps (e.g., after make).
  2. Including more verbose logging for better traceability.
  3. Potentially adding a cleanup step if temporary files are created during the build process.

Would you like assistance in implementing these enhancements?

recipes/fastplong/meta.yaml (2)

16-26: Consider pinning dependency versions.

The build, host, and run requirements look appropriate for the package. However, consider pinning the versions of isa-l and libdeflate to ensure reproducibility and prevent potential compatibility issues in the future.

Example:

host:
  - isa-l >=2.30.0,<3
  - libdeflate >=1.7,<2
run:
  - isa-l >=2.30.0,<3
  - libdeflate >=1.7,<2

Please adjust the version numbers according to the specific requirements of fastplong.


28-30: Consider adding more comprehensive test commands.

The current test command fastplong --help is a good basic check. However, consider adding more comprehensive tests to ensure the functionality of the package. For example:

  1. Check if the version matches the expected version:
    - fastplong --version | grep {{ version }}
  2. Test a basic functionality of the tool (if possible with a small sample file):
    - fastplong -i sample.fastq -o output.fastq

These additional tests would provide more confidence in the package's correct installation and basic functionality.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 300aead and 0556d83.

📒 Files selected for processing (2)
  • recipes/fastplong/build.sh (1 hunks)
  • recipes/fastplong/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/fastplong/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (7)
recipes/fastplong/build.sh (2)

1-3: LGTM! Robust error handling and verbosity settings.

The script starts with appropriate shell options that enhance error handling and debugging:

  • -x: Prints commands as they are executed, aiding in debugging.
  • -e: Exits immediately if a command fails, preventing cascading errors.
  • -u: Treats unset variables as an error, catching potential oversights.
  • -o pipefail: Ensures pipeline failures are not masked.

The creation of the binary directory using $PREFIX aligns with Conda build conventions.


5-5: LGTM! Efficient parallel build with correct path settings.

The make command is well-constructed:

  • Uses ${CPU_COUNT} for parallel jobs, optimizing build performance.
  • Correctly sets INCLUDE_DIRS and LIBRARY_DIRS to use Conda environment paths.

Could you confirm that the default make target (i.e., not specifying a target) is intentional and builds all necessary components? If a specific target is required, consider updating the command accordingly.

recipes/fastplong/meta.yaml (5)

1-5: LGTM: Version and package name are correctly defined.

The version is set using a Jinja2 variable, which is a good practice for maintainability. The package name and version match the information provided in the PR objectives.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


7-9: LGTM: Source URL and checksum are correctly specified.

The source URL is correctly formatted using the version variable, and a SHA256 checksum is provided for integrity verification. This aligns with best practices for Conda recipes.


32-35: LGTM: Additional platforms are correctly specified.

The inclusion of linux-aarch64 and osx-arm64 as additional platforms is good for broader compatibility. This aligns with the information provided in the PR summary.


37-42: LGTM: About section is comprehensive and accurate.

The about section provides all necessary information:

  • The home URL points to the correct GitHub repository.
  • License information is complete, including the license family and file.
  • The summary clearly describes the package's purpose for long-read sequencing data preprocessing and quality control.

This information aligns with the PR objectives and provides good metadata for the package.


1-1: Note on yamllint warning: False positive

The yamllint tool reports a syntax error for the '%' character at the beginning of the file. This is a false positive as the '%' is part of a valid Jinja2 template syntax commonly used in Conda recipes. The syntax is correct for a meta.yaml file, and no changes are needed.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

mkdir -p $PREFIX/bin

make -j ${CPU_COUNT} INCLUDE_DIRS="$PREFIX/include" LIBRARY_DIRS="$PREFIX/lib"
make install
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Consider specifying installation prefix.

The make install command is used to install the built files, which is standard practice. However, to ensure that files are installed within the Conda environment, it's recommended to specify the installation prefix.

Consider updating the install command to:

-make install
+make install PREFIX=$PREFIX

This change ensures that all files are installed in the correct location within the Conda environment.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
make install
make install PREFIX=$PREFIX

Comment on lines 11 to 14
build:
number: 5
run_exports:
- {{ pin_subpackage("fastplong", max_pin="x.x") }}
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

Reset build number to 0 and LGTM on run_exports.

The build number is currently set to 5. Since there are no previous versions of fastplong in the repository, it should be reset to 0 for the initial release.

The run_exports section is correctly implemented, ensuring proper dependency management as per the PR objectives.

🔗 Analysis chain

Verify the build number and LGTM on run_exports.

The build number is set to 5, which seems high for a new package version (0.2.0). Could you please verify if this is intentional or if it should be reset to 0 for the initial release?

The run_exports section is correctly implemented, which will help prevent downstream recipe expectation violations as suggested in the PR objectives.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if there are previous versions of fastplong in the repository

# Test: Search for previous versions of fastplong. Expect: No previous versions if this is a new package.
fd -t f 'meta.yaml' recipes/fastplong | xargs grep 'version:'

Length of output: 84

@sfchen sfchen enabled auto-merge (squash) October 19, 2024 12:56
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/fastplong/meta.yaml (1)

28-30: LGTM: Basic test is present. Consider adding more comprehensive tests.

The current test command (fastplong --help) serves as a basic smoke test to ensure the package is installed and can be executed. However, consider adding more comprehensive tests to verify the functionality of key features of fastplong.

Would you like assistance in generating additional test commands?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 0556d83 and e285d15.

📒 Files selected for processing (1)
  • recipes/fastplong/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/fastplong/meta.yaml

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (6)
recipes/fastplong/meta.yaml (6)

1-5: LGTM: Package and version are correctly defined.

The package name and version are properly set. The use of Jinja2 templating for the version is a good practice for maintainability.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


7-9: LGTM: Source URL and checksum are properly defined.

The source URL is correctly formatted and uses the version variable. The SHA256 checksum is provided, which is crucial for package integrity verification.


11-14: LGTM: Build section is correctly configured.

The build number is correctly set to 0 for the initial release, addressing the previous review comment. The run_exports section is properly implemented, which will help prevent downstream recipe expectation violations as suggested in the PR objectives.


37-42: LGTM: About section is comprehensive and well-defined.

The about section contains all necessary metadata, including the home URL, license information, and a clear summary of the package's functionality. The specification of the license file is important for compliance.


16-26: LGTM: Requirements are well-defined. Consider verifying dependencies.

The build, host, and run requirements are appropriately defined. The build requirements are suitable for a C/C++ project. However, it might be worth double-checking if isa-l and libdeflate are the only runtime dependencies required by fastplong.


32-35: LGTM: Additional platforms specified. Verify actual support.

The inclusion of additional platforms (linux-aarch64 and osx-arm64) is good for broader compatibility. However, it's important to verify that fastplong actually supports these platforms.

✅ Verification successful

LGTM: Additional platforms appear appropriate, but verification recommended.

The inclusion of linux-aarch64 and osx-arm64 as additional platforms for fastplong seems appropriate based on the available information. The meta.yaml file explicitly lists these platforms, and the build process appears to be generic without architecture-specific instructions. This suggests that the software may be compatible with these architectures.

However, to ensure full compatibility and functionality, it would be advisable for the package maintainer or users to verify that fastplong works correctly on these platforms through testing.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for platform-specific code or build instructions

# Test: Search for any platform-specific code or build instructions
rg -i 'aarch64|arm64'

Length of output: 447893


Script:

#!/bin/bash
# Search for fastplong-specific files and architecture mentions
echo "Searching for fastplong-specific files:"
fd fastplong
echo -e "\nChecking fastplong files for architecture-specific code:"
rg -i 'aarch64|arm64' $(fd fastplong)
echo -e "\nChecking build.sh for architecture-specific instructions:"
cat recipes/fastplong/build.sh

Length of output: 713

@sfchen sfchen merged commit 0242e47 into bioconda:master Oct 20, 2024
7 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 29, 2024
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