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 svtopovz python package #51643

Merged
merged 7 commits into from
Oct 25, 2024
Merged

Add svtopovz python package #51643

merged 7 commits into from
Oct 25, 2024

Conversation

jbelyeu
Copy link
Contributor

@jbelyeu jbelyeu commented Oct 24, 2024

This is a new python tool for visualization of complex genomic structural variants from HiFi sequencing data. Initial release.


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 24, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces a new file, meta.yaml, for the svtopovz package, which is designed for complex structural variant visualization in HiFi sequencing data. This file outlines the package's configuration, including its name, version, and a SHA256 checksum for the source tarball. It specifies the source URL pointing to the GitHub repository, ensuring the correct version is fetched during installation. The build section indicates that the package is architecture-independent and includes an installation script that uses pip to install the package without dependencies. The requirements section details the dependencies necessary for both host and runtime environments, listing specific versions of Python, Cython, Matplotlib, NumPy, and Scikit-image. Additionally, the test section includes commands to verify the installation, while the about section provides metadata such as the package's homepage and license. An extra section identifies the recipe maintainer.

Possibly related PRs

  • Update meta.yaml for spec2vec #49857: The changes in meta.yaml for spec2vec include updates to the build script and dependencies, which are similar in nature to the modifications made in the meta.yaml for svtopovz, particularly regarding the build process and dependency management.
  • Add SpreadGLtools #50627: The meta.yaml for SpreadGLtools also involves defining package configuration and dependencies, similar to the changes made in svtopovz, indicating a related focus on package management.
  • recipe for pgrc #50973: The introduction of a new meta.yaml for pgrc includes similar structural elements and dependency declarations as seen in svtopovz, suggesting a common approach to package configuration.
  • Add Snk #51152: The meta.yaml for snk introduces a new package with a focus on dependencies and build specifications, paralleling the updates made in svtopovz.
  • Add seqspec #51326: The meta.yaml for seqspec includes similar templating and dependency management features as those introduced in svtopovz, indicating a shared methodology in package configuration.
  • [biobb_analysis] update 5.0.0 #51431: The updates to the meta.yaml for biobb_analysis reflect changes in versioning and dependencies, akin to the modifications made in svtopovz, highlighting a common focus on package maintenance.
  • Add pykofamsearch #51537: The meta.yaml for pykofamsearch introduces a new package with a focus on dependencies and build specifications, similar to the changes made in svtopovz.
  • add recipe for steamboat #51612: The meta.yaml for steamboat includes similar structural elements and dependency declarations as seen in svtopovz, suggesting a common approach to package configuration.
  • Add mikrokondo-tools #51618: The meta.yaml for mikrokondo-tools introduces a new package with a focus on dependencies and build specifications, paralleling the updates made in svtopovz.

Suggested reviewers

  • martin-g: Suggested reviewer for the changes in the meta.yaml file.

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.

@jbelyeu
Copy link
Contributor Author

jbelyeu commented Oct 24, 2024

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 24, 2024
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/svtopovz/meta.yaml (2)

13-21: Consider relaxing run_exports pin specification.

For a visualization tool, the x.x pin specification might be unnecessarily restrictive. Consider using a more relaxed pin unless there are specific API compatibility requirements.

-    - {{ pin_subpackage('svtopovz', max_pin="x.x") }}
+    - {{ pin_subpackage('svtopovz', max_pin="x") }}

34-38: Enhance test coverage.

Current tests only verify command availability. Consider adding basic functionality tests, such as:

  • Testing with a small example file
  • Verifying output file generation
  • Checking common error conditions

Would you like help designing additional test cases for the recipe?

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 493f0be and 1642ea7.

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

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

(syntax)

🔇 Additional comments (2)
recipes/svtopovz/meta.yaml (2)

1-8: LGTM! Template variables and package metadata are well-structured.

The use of Jinja2 templates for version management follows best practices.

🧰 Tools
🪛 yamllint

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

(syntax)


9-12: Verify source URL structure and package location.

