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 get_mnv #51178

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open

Add get_mnv #51178

wants to merge 13 commits into from

Conversation

Paururo
Copy link

@Paururo Paururo commented Oct 5, 2024

Add get_mnv, a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences.


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

coderabbitai bot commented Oct 5, 2024

Warning

Rate limit exceeded

@Paururo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 15 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Files that changed from the base of the PR and between 17df3f1 and c2af868.

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

A new metadata file named meta.yaml has been created for the get_mnv package, which is designed for identifying Multi-Nucleotide Variants (MNVs) in genomic sequences. The file includes essential components such as the package name and version, which are specified as "get_mnv" and "1.0.0", respectively. It also provides a source section with a URL for downloading the package from GitHub, along with a SHA256 checksum for verification.

The build section details the installation process using Cargo, the Rust package manager, with specific flags. The requirements section indicates that the Rust compiler is necessary for building the package. A test command is included to ensure the get_mnv binary is correctly installed by checking its help output. The about section contains metadata about the package, including its homepage, license, summary, and a detailed description of its functionality. Lastly, the extra section lists the maintainers of the recipe, encapsulating all necessary information for the package's build, test, and description.

Possibly related PRs

  • recipe for pgrc #50973: The introduction of a meta.yaml file for the pgrc package parallels the creation of a similar file for the get_mnv package, indicating a shared structure and purpose in defining package metadata and build processes.
  • Update PhyloAcc recipe #51090: Although this PR updates an existing meta.yaml file, it demonstrates the importance of managing dependencies and build configurations, which is also a key aspect of the changes made in the get_mnv meta.yaml.

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

@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: 1

🧹 Outside diff range and nitpick comments (4)
recipes/get_mnv/meta.yaml (4)

13-15: LGTM: Build section is well-defined, with a minor suggestion.

The build section is correctly structured for a Rust package. The use of --no-track and --locked flags ensures reproducibility, which is crucial for Bioconda packages.

Consider adding the --jobs 1 flag to the cargo install command to ensure consistent builds across different environments. This can help prevent potential issues with parallel builds.

- script: "cargo install --no-track --locked --verbose --root \"${PREFIX}\" --path ."
+ script: "cargo install --no-track --locked --verbose --jobs 1 --root \"${PREFIX}\" --path ."

17-19: LGTM: Build requirements are correctly specified.

The requirements section correctly specifies the Rust compiler as the only build dependency, which is appropriate for a Rust package.

Consider adding a host section to specify any runtime dependencies if the package requires any. If there are no runtime dependencies, you can leave it as is.

requirements:
  build:
    - {{ compiler('rust') }}
  host:
    # Add any runtime dependencies here, if needed

21-23: LGTM: Test command is appropriate, with suggestions for improvement.

The test command correctly checks if the get_mnv binary is installed and runs without errors.

Consider the following improvements:

  1. Remove or translate the Spanish comment to English for consistency.
  2. Add more comprehensive tests if possible, such as running the tool with sample input data.

Here's a suggested revision:

test:
  commands:
    - get_mnv --help
    - get_mnv --version
    # Add more test commands here, e.g.:
    # - get_mnv sample_input.vcf > output.vcf

40-40: Minor: Remove extra blank lines at the end of the file.

To adhere to YAML best practices, remove the extra blank lines at the end of the file. This will resolve the yamllint warning about too many blank lines.

extra:
  recipe-maintainers:
    - PathoGenOmics-Lab
-
-
🧰 Tools
🪛 yamllint

[warning] 40-40: too many blank lines

(2 > 0) (empty-lines)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between cdf6639 and 64c730c.

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

[warning] 40-40: too many blank lines

(2 > 0) (empty-lines)


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

(syntax)

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

1-3: LGTM: Package version and SHA256 are correctly defined.

The use of Jinja2 variables for name, version, and SHA256 is appropriate and follows best practices. This approach allows for easy updates in the future.

🧰 Tools
🪛 yamllint

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

(syntax)


5-7: LGTM: Package name and version are correctly defined.

The package section is well-structured, using Jinja2 variables correctly. The use of the |lower filter for the package name ensures consistency with Bioconda naming conventions.


9-11: LGTM: Source URL and SHA256 checksum are correctly defined.

