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 vclust #50007

Merged
merged 43 commits into from
Oct 16, 2024
Merged

Add vclust #50007

merged 43 commits into from
Oct 16, 2024

Conversation

agudys
Copy link
Contributor

@agudys agudys commented Aug 13, 2024

Due to problems with compiling sources under macOS (the package uses C++ features currently not supported by clang, only g++) we decided to temporarily distribute vclust as a set of precompiled statically-linked libraries.


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

Copy link
Contributor

coderabbitai bot commented Oct 5, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request updates the configuration file meta.yaml for the vclust package, changing the package version to "1.2.7" and defining support for multiple system architectures: x64-linux, x64-mac, arm64-linux, and arm64-mac, each with an associated SHA256 checksum for package source integrity verification. The package section specifies the updated name and version of the package. The build section includes the build number and run exports for the vclust subpackage, along with a script that creates a binary directory and copies necessary files into the ${PREFIX}/bin directory. The source section provides the URL for downloading the package tarball, constructed using the new version and system variables, along with the corresponding SHA256 checksum. The requirements section lists runtime dependencies, including Python version 3.7 or higher. The about section contains metadata about the package, while the test section defines commands for testing, including running help commands and validating outputs against expected results. Finally, the extra section specifies additional platforms and lists linting rules to be skipped during the build process.

Possibly related PRs

  • Add lz-ani #49578: The changes in the meta.yaml file for the lz-ani package also involve updating the package version and defining multiple system architectures with SHA256 checksums, similar to the updates made in the vclust package's meta.yaml.
  • Update meta.yaml for spec2vec #49857: The meta.yaml update for spec2vec includes changes to the version number and build specifications, which parallels the versioning and build updates in the vclust package.
  • Add recipe for consensify #50969: The introduction of a new meta.yaml for consensify includes versioning and build specifications, akin to the changes made in the vclust package.
  • recipe for pgrc #50973: The meta.yaml for pgrc establishes a new package configuration with versioning and build details, similar to the updates in the vclust package.
  • Update recipe for ViroConstrictor #51038: The meta.yaml update for ViroConstrictor involves versioning and dependency specifications, reflecting the changes made in the vclust package.
  • bambamc: add aarch64/arm64 builds #51067: The bambamc package's meta.yaml includes version updates and build specifications, which are consistent with the changes in the vclust package.
  • Update PhyloAcc recipe #51090: The PhyloAcc recipe update involves changes to the version and build number, similar to the modifications in the vclust package.
  • Update meta.yaml, VITAP v.1.7 #51220: The meta.yaml update for vitap includes versioning and dependency modifications, paralleling the changes in the vclust package.
  • Update PhyloAcc recipe #51224: The PhyloAcc recipe update includes a new testing script and modifications to the meta.yaml, which aligns with the testing and configuration updates in the vclust package.
  • add r-archr #51295: The introduction of the r-archr package includes a comprehensive meta.yaml with versioning and dependencies, similar to the updates made in the vclust package.
  • Add recipe for longcallr_nn #51355: The new recipe for longcallr_nn includes a meta.yaml with versioning and dependencies, reflecting the structure and updates seen in the vclust package.

Suggested labels

aarch64, osx-arm64

Suggested reviewers

  • martin-g

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/vclust/meta.yaml (1)

17-25: LGTM with a minor suggestion: Build section is well-structured.

The build section is correctly set up with an appropriate build number and run_exports for dependency management. The build script copies necessary files to the correct location.

Consider removing the quotation marks around ${PREFIX}/bin in the mkdir command, as they are unnecessary and might cause issues on some systems:

-    mkdir "-p ${PREFIX}/bin"
+    mkdir -p ${PREFIX}/bin
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e7adcf6 and 08b4671.

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

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

(syntax)

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

1-11: LGTM: Version and system variables are well-defined.

The version and system variables are correctly set up for different architectures, which aligns with the PR objective of distributing precompiled binaries for various platforms. The use of conditional statements for system and SHA256 variables is appropriate for conda recipes.

🧰 Tools
🪛 yamllint

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

(syntax)


13-15: LGTM: Package section is correctly defined.

The package name and version are properly set, with the version using the previously defined variable for consistency.


27-29: LGTM: Source section is correctly configured.

The source URL and SHA256 checksum are properly set using the previously defined variables. This configuration ensures that the correct precompiled binary is downloaded for each supported architecture, which aligns with the PR objectives.


49-56: Query: Justification for skipped linting rules.

The additional platforms specified align well with the PR objectives. However, could you provide justification for skipping the following linting rules?

  1. should_be_noarch_generic
  2. should_not_be_noarch_source
  3. should_be_noarch_python

Understanding the reasons for these exceptions would be helpful for maintainers and future contributors.


31-47: LGTM with queries: Requirements, about, and test sections are well-structured.

The about section provides necessary metadata, and the test commands appear comprehensive. However, I have a couple of queries:

  1. The runtime requirements seem minimal. Are there any other dependencies required for vclust to function correctly?

  2. The test command excludes 'test_cluster_algorithm_leiden'. Could you provide a brief explanation for why this specific test is excluded?

To verify the completeness of the runtime requirements, let's check the vclust repository:

#!/bin/bash
# Description: Check for potential missing dependencies in the vclust repository.

# Test: Search for import statements in Python files
echo "Checking for Python imports:"
rg --type python 'import (?!pytest)' -g '!test*'

# Test: Search for potential C++ dependencies
echo "Checking for potential C++ dependencies:"
rg --type cpp '#include <' -g '!test*'