The source URL points to HiFi-SVTopo but the installation script references HiFi-SVTopoVz/. This mismatch needs verification.

#!/bin/bash
# Description: Verify the repository structure and installation path
# Test 1: Check if the repository contains the expected directory
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar tz | grep -E "HiFi-SVTopoVz/"

# Test 2: Look for setup.py or pyproject.toml to confirm package structure
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar tz | grep -E "(setup.py|pyproject.toml)$"

Comment on lines +39 to +47
about:
home: https://github.com/PacificBiosciences/HiFi-SVTopo
license: "Pacific Biosciences Software License Agreement"
summary: "Complex structural variant visualization for HiFi sequencing data: plotting tool."
dev_url: https://github.com/PacificBiosciences/HiFi-SVTopo

extra:
recipe-maintainers:
- jbelyeu
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

Add license_file specification.

The license section should include a path to the license file to ensure it's properly packaged.

Add license file specification:

 about:
   home: https://github.com/PacificBiosciences/HiFi-SVTopo
   license: "Pacific Biosciences Software License Agreement"
+  license_file: LICENSE
   summary: "Complex structural variant visualization for HiFi sequencing data: plotting tool."
   dev_url: https://github.com/PacificBiosciences/HiFi-SVTopo

Committable suggestion was skipped due to low confidence.

Comment on lines +22 to +33
requirements:
host:
- pip
- python >=3.10
- cython >=3.0.10
- setuptools
run:
- python >=3.10
- matplotlib-base >=3.8.4
- numpy ==1.26.4
- scikit-image >=0.24.0

Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

🛠️ Refactor suggestion

Consider relaxing numpy version constraint

Based on the verification:

  1. The package uses standard numpy operations (basic imports as np) without any indication of version-specific features
  2. No pandas dependency is used or needed in the codebase
  3. The exact numpy pin (==1.26.4) in meta.yaml matches requirements.txt but could be relaxed to a minimum version constraint for better compatibility
-    - numpy ==1.26.4
+    - numpy >=1.26.4
🔗 Analysis chain

Review dependency specifications.

  1. The exact pin on numpy (==1.26.4) might cause dependency conflicts in the conda environment. Consider using a minimum version constraint instead.
  2. Consider if pandas is needed as it's commonly used with numpy/matplotlib for genomic data visualization.

Consider updating numpy dependency:

-    - numpy ==1.26.4
+    - numpy >=1.26.4
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the package uses pandas
# Look for pandas imports in the source code
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar tz | grep -E "\.py$" | while read -r file; do
  echo "Checking $file for pandas imports..."
  curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar xz -O "*/$file" | grep -E "import pandas|from pandas"
done

Length of output: 6103


Script:

#!/bin/bash
# Let's try a different approach to check for pandas usage
# First, let's check the repository content structure
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar tz

# Then let's examine setup.py or pyproject.toml for dependencies
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar xz --wildcards "*/setup.py" -O 2>/dev/null || true
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar xz --wildcards "*/pyproject.toml" -O 2>/dev/null || true

# Let's also check the source files for pandas usage
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar xz --wildcards "*.py" --to-stdout 2>/dev/null | grep -E "import pandas|from pandas" || true

Length of output: 6764


Script:

#!/bin/bash
# Let's check the requirements.txt file to see the actual dependencies
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar xz --wildcards "*/requirements.txt" -O 2>/dev/null || true

# Also check the actual usage of numpy to understand if exact pinning is necessary
curl -sL https://github.com/PacificBiosciences/HiFi-SVTopo/archive/v0.1.1.tar.gz | tar xz --wildcards "*.py" --to-stdout 2>/dev/null | grep -E "import numpy|from numpy" || true

Length of output: 449

Copy link
Contributor

@mencian mencian left a comment

Choose a reason for hiding this comment

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

Just added a few finishing touches, the rest LGTM @jbelyeu! Thanks!

@mencian mencian merged commit 9a9fe19 into bioconda:master Oct 25, 2024
7 checks passed
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