The source section is well-structured, using Jinja2 variables to construct the URL. The inclusion of the SHA256 checksum ensures package integrity during the build process.


1-40: Overall: Well-structured Bioconda recipe with minor improvements needed.

This meta.yaml file for the get_mnv package is generally well-structured and follows Bioconda guidelines. Here's a summary of the key points:

  1. The package, source, and build sections are correctly defined.
  2. Build requirements are appropriately specified for a Rust package.
  3. The test section includes a basic functionality check.
  4. The about and extra sections provide comprehensive information about the package.

To further improve the recipe, please address the following:

  1. Correct the license typo from "GLP-3.0" to "GPL-3.0".
  2. Consider adding more comprehensive test commands.
  3. Remove extra blank lines at the end of the file.
  4. Optional: Add category information to the extra section for better discoverability.

Once these minor issues are addressed, the recipe should be ready for inclusion in the Bioconda repository.

🧰 Tools
🪛 yamllint

[warning] 40-40: too many blank lines

(2 > 0) (empty-lines)


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

(syntax)

Comment on lines 26 to 38
about:
home: https://github.com/PathoGenOmics-Lab/get_mnv
license: GLP-3.0
license_file: LICENSE
summary: 'Tool to identify Multi-Nucleotide Variants (MNVs) in genomic sequences.'
description: |
get_MNV is a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences, providing more accurate annotation for genomic data.
doc_url: https://github.com/PathoGenOmics-Lab/get_mnv
dev_url: https://github.com/PathoGenOmics-Lab/get_mnv

extra:
recipe-maintainers:
- PathoGenOmics-Lab
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

LGTM: About and extra sections are well-defined, with a minor correction needed.

The about and extra sections provide comprehensive information about the package and its maintenance.

There's a typo in the license field. It should be "GPL-3.0" instead of "GLP-3.0". Please correct this to ensure proper licensing information.

- license: GLP-3.0
+ license: GPL-3.0

Consider adding more specific categories to help users find the tool more easily. You can add a categories field under the extra section. For example:

extra:
  recipe-maintainers:
    - PathoGenOmics-Lab
  categories:
    - Genomics
    - Variant Analysis

Copy link

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

17-23: LGTM: Requirements and test sections are correct, but translate the comment.

The build requirement correctly specifies the Rust compiler, and the test command appropriately checks if the get_mnv binary is installed. However, there's a minor issue:

Please translate the Spanish comment on line 23 to English for consistency. Here's the suggested change:

- # Asegúrate de que `get_mnv` sea el nombre del binario
+ # Make sure `get_mnv` is the name of the binary

36-42: LGTM: Extra section is well-defined, with a minor formatting issue.

The extra section includes appropriate recipe-maintainers and categories, following the suggestions from past review comments. The categories accurately reflect the tool's functionality.

There's an extra blank line at the end of the file. To address the yamllint warning, please remove the extra blank line:

    - Genomics
    - Variant Analysis
-
🧰 Tools
🪛 yamllint

[warning] 42-42: too many blank lines

(1 > 0) (empty-lines)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 64c730c and eeeaa3a.

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

[warning] 42-42: too many blank lines

(1 > 0) (empty-lines)


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

(syntax)

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

1-3: LGTM: Jinja2 variables are well-defined.

The use of Jinja2 variables for name, version, and SHA256 checksum is a good practice for maintainability. The version number follows semantic versioning, and the SHA256 checksum is provided, which is important for package integrity.

🧰 Tools
🪛 yamllint

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

(syntax)


5-7: LGTM: Package section is correctly defined.

The package name and version are set using Jinja2 variables, ensuring consistency. Converting the name to lowercase is a good practice for package naming conventions.


9-11: LGTM: Source section is properly configured.

The source URL is correctly constructed using Jinja2 variables, following the GitHub release pattern. The use of Jinja2 variables for both the URL and SHA256 checksum ensures consistency and integrity.


26-34: LGTM: About section is comprehensive and follows guidelines.

The about section provides all necessary information, including home, license, summary, description, and URLs. The license is correctly specified as GPL-3.0, addressing the issue mentioned in past review comments. The description clearly explains the tool's functionality.


1-3: Note: Ignore yamllint syntax error for Jinja2 variables.