1-56: Overall: Well-structured recipe with minor points for clarification.

The meta.yaml file is well-structured and aligns with the PR objectives of distributing precompiled vclust binaries for multiple architectures. The use of variables and conditional statements is appropriate for managing different system configurations.

A few points for consideration:

  1. Verify if the runtime requirements are complete.
  2. Provide an explanation for the excluded test in the test section.
  3. Justify the skipped linting rules in the extra section.

Once these points are addressed, the recipe should be ready for integration into the Bioconda repository.

To ensure the recipe adheres to Bioconda guidelines, let's run a final check:

🧰 Tools
🪛 yamllint

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

(syntax)

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/vclust/meta.yaml (3)

1-11: LGTM! Consider adding comments for clarity.

The version and system variables are well-defined, and the inclusion of SHA256 checksums for different architectures aligns with the PR objective of distributing precompiled binaries. Good job on including arm64 architectures for broader compatibility.

Consider adding a brief comment explaining the purpose of the different system and SHA256 variables for improved readability. For example:

# Define system and SHA256 for different architectures
{% set system = "x64_linux" %}       # [linux and x86_64]
{% set system = "x64_mac" %}         # [osx and x86_64]
{% set system = "arm64_linux" %}     # [linux and aarch64]
{% set system = "arm64_mac" %}       # [osx and arm64]

# SHA256 checksums for precompiled binaries
{% set sha256 = "a71c7c2351bd0a81a44af5a9d3953d171cb0c568d2dbd2e25f28e85b583b8950" %}  # [linux and x86_64]
{% set sha256 = "916ed28c1da53c5679c6ea238b214b518ce6fe6e17d825208624009d707566d5" %}  # [osx and x86_64]
{% set sha256 = "ba64c97771a3fe34c3435eec6fec879e9a0ba3cf894d7f4233998baaa6efa6da" %}  # [linux and arm64]
{% set sha256 = "b6ae9b1b4ddda12862f13900f1739ec8c74f1539b7fd3e8186967920c5514f56" %}  # [osx and arm64]
🧰 Tools
🪛 yamllint

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

(syntax)


17-25: LGTM! Consider removing unnecessary commands.

The build section is well-structured:

  • The build number is correctly set to 0 for a new package.
  • The use of run_exports aligns with the PR objectives for preventing API, ABI, and CLI breakage.
  • The script copies the necessary files to the bin directory.

Consider removing the ls commands from the script as they don't contribute to the build process:

  script: |
    mkdir -p "${PREFIX}/bin"
    cp -r vclust.py test.py bin example "${PREFIX}/bin/"

31-34: Consider moving pytest to test requirements.

The runtime requirements are minimal, which is expected for precompiled binaries. However, pytest is typically a test dependency rather than a runtime dependency.

Consider moving pytest to a separate test requirements section:

requirements:
  run:
    - python

test:
  requires:
    - pytest

This change ensures that pytest is only installed when running tests, not for regular package usage.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 08b4671 and 2d51c8a.

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

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

(syntax)

🔇 Additional comments (4)
recipes/vclust/meta.yaml (4)

13-15: LGTM! Package section is well-defined.

The package name and version are correctly specified. Using the Jinja2 variable for the version ensures consistency throughout the file.


27-29: LGTM! Source section is well-defined.

The source section correctly uses the defined variables for the URL and SHA256 checksum. This approach aligns with the PR objective of distributing precompiled binaries for different architectures.


49-56: LGTM for additional platforms. Please justify skipped lints.

The inclusion of additional platforms (linux-aarch64 and osx-arm64) aligns well with the PR objective of supporting multiple architectures.

Could you provide justifications for skipping the following linting rules?

  • should_be_noarch_generic
  • should_not_be_noarch_source
  • should_be_noarch_python

These justifications will help future maintainers understand the reasoning behind these exceptions. Consider adding comments like this:

extra:
  additional-platforms:
    - linux-aarch64
    - osx-arm64
  skip-lints:
    # Justification: [Your explanation here]
    - should_be_noarch_generic
    # Justification: [Your explanation here]
    - should_not_be_noarch_source
    # Justification: [Your explanation here]
    - should_be_noarch_python

To verify if these linting rules are still relevant, you can run:

#!/bin/bash
# Check if these linting rules are still present in the bioconda-utils
rg -i 'should_be_noarch_generic|should_not_be_noarch_source|should_be_noarch_python' $(conda build . --output 2>&1 | grep "bioconda-utils" | awk '{print $NF}')

36-47: LGTM! Consider adding a comment about the excluded test.

The about section provides comprehensive metadata for the package. The test commands are appropriate for verifying the installation and running tests.

Could you provide a brief explanation for excluding the 'test_cluster_algorithm_leiden' test? This information would be helpful for future maintainers. Consider adding a comment like this:

test:
  commands:
    - pwd
    - ls
    - python vclust.py --help
    # Exclude leiden algorithm test due to [reason]
    - pytest test.py -k 'not test_cluster_algorithm_leiden'

To verify the existence of this test, you can run:

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/vclust/meta.yaml (1)

18-26: Build section looks good, but consider more specific file copying.

The build number and run_exports are correctly set. However, the file copying in the script could be more specific:

Consider replacing the wildcard copy with explicit file copying:

