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 recipe for snpick #52144

Merged
merged 2 commits into from
Nov 19, 2024
Merged

Add recipe for snpick #52144

merged 2 commits into from
Nov 19, 2024

Conversation

Paururo
Copy link
Contributor

@Paururo Paururo commented Nov 16, 2024

Describe your pull request here


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @bioconda/core in a comment.

Instructions for avoiding API, ABI, and CLI breakage issues

Conda is able to record and lock (a.k.a. pin) dependency versions used at build time of other recipes.
This way, one can avoid that expectations of a downstream recipe with regards to API, ABI, or CLI are violated by later changes in the recipe.
If not already present in the meta.yaml, make sure to specify run_exports (see here for the rationale and comprehensive explanation).
Add a run_exports section like this:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|lower variable is defined in your recipe or with the lowercase name of the package in quotes.

Bot commands for PR management

Please use the following BiocondaBot commands:

Everyone has access to the following BiocondaBot commands, which can be given in a comment:

@BiocondaBot please update Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
You can use this to test packages locally.

Note that the @BiocondaBot please merge command is now depreciated. Please just squash and merge instead.

Also, the bot watches for comments from non-members that include @bioconda/<team> and will automatically re-post them to notify the addressed <team>.

Copy link
Contributor

coderabbitai bot commented Nov 16, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces a new meta.yaml file for the snpick package, detailing its metadata and build configuration. The package is identified as "snpick" with a version number of "1.0.0" and includes a SHA256 checksum for integrity verification. The source section specifies a URL for downloading the package from GitHub, accompanied by its SHA256 hash. The build section outlines the build process, including environment variable settings and the use of Cargo for installing the Rust package. Requirements are categorized into build, host, and run, detailing necessary libraries such as OpenSSL, zlib, xz, and bzip2. The test section includes commands to verify the installation of the snpick tool. Additional information is provided in the about section, including the project's homepage, license, and a summary of its functionality. The extra section identifies supported platforms, recipe maintainers, and relevant categories for the tool.

Possibly related PRs

  • Add recipe for SVision-pro #49456: Introduces a new meta.yaml file for the SVision-pro package, defining package metadata and build configurations.
  • Add get_mnv #51178: The get_mnv package's meta.yaml file features a similar structure, focusing on genomic analysis, akin to snpick.
  • Add meta_eukaryome_detect #51328: The meta_eukaryome_detect package's meta.yaml file follows a comparable pattern for defining package metadata and build configurations relevant to genomic data analysis.
  • add recipe for steamboat #51612: The steamboat package's meta.yaml includes similar elements of package definition and build instructions consistent with snpick.
  • Update meta-neuro version 1.0.0 #51826: Updates to the meta-neuro package's meta.yaml reflect practices in defining package metadata and dependencies relevant to genomic and bioinformatics contexts.

Suggested labels

please review & merge

Suggested reviewers

  • mencian

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (3)
recipes/snpick/meta.yaml (3)

13-29: Add skip section for unsupported platforms.

Consider adding a skip section to explicitly define unsupported platforms:

build:
  number: 0
+ skip: true  # [win]
  script: |

30-44: Consider adding common CI dependencies.

For better CI compatibility, consider adding these common dependencies:

  build:
    - {{ compiler('rust') }}
    - pkg-config
+   - make
+   - cmake

50-60: Consider adding more documentation resources.

All documentation links currently point to GitHub. Consider adding:

  • A dedicated documentation site (e.g., ReadTheDocs)
  • Usage examples
  • Citation information
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 1b0d178 and bccaf06.

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

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

(syntax)

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

1-8: LGTM! Package metadata follows best practices.

The use of Jinja2 variables for package name, version, and checksum makes the recipe maintainable.

🧰 Tools
🪛 yamllint

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

(syntax)


61-70: LGTM! Comprehensive metadata provided.

The extra section properly defines supported platforms, maintainers, and relevant bioinformatics categories.


26-26: Verify cargo installation flags.

The --locked flag ensures reproducible builds, which is good. However, let's verify if the package has a Cargo.lock file.

✅ Verification successful

Using --locked flag is consistent with best practices

The --locked flag is consistently used across multiple Rust package installations in the repository, which is a good practice for reproducible builds. While we couldn't directly verify the presence of Cargo.lock in the source repository, the usage pattern in similar recipes suggests this is a standard approach for Rust package installations in this ecosystem.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for Cargo.lock in the source repository
URL="https://github.com/PathoGenOmics-Lab/snpick"

# Check if Cargo.lock exists in the repository
gh api repos/PathoGenOmics-Lab/snpick/contents/Cargo.lock --jq '.name'

Length of output: 217


Script:

#!/bin/bash
# Let's verify if the Cargo.lock exists in the repository and check its content
rg -l "Cargo.lock"

# Also check if there's any mention of --locked flag in build scripts or documentation
rg --type yaml --type md "\-\-locked"

Length of output: 692


9-12: Verify source URL accessibility and checksum.

Let's ensure the source URL is accessible and the checksum matches.

✅ Verification successful

Source URL and release are valid and accessible

The verification confirms:

  • Repository exists and is not archived
  • Release 1.0.0 exists with a valid tarball URL
  • The source URL in meta.yaml correctly points to the release tarball
  • The URL is accessible and returns a valid gzipped tarball
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify source URL accessibility and checksum
URL="https://github.com/PathoGenOmics-Lab/snpick/archive/refs/tags/1.0.0.tar.gz"
EXPECTED_SHA="6a5ae16a65c92c90ecf710c4d53afa0e3a76b7a43554c52e48cda843f7e20744"

# Check if URL is accessible
if curl --output /dev/null --silent --head --fail "$URL"; then
    echo "URL is accessible"
else
    echo "URL is not accessible"
    exit 1
fi

Length of output: 217


Script:

#!/bin/bash
# Let's verify the repository and release existence first
gh repo view PathoGenOmics-Lab/snpick --json name,isArchived,defaultBranch
gh release view 1.0.0 --repo PathoGenOmics-Lab/snpick --json name,tagName,url,isLatest

# Then verify the specific tarball URL
curl -I "https://github.com/PathoGenOmics-Lab/snpick/archive/refs/tags/1.0.0.tar.gz"

Length of output: 5819


Script:

#!/bin/bash
# Let's try with corrected JSON fields and focus on getting release information
gh repo view PathoGenOmics-Lab/snpick --json name,isArchived
gh release view 1.0.0 --repo PathoGenOmics-Lab/snpick --json tagName,tarballUrl

# Let's also check the final redirect URL
curl -IL "https://github.com/PathoGenOmics-Lab/snpick/archive/refs/tags/1.0.0.tar.gz"

Length of output: 5307

Comment on lines +45 to +49
test:
commands:
- snpick --help
- snpick --version

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

Enhance test coverage with functional tests.

Current tests only verify basic command availability. Consider adding functional tests:

test:
  commands:
    - snpick --help
    - snpick --version
+   # Add functional test with minimal example
+   - snpick --input test.fasta --output test.vcf
+  files:
+    - test.fasta

Would you like me to help create a minimal test dataset and corresponding test commands?

Committable suggestion skipped: line range outside the PR's diff.

@Paururo
Copy link
Contributor Author

Paururo commented Nov 16, 2024

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Nov 16, 2024
@mencian
Copy link
Contributor

mencian commented Nov 19, 2024

@BiocondaBot please fetch artifacts

@BiocondaBot
Copy link
Collaborator

Package(s) built are ready for inspection:

Arch Package Zip File / Repodata CI Instructions
linux-64 snpick-1.0.0-h3f2c17f_0.tar.bz2 linux-64.zip GitHub Actions
showYou may also use conda to install after downloading and extracting the zip file. conda install -c ./packages <package name>
osx-64 snpick-1.0.0-hb52389a_0.tar.bz2 osx-64.zip GitHub Actions
showYou may also use conda to install after downloading and extracting the zip file. conda install -c ./packages <package name>
osx-arm64 snpick-1.0.0-hf1e4ac0_0.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/db59a7d0-4273-416f-a366-c1f030917407/artifacts/0/tmp/artifacts/packages <package name>
linux-aarch64 snpick-1.0.0-h37e75d8_0.tar.bz2 repodata.json CircleCI
showYou may also use conda to install:conda install -c https://output.circle-artifacts.com/output/job/8fb36046-0c1e-471f-94ab-21e77bcf6405/artifacts/0/tmp/artifacts/packages <package name>

Docker image(s) built:

Package Tag CI Install with docker
snpick 1.0.0--h3f2c17f_0 GitHub Actions
showImages are in the linux-64 zip file above.gzip -dc images/snpick---1.0.0--h3f2c17f_0.tar.gz | docker load

@mencian mencian merged commit 9ef8843 into bioconda:master Nov 19, 2024
6 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 20, 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