The yamllint tool reports a syntax error for the Jinja2 variables at the beginning of the file. This is a false positive and can be safely ignored, as Jinja2 syntax is valid and commonly used in Bioconda recipe files.

🧰 Tools
🪛 yamllint

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

(syntax)


1-42: Overall: The recipe is well-structured and ready for submission.

The meta.yaml file for the get_mnv package is comprehensive and follows Bioconda guidelines. It includes all necessary sections: package information, source, build instructions, requirements, tests, about section, and extra metadata. The recipe addresses previous review comments and generally adheres to best practices.

Minor suggestions for improvement have been made, including:

  1. Verifying the Cargo install command against Bioconda best practices for Rust packages.
  2. Translating a Spanish comment to English.
  3. Removing an extra blank line at the end of the file.

Once these minor adjustments are made, the recipe should be ready for submission to the Bioconda repository.

🧰 Tools
🪛 yamllint

[warning] 42-42: too many blank lines

(1 > 0) (empty-lines)


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

(syntax)


13-15: LGTM: Build section looks good, but verify Cargo install command.

The build number is correctly set to 0 for a new package. The Cargo install command appears to be correct, but it's worth verifying if it follows Bioconda best practices for Rust packages.

To verify the Cargo install command, please run the following script:

✅ Verification successful

To further verify if the cargo install command follows Bioconda best practices, please run the following script:

shell
#!/bin/bash

Description: Search the entire repository for Rust or Cargo-related Bioconda guidelines

Search all markdown files for Rust or Cargo guidelines

rg --type md "rust|cargo"


To correctly verify if the cargo install command follows Bioconda best practices, please run the following script:


---

<!-- [monologue]
[task review_comment_finalization_1/1]
[observations]
- The search for Rust or Cargo-related Bioconda guidelines returned no relevant results, indicating the absence of specific guidelines in markdown files.
- Multiple existing Rust package recipes use the `cargo install` command in a consistent manner.
- The `cargo install` command in `recipes/get_mnv/meta.yaml` aligns with how it's used in other recipes.
[analysis]
- Despite the lack of explicit guidelines in the documentation, the consistent use of `cargo install` across multiple recipes suggests it's an accepted practice within the repository.
- The failure to find specific guidelines does not indicate a problem since the pattern is uniformly applied.
[actions]
- Conclude that the `cargo install` command follows the established practices in the codebase.
- Approve the build section as it aligns with existing patterns.
-->
  
**Verified: `cargo install` command follows existing Bioconda recipes.**

- The build script in `recipes/get_mnv/meta.yaml` uses `cargo install` similarly to other Rust package recipes, indicating adherence to common patterns.



</details>

<details>
<summary>🏁 Scripts executed</summary>

The following scripts were executed for the analysis:

Script:

```shell
#!/bin/bash
# Description: Check if there are any Bioconda guidelines for Rust package installation

# Search for Rust-related guidelines in Bioconda documentation
rg --type md "rust|cargo" "$(fd -t d -d 1 docs)"

# Check other Rust package recipes for comparison
fd -e yaml . recipes | xargs rg "cargo install"

Length of output: 773


Script:

Length of output: 98


Script:

Length of output: 98


Script:

#!/bin/bash
# Description: Search the entire repository for Rust or Cargo-related Bioconda guidelines

# Search all markdown files for Rust or Cargo guidelines
rg --type md "rust|cargo"

Length of output: 135

Copy link

@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: 1

🧹 Outside diff range and nitpick comments (2)
recipes/get_mnv/meta.yaml (2)

13-17: LGTM: Build section is well-configured, with a minor suggestion.

The build configuration looks good. The use of Cargo for installation is appropriate for a Rust package, and the inclusion of the run_exports directive is a good practice for ensuring proper versioning.

Consider translating the Spanish comment on line 17 to English for consistency:

-    - {{ pin_subpackage(name, max_pin="x") }}  # Asegura que el paquete sea correctamente versionado en futuras dependencias
+    - {{ pin_subpackage(name, max_pin="x") }}  # Ensures that the package is correctly versioned in future dependencies

37-43: LGTM: Extra section is well-defined, with a minor formatting suggestion.

The extra section correctly lists the recipe maintainer and includes appropriate categories as suggested in previous reviews, which will help with the tool's discoverability.

To address the yamllint warning, remove the extra blank line at the end of the file:

    - Genomics
    - Variant Analysis
-
🧰 Tools
🪛 yamllint

[warning] 43-43: too many blank lines

(1 > 0) (empty-lines)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between eeeaa3a and 48bb441.

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

[warning] 43-43: too many blank lines

(1 > 0) (empty-lines)


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

(syntax)

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

1-7: LGTM: Package and version declaration look good.

The use of Jinja2 variables for name, version, and sha256 is a good practice for maintainability. The package name is correctly set to lowercase, and the version is properly defined.

🧰 Tools
🪛 yamllint

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

(syntax)


9-11: LGTM: Source section is well-defined.

The source URL correctly points to a GitHub release, and the use of Jinja2 variables in the URL is appropriate. The inclusion of the sha256 checksum is crucial for package verification.


27-35: LGTM: About section is comprehensive and well-defined.

The about section provides all necessary information, including the home page, license (correctly specified as GPL-3.0), summary, description, and relevant URLs. The description clearly explains the tool's purpose and functionality.


1-3: Note on yamllint error: False positive due to Jinja2 templating.

The yamllint error reported for line 1 ("syntax error: found character '%' that cannot start any token") can be safely ignored. This is a false positive due to the use of Jinja2 templating, which is standard practice in Bioconda recipes. The {% set ... %} syntax is correct and should not be changed.

🧰 Tools
🪛 yamllint

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

(syntax)


1-43: Overall, the recipe is well-structured and adheres to Bioconda guidelines.

The meta.yaml file for the get_mnv package is comprehensive and provides all necessary information for building, testing, and describing the package. The use of Jinja2 templating, appropriate sections, and correct specification of build requirements demonstrate good practices in recipe creation.

Minor suggestions have been made for consistency (translating comments to English) and improvements (enhancing test coverage). These changes, while beneficial, are not critical for the recipe's functionality.

Please address the suggestions at your discretion, particularly focusing on:

  1. Verifying any potential runtime dependencies
  2. Enhancing the test section with more comprehensive checks
  3. Removing the extra blank line at the end of the file

Once these minor points are addressed, the recipe should be ready for inclusion in the Bioconda repository.

🧰 Tools
🪛 yamllint

[warning] 43-43: too many blank lines

(1 > 0) (empty-lines)


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

(syntax)


19-21: LGTM: Requirements section is correct, with a suggestion for verification.

The Rust compiler is correctly specified as a build requirement.

Please verify if there are any additional runtime dependencies for the get_mnv tool. If there are none, the current configuration is correct. Otherwise, consider adding them under a run: subsection. To help with this verification, you can run the following command:

This script will search for external crate usage in the Rust source files and optionally check the Cargo.toml file for listed dependencies.

Comment on lines 23 to 25
test:
commands:
- get_mnv --help # Asegúrate de que `get_mnv` sea el nombre del binario
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance test coverage and maintain consistency.

While the current test ensures that the get_mnv binary is installed and executable, consider adding more comprehensive tests to verify the tool's functionality.

  1. Translate the Spanish comment to English for consistency:
-    - get_mnv --help  # Asegúrate de que `get_mnv` sea el nombre del binario
+    - get_mnv --help  # Ensure that `get_mnv` is the correct binary name
  1. Consider adding more test commands to verify key functionalities of the tool. For example:
test:
  commands:
    - get_mnv --help
    - get_mnv --version
    - get_mnv --test-data  # If there's a test data option

Would you like assistance in generating more comprehensive test commands based on the tool's functionality?

Copy link

@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: 1

🧹 Outside diff range and nitpick comments (2)
recipes/get_mnv/meta.yaml (2)

13-26: LGTM: Build section is well-configured, with a minor suggestion.

The build configuration is comprehensive and correct. Setting environment variables ensures proper paths, and the use of run_exports is good for maintaining version consistency.

Consider translating the Spanish comment to English for consistency:

-    - {{ pin_subpackage(name, max_pin="x") }}  # Asegura que el paquete se versionee correctamente para las dependencias futuras.
+    - {{ pin_subpackage(name, max_pin="x") }}  # Ensures that the package is correctly versioned for future dependencies.

53-59: LGTM: Extra section is well-defined, with a minor formatting suggestion.

The extra section correctly specifies the recipe maintainer and includes the suggested categories, which is great for improving the discoverability of the tool.

Remove the extra blank lines at the end of the file to address the yamllint warning:

    - Genomics
    - Variant Analysis
-
-
🧰 Tools
🪛 yamllint

[warning] 59-59: too many blank lines

(1 > 0) (empty-lines)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 48bb441 and 60b8600.

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

[warning] 59-59: too many blank lines

(1 > 0) (empty-lines)


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

(syntax)

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

1-7: LGTM: Package and version section is well-defined.

The use of Jinja2 templating for name and version, along with the provided SHA256 checksum, follows best practices. The package section is correctly formatted.

🧰 Tools
🪛 yamllint

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

(syntax)


9-11: LGTM: Source section is correctly configured.

The URL is properly formatted for a GitHub release, and the use of templated values ensures consistency with the package section. The SHA256 checksum is correctly referenced.


28-37: LGTM: Requirements section is comprehensive and appropriate.

The build and run requirements are well-defined for a Rust project. Including OpenSSL as both a build and runtime dependency is correct, and the inclusion of libgcc for runtime compatibility is a good practice.


43-51: LGTM: About section is comprehensive and well-formatted.

The about section provides all necessary information, including home, license, summary, and a clear description of the tool's functionality. The documentation and development URLs are correctly included. The license is correctly specified as GPL-3.0, addressing the issue mentioned in a past review comment.


1-1: Note on static analysis warning.

The static analysis tool reports a syntax error for the '%' character on line 1. This is a false positive and can be safely ignored. The '%' character is correctly used here for Jinja2 templating, which is a common practice in Conda recipe files.

🧰 Tools
🪛 yamllint

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

(syntax)

Comment on lines 39 to 41
test:
commands:
- get_mnv --help # Verifica que el binario `get_mnv` se haya instalado correctamente.
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance test coverage and maintain consistency.

While the current test ensures that the get_mnv binary is installed and executable, consider adding more comprehensive tests to verify the tool's functionality.

  1. Translate the Spanish comment to English for consistency:
-    - get_mnv --help  # Verifica que el binario `get_mnv` se haya instalado correctamente.
+    - get_mnv --help  # Verify that the `get_mnv` binary is installed correctly.
  1. Consider adding more test commands to verify key functionalities of the tool. For example:
test:
  commands:
    - get_mnv --help
    - get_mnv --version
    - get_mnv --test-data  # If there's a test data option

Would you like assistance in generating more comprehensive test commands based on the tool's functionality?

Copy link

@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: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 60b8600 and 2a25e4a.

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

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

(syntax)

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

1-7: LGTM: Package metadata is well-defined.

The package metadata section is correctly structured using Jinja2 variables for name, version, and SHA256 hash. This approach allows for easier updates in the future.

🧰 Tools
🪛 yamllint

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

(syntax)


9-11: LGTM: Source information is correctly specified.

The source section properly defines the URL for the GitHub release and includes the SHA256 hash for verification. The use of variables ensures consistency and ease of updates.


34-50: LGTM: Requirements are comprehensive and well-defined.

The requirements section correctly specifies both build and run dependencies. The inclusion of necessary libraries like OpenSSL, Curl, and HTSlib aligns well with the build script's environment variables. This ensures that all required components are available for both building and running the package.


56-64: LGTM: About section is comprehensive and accurate.

The about section provides all necessary information, including the home page, license, summary, and a detailed description of the tool's functionality. The license is correctly specified as "GPL-3.0", addressing the typo mentioned in a previous review comment. The documentation and development URLs are also properly included.


66-71: LGTM: Extra section is well-defined with appropriate categories.

The extra section correctly specifies the recipe maintainer and includes relevant categories for the tool. The addition of "Genomics" and "Variant Analysis" categories, as suggested in a previous review, will help users find the tool more easily.


52-54: 🛠️ Refactor suggestion

Enhance test coverage for better validation.

While the current test ensures that the get_mnv binary is installed and executable, consider adding more comprehensive tests to verify the tool's functionality.

Consider expanding the test section with additional commands:

test:
  commands:
    - get_mnv --help
    - get_mnv --version
    - get_mnv --test  # If there's a built-in test option
    # Add a command to run get_mnv with sample input, if possible

These additional tests will provide better validation of the tool's installation and basic functionality.

Comment on lines 13 to 32
build:
number: 0
script: |
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export RUST_BACKTRACE=1
export OPENSSL_NO_VENDOR=1
export OPENSSL_DIR=$PREFIX
export OPENSSL_INCLUDE_DIR=$PREFIX/include
export OPENSSL_LIB_DIR=$PREFIX/lib
export CURL_STATIC_SSL=1
export CURL_SYS_STATIC=1
export CARGO_NET_OFFLINE=true
export HTS_LIB_DIR=$PREFIX/lib
export HTS_INCLUDE_DIR=$PREFIX/include
export HTS_STATIC=1
export HTS_SYS_BUNDLED=0
cargo install --no-track --locked --verbose --root "${PREFIX}" --path .
run_exports:
- {{ pin_subpackage(name, max_pin="x") }}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Consider removing CARGO_NET_OFFLINE environment variable.

The build section is well-structured with appropriate environment variable settings for OpenSSL, Curl, and HTSlib. However, there's a potential issue:

The CARGO_NET_OFFLINE=true setting might cause problems during the build process by preventing Cargo from downloading any dependencies. This could lead to build failures if all dependencies are not already available locally.

Consider removing this line or setting it to false:

-    export CARGO_NET_OFFLINE=true
+    # export CARGO_NET_OFFLINE=false  # Allow Cargo to download dependencies if needed

This change will allow Cargo to download any missing dependencies during the build process.

📝 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
build:
number: 0
script: |
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export RUST_BACKTRACE=1
export OPENSSL_NO_VENDOR=1
export OPENSSL_DIR=$PREFIX
export OPENSSL_INCLUDE_DIR=$PREFIX/include
export OPENSSL_LIB_DIR=$PREFIX/lib
export CURL_STATIC_SSL=1
export CURL_SYS_STATIC=1
export CARGO_NET_OFFLINE=true
export HTS_LIB_DIR=$PREFIX/lib
export HTS_INCLUDE_DIR=$PREFIX/include
export HTS_STATIC=1
export HTS_SYS_BUNDLED=0
cargo install --no-track --locked --verbose --root "${PREFIX}" --path .
run_exports:
- {{ pin_subpackage(name, max_pin="x") }}
build:
number: 0
script: |
export LANG=C.UTF-8
export LC_ALL=C.UTF-8
export RUST_BACKTRACE=1
export OPENSSL_NO_VENDOR=1
export OPENSSL_DIR=$PREFIX
export OPENSSL_INCLUDE_DIR=$PREFIX/include
export OPENSSL_LIB_DIR=$PREFIX/lib
export CURL_STATIC_SSL=1
export CURL_SYS_STATIC=1
# export CARGO_NET_OFFLINE=false # Allow Cargo to download dependencies if needed
export HTS_LIB_DIR=$PREFIX/lib
export HTS_INCLUDE_DIR=$PREFIX/include
export HTS_STATIC=1
export HTS_SYS_BUNDLED=0
cargo install --no-track --locked --verbose --root "${PREFIX}" --path .
run_exports:
- {{ pin_subpackage(name, max_pin="x") }}

@Paururo
Copy link
Author

Paururo commented Oct 5, 2024

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 5, 2024
recipes/get_mnv/meta.yaml Show resolved Hide resolved
- openssl
- curl
- pkg-config
- htslib
Copy link
Contributor

Choose a reason for hiding this comment

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

The libraries should be in 'host', not 'build'


about:
home: "https://github.com/PathoGenOmics-Lab/get_mnv"
license: "GPL-3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
license: "GPL-3.0"
license: "GPL-3.0"
license_family: GPL3

Co-authored-by: Martin Grigorov <[email protected]>
Copy link

@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 7ad6edb and 308fc05.

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

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

(syntax)

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

1-7: LGTM: Package information is well-defined.

The package name, version, and SHA256 checksum are correctly set using Jinja2 variables. This approach allows for easy updates in the future.

🧰 Tools
🪛 yamllint

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

(syntax)


9-11: LGTM: Source information is correctly specified.

The source URL points to the correct GitHub release, and the SHA256 checksum is properly referenced using a Jinja2 variable.


13-32: LGTM: Build section is well-structured with appropriate settings.

The build section is correctly configured:

  • Build number is set to 0 for a new package.
  • Environment variables are properly set for OpenSSL, Curl, and HTSlib.
  • The CARGO_NET_OFFLINE variable is correctly commented out, addressing a previous review comment.
  • The cargo install command is correct.
  • The run_exports section ensures proper versioning in dependencies.

66-71: LGTM: Extra section is well-defined.

The extra section provides appropriate information:

  • The recipe maintainer is correctly specified.
  • The categories (Genomics and Variant Analysis) are relevant and help users find the tool easily.

This section effectively addresses a previous suggestion to add categories.


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 and can be safely ignored. The '%' character is part of the Jinja2 template syntax, which is valid and commonly used in Bioconda recipes for variable substitution and control structures.

🧰 Tools
🪛 yamllint

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

(syntax)


1-71: Overall assessment: Good recipe with minor improvements needed.

The get_mnv recipe is well-structured and follows most Bioconda guidelines. To fully comply with best practices and improve the recipe, please address the following key points:

  1. Restructure the requirements section by moving libraries to a 'host' section and using {{ pin_compatible() }} in the 'run' section.
  2. Enhance the test section with more comprehensive test commands.
  3. Update the license specification to "GPL-3.0" and add the license_family.

Once these changes are implemented, the recipe will be in excellent shape for inclusion in the Bioconda repository.

🧰 Tools
🪛 yamllint

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

(syntax)

Comment on lines 34 to 50
requirements:
build:
- {{ compiler('rust') }}
- openssl
- curl
- pkg-config
- htslib
- bzip2
- xz
- zlib
run:
- openssl
- curl
- htslib
- bzip2
- xz
- zlib
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Refactor suggestion: Adjust requirements section structure.

Consider restructuring the requirements section to better align with Bioconda best practices:

  1. Move the libraries (openssl, curl, htslib, bzip2, xz, zlib) from the 'build' section to a new 'host' section.
  2. Keep only the Rust compiler and pkg-config in the 'build' section.
  3. Adjust the 'run' section to use the {{ pin_compatible() }} function for the libraries.

Here's a suggested restructure:

requirements:
  build:
    - {{ compiler('rust') }}
    - pkg-config
  host:
    - openssl
    - curl
    - htslib
    - bzip2
    - xz
    - zlib
  run:
    - {{ pin_compatible('openssl') }}
    - {{ pin_compatible('curl') }}
    - {{ pin_compatible('htslib') }}
    - {{ pin_compatible('bzip2') }}
    - {{ pin_compatible('xz') }}
    - {{ pin_compatible('zlib') }}

This structure ensures that the libraries are available at build time and properly pinned at runtime.

Comment on lines 56 to 64
about:
home: "https://github.com/PathoGenOmics-Lab/get_mnv"
license: "GPL-3.0-or-later"
license_file: LICENSE
summary: "Tool to identify Multi-Nucleotide Variants (MNVs) in genomic sequences."
description: |
get_MNV is a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences, providing more accurate annotation for genomic data.
doc_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
dev_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Update license specification and LGTM for the rest.

The about section provides comprehensive information about the package. However, please update the license specification as per a previous review comment:

-  license: "GPL-3.0-or-later"
+  license: "GPL-3.0"
+  license_family: GPL3

This change ensures consistency with Bioconda's preferred license specification format.

The rest of the section, including the home page, summary, description, and URLs, is well-defined and informative.

📝 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/PathoGenOmics-Lab/get_mnv"
license: "GPL-3.0-or-later"
license_file: LICENSE
summary: "Tool to identify Multi-Nucleotide Variants (MNVs) in genomic sequences."
description: |
get_MNV is a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences, providing more accurate annotation for genomic data.
doc_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
dev_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
about:
home: "https://github.com/PathoGenOmics-Lab/get_mnv"
license: "GPL-3.0"
license_family: GPL3
license_file: LICENSE
summary: "Tool to identify Multi-Nucleotide Variants (MNVs) in genomic sequences."
description: |
get_MNV is a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences, providing more accurate annotation for genomic data.
doc_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
dev_url: "https://github.com/PathoGenOmics-Lab/get_mnv"

Copy link

@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 308fc05 and 17df3f1.

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

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

(syntax)

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

1-11: LGTM: Package and source sections are well-defined.

The package name, version, and source URL are correctly specified using Jinja2 variables. The SHA256 checksum is provided for integrity verification. This structure follows Bioconda best practices.

🧰 Tools
🪛 yamllint

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

(syntax)


13-32: LGTM: Build section is comprehensive and follows best practices.

The build section is well-structured with appropriate environment variable settings for OpenSSL, Curl, and HTSlib. The use of run_exports ensures proper versioning in future dependencies.

Good job on commenting out the CARGO_NET_OFFLINE line. This allows Cargo to download any missing dependencies during the build process if needed.


62-67: LGTM: Extra section is well-defined.

The extra section correctly specifies the recipe maintainer and includes relevant categories for the tool. This information will help users find the tool more easily.


1-1: Ignore yamllint false positive.

The static analysis tool (yamllint) reports a syntax error for the '%' character. This is a false positive as the '%' is part of valid Jinja2 templating used in Bioconda recipes. No action is required to address this.

🧰 Tools
🪛 yamllint

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

(syntax)

Comment on lines +34 to +45
requirements:
build:
- {{ compiler('rust') }}

host:
- openssl
- curl
- pkg-config
- htslib
- bzip2
- xz
- zlib
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Add run section with pinned library versions.

The requirements section is well-structured with build and host sections. However, it's missing a run section to specify runtime dependencies. Consider adding a run section with pinned versions of the libraries:

  run:
    - {{ pin_compatible('openssl') }}
    - {{ pin_compatible('curl') }}
    - {{ pin_compatible('htslib') }}
    - {{ pin_compatible('bzip2') }}
    - {{ pin_compatible('xz') }}
    - {{ pin_compatible('zlib') }}

This ensures that the package uses compatible versions of the libraries at runtime.

Comment on lines +47 to +49
test:
commands:
- get_mnv --help
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance test coverage.

While the current test ensures that the get_mnv binary is installed and executable, consider adding more comprehensive tests to verify the tool's functionality. For example:

test:
  commands:
    - get_mnv --help
    - get_mnv --version
    - get_mnv --test  # If there's a built-in test option
    # Add a command to run get_mnv on a small test dataset, if possible

These additional tests would provide better assurance that the tool is functioning correctly after installation.

Would you like assistance in generating more specific test commands based on the tool's functionality?

Comment on lines 51 to 60
about:
home: "https://github.com/PathoGenOmics-Lab/get_mnv"
license: "GPL-3.0-or-later"
license_family: GPL3
license_file: LICENSE
summary: "Tool to identify Multi-Nucleotide Variants (MNVs) in genomic sequences."
description: |
get_MNV is a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences, providing more accurate annotation for genomic data.
doc_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
dev_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update license specification.

The about section provides comprehensive information about the package. However, please update the license specification as follows:

-  license: "GPL-3.0-or-later"
+  license: "GPL-3.0"

This change ensures consistency with Bioconda's preferred license specification format. The license_family: GPL3 entry is correct and should be kept.

The rest of the section, including the home page, summary, description, and URLs, is well-defined and informative.

📝 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/PathoGenOmics-Lab/get_mnv"
license: "GPL-3.0-or-later"
license_family: GPL3
license_file: LICENSE
summary: "Tool to identify Multi-Nucleotide Variants (MNVs) in genomic sequences."
description: |
get_MNV is a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences, providing more accurate annotation for genomic data.
doc_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
dev_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
about:
home: "https://github.com/PathoGenOmics-Lab/get_mnv"
license: "GPL-3.0"
license_family: GPL3
license_file: LICENSE
summary: "Tool to identify Multi-Nucleotide Variants (MNVs) in genomic sequences."
description: |
get_MNV is a tool designed to identify Multi-Nucleotide Variants (MNVs) within the same codon in genomic sequences, providing more accurate annotation for genomic data.
doc_url: "https://github.com/PathoGenOmics-Lab/get_mnv"
dev_url: "https://github.com/PathoGenOmics-Lab/get_mnv"

@Paururo Paururo requested a review from martin-g October 6, 2024 08:39
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