-    cp -r vclust.py test.py bin example "${PREFIX}/bin/"
+    cp vclust.py test.py "${PREFIX}/bin/"
+    cp -r bin/* "${PREFIX}/bin/"
+    mkdir -p "${PREFIX}/bin/example"
+    cp -r example/* "${PREFIX}/bin/example/"

This approach provides better control over which files are included in the package.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2d51c8a and 51358ac.

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

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

(syntax)

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

14-16: LGTM: Package name and version are correctly defined.

The package section is well-structured, using the appropriate name "vclust" and correctly referencing the version using Jinja2 templating.


28-30: LGTM: Source URL and SHA256 are correctly defined.

The source section is well-structured, using the appropriate GitHub releases URL and correctly referencing the SHA256 checksum using Jinja2 templating.


1-1: Note: Ignore yamllint syntax error for '%' character.

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 the Jinja2 templating syntax, which is commonly used and valid in conda recipe files.

No action is needed to address this linting error.

🧰 Tools
🪛 yamllint

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

(syntax)


50-57: Please justify the skipped lint checks.

The additional platforms are correctly specified, aligning with the PR objectives. However, the skipped lint checks need explanation:

Could you please provide justification for skipping these lint checks, especially 'should_be_noarch_python'? If these are necessary due to the nature of the package (precompiled binaries), consider adding comments in the YAML file to explain each skipped check.

#!/bin/bash
# Description: Check for any mentions or justifications of the skipped lint checks

# Test: Search for mentions of the skipped lint checks in the repository
rg --type yaml "should_be_noarch_generic|should_not_be_noarch_source|should_be_noarch_python"

This will help us understand if these lint checks are commonly skipped in similar packages or if there's a specific reason for vclust.


32-48: LGTM: Requirements, about, and test sections are well-defined.

The runtime requirements, about section, and test commands are appropriately set. However, there's one point that needs clarification:

Could you please explain why the 'test_cluster_algorithm_leiden' test is excluded in the pytest command? If it's due to a known issue or limitation, consider adding a comment in the YAML file to document this.

This will help us understand if there are any known issues with this specific test.


1-11: LGTM: Version and system settings are well-defined.

The version and system settings are appropriately defined for multiple architectures, aligning with the PR objective to distribute precompiled binaries. This approach addresses the compilation issues on macOS mentioned in the PR summary.

To ensure the integrity of the package sources, let's verify the SHA256 checksums:

Please compare the output with the checksums in the YAML file to ensure they match.

🧰 Tools
🪛 yamllint

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

(syntax)

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/vclust/meta.yaml (1)

32-36: Add pytest to host requirements

As suggested in a previous review, consider adding pytest to the host requirements to ensure it's available during package building and testing:

 requirements:
   host:
     - python >=3.7
+    - pytest
   run:
     - python >=3.7

This change will align with the test section that uses pytest.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 040c953 and 56d6ed0.

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

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

(syntax)

🔇 Additional comments (4)
recipes/vclust/meta.yaml (4)

44-60: Review commented-out pytest commands

There are two commented-out pytest commands in the test section:

#- pytest test.py                                        # [linux]
#- pytest test.py -k 'not test_cluster_algorithm_leiden' # [osx]

Please review these commands and consider:

  1. If they should be uncommented and included in the test suite.
  2. If they're no longer needed and should be removed.
  3. If they require modification based on the new version or package structure.

Ensure that the test suite covers all necessary functionality while being compatible with both Linux and macOS environments.


1-1: Ignore yamllint false positive

The yamllint tool reports a syntax error for the Jinja2 template syntax:

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

This is a false positive. The {% ... %} syntax is valid and necessary for Conda meta.yaml files as it's used for Jinja2 templating. No action is required to address this lint error.

🧰 Tools
🪛 yamllint

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

(syntax)


1-67: Summary of review

Overall, the meta.yaml file for vclust is well-structured and contains the necessary information for building and testing the package. However, there are a few key points to address:

  1. Update the package version to 1.2.3 as per the PR objectives.
  2. Verify and update the SHA256 checksums for the new version if necessary.
  3. Consider adding pytest to the host requirements.
  4. Review the commented-out pytest commands in the test section.

Once these points are addressed, the recipe should be ready for the new version of vclust. Remember to test the build process and package functionality after making these changes.

🧰 Tools
🪛 yamllint

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

(syntax)


1-11: ⚠️ Potential issue

Update package version and verify checksums

The version in the recipe (1.1.1) doesn't match the version mentioned in the PR objectives (1.2.3). Please update the version:

-{% set version = "1.1.1" %}
+{% set version = "1.2.3" %}

Additionally, ensure that the SHA256 checksums for each system are correct for the new version 1.2.3. You may need to update these if new binaries have been released for the new version.

To verify the checksums after updating the version, you can use the following script:

🧰 Tools
🪛 yamllint

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

(syntax)

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

🧹 Outside diff range and nitpick comments (3)
recipes/vclust/run_test.sh (3)

3-4: Prefilter command looks good, but ensure tmp directory exists.

The prefilter command and its output validation look correct. However, it's important to ensure that the tmp directory exists before running the command.

Consider adding a line to create the tmp directory at the beginning of the script:

mkdir -p tmp

This will prevent potential errors if the directory doesn't exist.


7-8: Cluster command looks good, consider validating all outputs.

The cluster command and its primary output validation are correctly structured. However, the command generates multiple output files, but only tmp/clusters.tsv is being validated.

Consider adding validation for the tmp/ani.ids.tsv file as well:

cmp tmp/ani.ids.tsv example/output/ani.ids.tsv

This ensures that all outputs from the cluster command are verified for correctness.


1-8: Effective test script, consider adding error handling.

This test script provides good coverage of the main functionalities of vclust.py (prefilter, align, and cluster). The use of example input files and comparison with reference outputs ensures the correctness of the package, which aligns well with the PR objectives.

To improve the robustness of the script, consider adding error handling and reporting. Here's a suggestion:

#!/bin/bash

set -e  # Exit immediately if a command exits with a non-zero status.

mkdir -p tmp

run_command() {
    if ! "$@"; then
        echo "Error: Command failed: $*" >&2
        exit 1
    fi
}

run_command vclust.py prefilter -i example/multifasta.fna -o tmp/filter.txt --batch-size 4 --k 18
run_command cmp tmp/filter.txt example/output/fltr.txt

run_command vclust.py align -i example/multifasta.fna -o tmp/ani.tsv
run_command cmp tmp/ani.tsv example/output/ani.tsv

run_command vclust.py cluster -i tmp/ani.tsv -o tmp/clusters.tsv --ids tmp/ani.ids.tsv --tani 0.95
run_command cmp tmp/clusters.tsv example/output/clusters.tsv
run_command cmp tmp/ani.ids.tsv example/output/ani.ids.tsv

echo "All tests passed successfully!"

This modification adds error handling, ensures the tmp directory exists, and provides clear error messages if any command fails.

🧰 Tools
🪛 Shellcheck

[error] 1-1: Remove spaces between # and ! in the shebang.

(SC1115)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 56d6ed0 and 46232cf.

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

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

(syntax)

🪛 Shellcheck
recipes/vclust/run_test.sh

[error] 1-1: Remove spaces between # and ! in the shebang.

(SC1115)

🔇 Additional comments (8)
recipes/vclust/run_test.sh (1)

5-6: Align command and validation look good.

The align command and its output validation are correctly structured and consistent with the previous command. This ensures proper testing of the align functionality.

recipes/vclust/meta.yaml (7)

3-11: LGTM: System and SHA256 definitions.

The system and SHA256 definitions for different architectures (x64_linux, x64_mac, arm64_linux, arm64_mac) are correctly defined and cover multiple platforms.


14-16: LGTM: Package section.

The package section correctly defines the name as vclust and uses Jinja2 templating for the version.


18-26: LGTM: Build section.

The build section is well-defined with:

  • Correct build number
  • Proper run_exports definition
  • A script that correctly sets up the package files and permissions

28-30: LGTM: Source section.

The source section correctly defines the URL and SHA256 checksum using Jinja2 templating.


38-42: LGTM: About section.

The about section correctly provides necessary metadata including home, summary, license, and license_family.


55-61: Verify the need for skipping lint checks.

The extra section correctly specifies additional platforms. However, please verify the necessity of skipping the following lint checks:

  • should_be_noarch_generic
  • should_not_be_noarch_source

If these lint checks are indeed not applicable to this package, please add a comment explaining why they are skipped. If they are no longer needed, consider removing them.


32-36: ⚠️ Potential issue

Consider adding pytest to the host requirements.

While the current requirements are correct for a Python package, pytest is used in the test section but not listed in the requirements. This might cause issues during package testing.

Add pytest to the host requirements to ensure it's available during package building and testing:

requirements:
  host:
    - python >=3.7
    - pytest
  run:
    - python >=3.7

@@ -0,0 +1,8 @@
# !/bin/bash
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

Fix the shebang line format.

The current shebang line has a space between # and !, which is incorrect. This can lead to issues when executing the script.

Please apply the following change:

-# !/bin/bash
+#!/bin/bash

This correction ensures proper script execution across different environments.

📝 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
# !/bin/bash
#!/bin/bash
🧰 Tools
🪛 Shellcheck

[error] 1-1: Remove spaces between # and ! in the shebang.

(SC1115)

Comment on lines 44 to 59
test:
source_files:
- example/*.*
- example/output/*.*
requires:
# - pytest
commands:
- vclust.py --help
#- pytest test.py # [linux]
#- pytest test.py -k 'not test_cluster_algorithm_leiden' # [osx]
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

Review and update the test section.

The test section has some issues that need attention:

  1. The pytest requirement is commented out (line 49).
  2. Some test commands are commented out (lines 52-53).

Please review and update the test section:

  1. If pytest is needed, uncomment and add it to the host requirements as suggested earlier.
  2. Decide whether to keep or remove the commented-out test commands. If they are needed, uncomment them; otherwise, consider removing them for clarity.

@@ -0,0 +1,61 @@
{% set version = "1.1.1" %}
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

Update the version to match PR objectives.

The version is currently set to 1.1.1, but the PR objectives mention version 1.2.3. Please update the version to 1.2.3 to align with the PR description.

Apply this change:

-{% set version = "1.1.1" %}
+{% set version = "1.2.3" %}
📝 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
{% set version = "1.1.1" %}
{% set version = "1.2.3" %}
🧰 Tools
🪛 yamllint

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

(syntax)

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/vclust/meta.yaml (1)

61-67: LGTM: Extra section is correctly configured.

The extra section is well-defined:

  • Additional platforms (linux-aarch64 and osx-arm64) are correctly specified, aligning with the goal of supporting multiple architectures.
  • Linting rules are appropriately skipped, which may be necessary due to the nature of the package (precompiled binaries for multiple architectures).

Consider adding a comment explaining why these specific linting rules are skipped. This will help future maintainers understand the reasoning behind these exceptions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2b5e210 and 531305a.

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

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

(syntax)

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

1-11: LGTM: Version and system architecture definitions are correct.

The version has been updated to 1.2.6, which aligns with the PR objectives. The inclusion of multiple system architectures (x64_linux, x64_mac, arm64_linux, arm64_mac) with their corresponding SHA256 checksums supports the goal of distributing precompiled libraries. The use of Jinja2 templating for conditional selection is correct.

🧰 Tools
🪛 yamllint

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

(syntax)


14-16: LGTM: Package section is correctly defined.

The package name is set to "vclust" and the version is correctly referenced using the Jinja2 variable.


18-26: LGTM: Build section is correctly configured.

The build section is well-defined with the following correct configurations:

  • Build number is set to 0.
  • Run exports are properly defined for the vclust subpackage.
  • The script creates the necessary directory structure, copies files, and sets the correct permissions for the Python scripts.

28-30: LGTM: Source section is correctly defined.

The source section is well-configured:

  • The URL for the source tarball is correctly constructed using Jinja2 variables for version and system.
  • The SHA256 checksum is properly referenced using a Jinja2 variable, ensuring package integrity.

32-36: ⚠️ Potential issue

Consider adding pytest to the requirements.

The requirements section correctly specifies Python >=3.7 for both host and run environments. However, pytest is used in the test section but not listed in the requirements. This issue was previously flagged and remains unaddressed.

To ensure pytest is available during package building and testing, consider adding it to the host requirements:

requirements:
  host:
    - python >=3.7
    - pytest
  run:
    - python >=3.7

38-59: ⚠️ Potential issue

Review and update the test section.

The about section is correctly defined with appropriate metadata. However, the test section still has some issues that need attention:

  1. The pytest requirement is commented out (line 49).
  2. Some test commands are commented out (lines 58-59).

Please review and update the test section:

  1. If pytest is needed, uncomment and add it to the host requirements as suggested earlier.
  2. Decide whether to keep or remove the commented-out test commands. If they are needed, uncomment them; otherwise, consider removing them for clarity.

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 (2)
recipes/vclust/meta.yaml (2)

18-26: LGTM: Build section is well-defined with a minor suggestion.

The build section is correctly implemented:

  • Build number is set to 0, which is appropriate for a new version.
  • The use of run_exports with pin_subpackage is good practice for maintaining ABI compatibility.
  • The script correctly sets up the package structure and sets executable permissions.

Consider using the $RECIPE_DIR variable to reference files in the recipe directory:

script: |
  mkdir -p ${PREFIX}/bin
  cp -r $RECIPE_DIR/vclust.py $RECIPE_DIR/test.py $RECIPE_DIR/bin $RECIPE_DIR/example ${PREFIX}/bin/
  chmod +x ${PREFIX}/bin/vclust.py
  chmod +x ${PREFIX}/bin/test.py

This ensures that the correct files are copied even if the build environment changes.


61-67: LGTM: Extra section is well-defined with a suggestion.

The extra section correctly specifies additional platforms (linux-aarch64 and osx-arm64), which aligns with the goal of supporting multiple architectures.

Consider adding comments to explain why the linting rules are being skipped. This will help future maintainers understand the reasoning behind these exceptions. For example:

extra:
  additional-platforms:
    - linux-aarch64
    - osx-arm64
  skip-lints:
    - should_be_noarch_generic  # Skipped because the package contains precompiled binaries for specific architectures
    - should_not_be_noarch_source  # Skipped because the package is not architecture-independent
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 531305a and 2e05d37.

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

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

(syntax)

🔇 Additional comments (4)
recipes/vclust/meta.yaml (4)

1-11: LGTM: Version and system architecture definitions are correct.

The version has been updated to 1.2.6, which aligns with the PR objectives. The definitions for different system architectures (x64_linux, x64_mac, arm64_linux, arm64_mac) and their corresponding SHA256 checksums are correctly implemented using Jinja2 conditional syntax. This setup supports the goal of distributing precompiled libraries for various platforms.

🧰 Tools
🪛 yamllint

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

(syntax)


14-16: LGTM: Package section is correctly defined.

The package name is set to "vclust" and the version is correctly referenced using the Jinja2 variable {{ version }}. This ensures consistency with the version defined at the beginning of the file.


28-30: LGTM: Source section is correctly defined.

The source section is well-implemented:

  • The URL is correctly constructed using Jinja2 variables for version and system.
  • The SHA256 checksum is properly referenced using the Jinja2 variable.

This setup ensures that the correct package is downloaded for each supported system and its integrity is verified.


1-67: Note on yamllint error: False positive for Jinja2 syntax.

The yamllint tool reported a syntax error for the Jinja2 templating syntax at the beginning of the file. This is a known false positive as yamllint doesn't recognize Jinja2 syntax in YAML files by default.

To suppress this warning in future linting, you can add a .yamllint configuration file in the repository with the following content:

extends: default

rules:
  document-start: disable
  line-length: disable

This configuration will disable the document-start rule (which often conflicts with Jinja2 syntax) and the line-length rule (which is often too restrictive for complex Conda recipes).

🧰 Tools
🪛 yamllint

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

(syntax)

Comment on lines 38 to 59
about:
home: https://github.com/refresh-bio/vclust
summary: "Fast and accurate tool for calculating ANI and clustering virus genomes and metagenomes."
license: GPL-3
license_family: GPL

test:
source_files:
- example/*.*
- example/output/*.*
requires:
# - pytest
commands:
- vclust.py --help
- vclust.py prefilter -i example/multifasta.fna -o tmp/filter.txt --batch-size 4 --k 18
- cmp tmp/filter.txt example/output/fltr.txt
- vclust.py align -i example/multifasta.fna -o tmp/ani.tsv
- cmp tmp/ani.tsv example/output/ani.tsv
- vclust.py cluster -i tmp/ani.tsv -o tmp/clusters.tsv --ids tmp/ani.ids.tsv --tani 0.95
- cmp tmp/clusters.tsv example/output/clusters.tsv
#- pytest test.py # [linux]
#- pytest test.py -k 'not test_cluster_algorithm_leiden' # [osx]
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

Review and update the test section.

The about section is well-defined with appropriate metadata. However, the test section needs attention:

  1. The pytest requirement is commented out (line 49).
  2. Some test commands are commented out (lines 58-59).

Please review and update the test section:

  1. If pytest is needed, uncomment and add it to the host requirements as suggested earlier.
  2. Decide whether to keep or remove the commented-out test commands. If they are needed, uncomment them; otherwise, consider removing them for clarity.

Additionally, ensure that the example files referenced in the test commands (e.g., example/multifasta.fna, example/output/fltr.txt) are included in the package or available during testing.

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/vclust/meta.yaml (1)

14-26: LGTM: Package and build sections are well-defined.

The package name and version are correctly specified, and the build section includes necessary steps for file copying and permission setting. The run exports ensure proper version pinning, which is good for dependency management.

Consider using install instead of cp and chmod for better portability:

script: |
  mkdir -p ${PREFIX}/bin
  install -m 755 vclust.py test.py ${PREFIX}/bin/
  cp -r bin example ${PREFIX}/bin/

This change combines the copy and permission setting operations for the Python scripts.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 2e05d37 and 44d9de4.

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

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

(syntax)

🔇 Additional comments (5)
recipes/vclust/meta.yaml (5)

1-11: LGTM: Version and system architecture definitions are correct.

The version (1.2.6) matches the PR objectives, and the system architecture definitions cover major platforms (x64 and arm64 for both Linux and macOS). The inclusion of SHA256 checksums for each architecture is a good security practice.

🧰 Tools
🪛 yamllint

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

(syntax)


28-30: LGTM: Source section is correctly defined.

The source URL is well-constructed using the appropriate version and system variables. The inclusion of the SHA256 checksum enhances security by ensuring the integrity of the downloaded package.


38-42: LGTM: About section is well-defined.

The about section contains all necessary metadata, including the home page, a concise summary, and accurate licensing information. This provides good context for users of the package.


63-69: Clarify the reasons for skipping linting rules.

The additional platforms specified (linux-aarch64 and osx-arm64) align well with the system architectures defined earlier in the file. However, the skipped linting rules require clarification:

  1. should_be_noarch_generic
  2. should_not_be_noarch_source

Could you please explain why these linting rules are being skipped? It's important to ensure that skipping these rules is necessary and doesn't compromise the package's integrity or portability.


1-69: Overall, the recipe is well-structured with minor improvements suggested.

The meta.yaml file for vclust 1.2.6 is generally well-constructed and aligns with the PR objectives. It addresses the compilation issues on macOS by distributing precompiled statically-linked libraries for multiple architectures.

Key points:

  1. Version and system architectures are correctly defined.
  2. Build and source sections are properly configured.
  3. Requirements section could benefit from adding pytest.
  4. Test section needs review and possible updates.
  5. Clarification is needed on skipped linting rules.

Please address the suggestions in the previous comments to further improve the recipe. Once these minor issues are resolved, the recipe should be ready for use.

🧰 Tools
🪛 yamllint

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

(syntax)

Comment on lines 44 to 61
test:
source_files:
- example/*.*
- example/output/*.*
requires:
# - pytest
commands:
- pwd
- ls
- vclust.py --help
- vclust.py prefilter -i example/multifasta.fna -o tmp/filter.txt --batch-size 4 --k 18
- cmp tmp/filter.txt example/output/fltr.txt
- vclust.py align -i example/multifasta.fna -o tmp/ani.tsv
- cmp tmp/ani.tsv example/output/ani.tsv
- vclust.py cluster -i tmp/ani.tsv -o tmp/clusters.tsv --ids tmp/ani.ids.tsv --tani 0.95
- cmp tmp/clusters.tsv example/output/clusters.tsv
#- pytest test.py # [linux]
#- pytest test.py -k 'not test_cluster_algorithm_leiden' # [osx]
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Review and update the test section.

The test section includes comprehensive commands, but there are a few points that need attention:

  1. Pytest is commented out in the requires section (line 49).
  2. Some test commands are commented out (lines 60-61).

Please review and update the test section:

  1. If pytest is needed, uncomment it and add it to the host requirements as suggested earlier.
  2. Decide whether to keep or remove the commented-out test commands. If they are needed, uncomment them; otherwise, consider removing them for clarity.

Additionally, ensure that the example files referenced in the test commands (e.g., example/multifasta.fna, example/output/fltr.txt) are included in the package or available during testing.

recipes/vclust/meta.yaml Outdated Show resolved Hide resolved
recipes/vclust/meta.yaml Outdated Show resolved Hide resolved
Co-authored-by: Martin Grigorov <martin-g@users.noreply.github.com>
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/vclust/meta.yaml (3)

18-26: LGTM: Build section is well-structured.

The build section is correctly defined with:

  • Appropriate build number (0) for a new version.
  • Run exports to ensure proper version pinning.
  • A script that sets up the package files and permissions correctly.

Consider using the $PYTHON variable instead of hardcoding the interpreter path:

-    chmod +x ${PREFIX}/bin/vclust.py
-    chmod +x ${PREFIX}/bin/test.py
+    $PYTHON -c "import os, stat; [os.chmod(f'{os.environ['PREFIX']}/bin/' + f, os.stat(f'{os.environ['PREFIX']}/bin/' + f).st_mode | stat.S_IEXEC) for f in ['vclust.py', 'test.py']]"

This change ensures compatibility across different Python versions and environments.


32-36: LGTM: Requirements section is correct, but consider adding pytest.

The requirements section correctly specifies Python >=3.7 for both host and run environments. However, as pytest is used in the test section (although currently commented out), it's recommended to add it to the host requirements.

Consider updating the requirements section as follows:

requirements:
  host:
    - python >=3.7
    - pytest
  run:
    - python >=3.7

This change will ensure pytest is available during package building and testing.


38-61: LGTM: About section is well-defined. Test section needs review.

The about section is correctly defined with appropriate metadata.

For the test section:

  1. The pytest requirement is commented out (line 49).
  2. Some test commands are commented out (lines 60-61).

Please review and update the test section:

  1. If pytest is needed, uncomment it and add it to the host requirements as suggested earlier.
  2. Decide whether to keep or remove the commented-out test commands. If they are needed, uncomment them; otherwise, consider removing them for clarity.

Additionally, ensure that the example files referenced in the test commands (e.g., example/multifasta.fna, example/output/fltr.txt) are included in the package or available during testing.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 44d9de4 and c0ecde6.

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

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

(syntax)

🔇 Additional comments (4)
recipes/vclust/meta.yaml (4)

1-11: Verify the package version.

The version is set to 1.2.6, which matches the AI summary but differs from the version 1.2.3 mentioned in the PR objectives. Please confirm if 1.2.6 is the correct version for this update.

The system-specific variables and SHA256 checksums for different architectures are correctly defined, aligning with the PR objective of distributing precompiled libraries.

🧰 Tools
🪛 yamllint

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

(syntax)


14-16: LGTM: Package section is well-defined.

The package section correctly defines the name as "vclust" and uses the version variable, ensuring consistency throughout the file.


28-30: LGTM: Source section is correctly defined.

The source section is well-structured:

  • The URL is correctly constructed using version and system variables.
  • The SHA256 checksum is set using the appropriate variable, ensuring integrity for each architecture.

63-69: LGTM: Extra section is well-defined. Clarification needed on skipped lints.

The extra section correctly specifies additional platforms, aligning with the PR objective of supporting multiple architectures.

Please clarify the reasons for skipping the following linting rules:

  1. should_be_noarch_generic
  2. should_not_be_noarch_source

While these skips are likely necessary due to the package containing precompiled binaries for specific architectures, it would be helpful to document the rationale in a comment within the meta.yaml file.

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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between c0ecde6 and 1f16f5d.

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

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

(syntax)

🔇 Additional comments (5)
recipes/vclust/meta.yaml (5)

1-11: LGTM: Version update and system-specific configurations look good.

The version has been correctly updated to 1.2.7, and the system-specific configurations for different architectures are well-defined. This approach ensures that the correct package is downloaded for each supported system.

🧰 Tools
🪛 yamllint

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

(syntax)


14-26: LGTM: Package definition and build configuration are well-structured.

The package name and version are correctly defined. The build section includes appropriate run exports for pinning the subpackage, and the installation script correctly copies the necessary files to the bin directory.


27-29: LGTM: Source configuration is correct and secure.

The source URL is well-constructed using version and system variables, which improves maintainability. The use of SHA256 checksums for each system ensures the integrity and security of the downloaded package.


61-67: LGTM: Extra section configuration is appropriate.

The extra section correctly specifies additional platforms (linux-aarch64 and osx-arm64), which aligns with the PR objectives of supporting multiple architectures. The skipped linting rules (should_be_noarch_generic and should_not_be_noarch_source) are appropriate given that the package contains precompiled binaries for specific architectures.


1-67: Overall, the changes look good and align with the PR objectives.

The recipe has been updated to version 1.2.7 and now supports multiple architectures with precompiled binaries. The changes address the compilation issues on macOS and provide a temporary solution by distributing statically-linked libraries.

A few minor suggestions have been made to improve the recipe:

  1. Adding pytest to the host requirements.
  2. Updating the license_family to GPL3.
  3. Reviewing and updating the test section to ensure comprehensive testing of the precompiled libraries.

Regarding the yamllint error:
The syntax error reported by yamllint (found character '%' that cannot start any token) is a false positive. The '%' characters are part of the Jinja2 templating syntax, which is commonly used in Conda recipes. This syntax is correct and necessary for the recipe to function properly.

🧰 Tools
🪛 yamllint

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

(syntax)

Comment on lines +31 to +35
requirements:
host:
- python >=3.7
run:
- python >=3.7
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider adding pytest to host requirements.

The Python requirement is correctly specified for both host and run environments. However, as pytest is used in the test section (although currently commented out), it should be added to the host requirements to ensure it's available during package building and testing.

Add pytest to the host requirements:

requirements:
  host:
    - python >=3.7
    - pytest
  run:
    - python >=3.7

This change will help prevent potential issues during package testing.

Comment on lines 43 to 60
test:
#source_files:
# - example/*.*
# - example/output/*.*
#requires:
# - pytest
commands:
- vclust.py --help
- vclust.py info
#- vclust.py prefilter -i example/multifasta.fna -o tmp/filter.txt --batch-size 4 --k 18
#- cmp tmp/filter.txt example/output/fltr.txt
#- vclust.py align -i example/multifasta.fna -o tmp/ani.tsv
#- cmp tmp/ani.tsv example/output/ani.tsv
#- vclust.py cluster -i tmp/ani.tsv -o tmp/clusters.tsv --ids tmp/ani.ids.tsv --tani 0.95
#- cmp tmp/clusters.tsv example/output/clusters.tsv
#- pytest test.py # [linux]
#- pytest test.py -k 'not test_cluster_algorithm_leiden' # [osx]

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Review and update the test section.

The test section includes a mix of active and commented-out commands. While the active commands check basic functionality, which aligns with the PR objective of distributing precompiled libraries temporarily, consider the following:

  1. Uncomment and enable additional test commands if they are applicable to the precompiled libraries.
  2. If some tests are not applicable to the current distribution method, consider removing them to improve clarity.
  3. Ensure that any uncommented tests will work with the precompiled binaries.

Example of potential updates:

test:
  commands:
    - vclust.py --help
    - vclust.py info
    - vclust.py prefilter -i example/multifasta.fna -o tmp/filter.txt --batch-size 4 --k 18
    - cmp tmp/filter.txt example/output/fltr.txt
    # Add more relevant tests here

Please review and update the test section accordingly to ensure comprehensive testing of the precompiled libraries.

Comment on lines 37 to 41
about:
home: https://github.com/refresh-bio/vclust
summary: "Fast and accurate tool for calculating ANI and clustering virus genomes and metagenomes."
license: GPL-3.0-or-later
license_family: GPL
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update license_family to GPL3.

The about section is well-defined with appropriate metadata. However, as per a previous review comment, the license_family should be updated to GPL3 for consistency with the specified license.

Please apply this change:

-  license_family: GPL
+  license_family: GPL3

This update ensures consistency between the license and license_family fields.

📝 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
about:
home: https://github.com/refresh-bio/vclust
summary: "Fast and accurate tool for calculating ANI and clustering virus genomes and metagenomes."
license: GPL-3.0-or-later
license_family: GPL
about:
home: https://github.com/refresh-bio/vclust
summary: "Fast and accurate tool for calculating ANI and clustering virus genomes and metagenomes."
license: GPL-3.0-or-later
license_family: GPL3

@agudys
Copy link
Contributor Author

agudys commented Oct 16, 2024

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 16, 2024
# - example/*.*
# - example/output/*.*
#requires:
# - pytest
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the commented out lines

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/vclust/meta.yaml (1)

31-35: Consider adding pytest to host requirements.

The Python requirement is correctly specified for both host and run environments. However, based on a previous review comment, it was suggested to add pytest to the host requirements. If pytest is needed for testing, please add it:

requirements:
  host:
    - python >=3.7
    - pytest
  run:
    - python >=3.7

This will ensure pytest is available during package building and testing.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 1f16f5d and e930050.

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

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

(syntax)

🔇 Additional comments (7)
recipes/vclust/meta.yaml (7)

1-11: LGTM: Version and system-specific variables are well-defined.

The version (1.2.7) and system-specific variables for different architectures are correctly set up. This aligns with the PR objective of distributing precompiled binaries for various systems.

🧰 Tools
🪛 yamllint

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

(syntax)


14-16: LGTM: Package section is correctly defined.

The package name and version are properly set, with the version using the Jinja2 variable for consistency.


18-25: LGTM: Build section is well-structured.

The build section is correctly set up with:

  • Appropriate build number (0) for a new recipe.
  • Proper use of run_exports for ABI compatibility.
  • A script that correctly copies files and sets permissions.

27-29: LGTM: Source section is correctly configured.

The source section is well-defined:

  • The URL structure is correct and uses appropriate Jinja2 variables for version and system.
  • The SHA256 checksum is correctly referenced using the Jinja2 variable.

37-46: LGTM: About and test sections are well-defined.

The about section contains appropriate metadata, including the correct license information. The test section includes basic commands that align with the PR objective of distributing precompiled binaries. Previous review comments have been addressed, including the removal of commented-out lines.


48-54: LGTM: Extra section is correctly configured.

The extra section is well-defined:

  • Additional platforms (linux-aarch64 and osx-arm64) are specified, aligning with the PR objective of supporting multiple architectures.
  • Skipping the linting rules should_be_noarch_generic and should_not_be_noarch_source is appropriate for this package. These rules are typically skipped for packages with precompiled binaries for specific architectures, which is the case here.

1-54: Overall, the meta.yaml file is well-structured and aligns with the PR objectives.

The file successfully addresses the goal of distributing vclust as precompiled binaries for multiple architectures, including macOS. Key points:

  1. Version and system-specific variables are correctly defined.
  2. Package, build, and source sections are well-configured.
  3. Requirements are specified, with a suggestion to add pytest if needed.
  4. About and test sections provide necessary metadata and basic testing.
  5. The extra section appropriately handles additional platforms and linting exceptions.

The structure and content of this meta.yaml file are suitable for the intended purpose of the package.

🧰 Tools
🪛 yamllint

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

(syntax)

@martin-g martin-g merged commit 45cff42 into bioconda:master Oct 16, 2024
7 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Oct 19, 2024
This was referenced Oct 27, 2024
@coderabbitai coderabbitai bot mentioned this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please review & merge set to ask for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants