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 mini3di. #51211

Merged
merged 3 commits into from
Oct 7, 2024
Merged

Add recipe for mini3di. #51211

merged 3 commits into from
Oct 7, 2024

Conversation

althonos
Copy link
Contributor

@althonos althonos commented Oct 7, 2024

This PR adds a recipe for mini3di, a pure-Python package for computing the 3di encoding of a protein structure.


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

📝 Walkthrough
📝 Walkthrough

Walkthrough

The pull request introduces a new file named meta.yaml for the mini3di package, version 0.2.1. This file contains comprehensive metadata about the package, including the package name, version, and a source URL for downloading the package from PyPI, along with its SHA256 checksum for integrity verification. The build section specifies a script for installation using pip while ignoring dependencies and installed packages. The requirements section details the necessary dependencies for both the host and runtime environments, which include Python, pip, setuptools, and NumPy. Additionally, the test section mandates that the package must be importable for testing purposes. The about section provides essential information such as the project's homepage, licensing details, and a brief summary of the package's functionality. Lastly, the extra section lists the recipe maintainers for the package.

Possibly related PRs

  • Add minimizers #48797: The meta.yaml file for the minimizers package also defines metadata for a new package, similar to the changes made for the mini3di package in the main PR.
  • recipe for pgrc #50973: The meta.yaml file for the pgrc package introduces a new package with its own metadata, akin to the mini3di package's metadata definition.
  • Add dbghaplo #51035: The meta.yaml file for the dbghaplo package defines its version and source URL, paralleling the metadata specifications in the mini3di package.

Suggested labels

please review & merge


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

12-17: LGTM: Build configuration is well-defined with a minor suggestion.

The build configuration is correctly set up:

  • Build number is properly initialized to 0.
  • Python 2 builds are appropriately skipped.
  • The pip install script is used, which is standard for Python packages.
  • The run_exports section ensures proper version pinning for downstream dependencies.

Consider adding a noarch: python field if this package is compatible with all Python versions and platforms. This can simplify the build process and reduce the number of packages that need to be built and maintained.


19-26: LGTM: Requirements are well-defined with a suggestion for consideration.

The host and run requirements are appropriately specified:

  • Host requirements include necessary build tools (python, pip, setuptools).
  • Run requirements correctly include numpy, which is likely needed for the package's functionality.

Consider adding a Python version constraint (e.g., python >=3.6) to ensure compatibility with the package's supported Python versions. This can help prevent potential issues with unsupported Python versions.


28-30: LGTM: Basic test is provided, with suggestions for improvement.

The test section includes a basic import test, which is a minimum requirement for ensuring the package is installed correctly.

Consider enhancing the test section with more comprehensive tests:

  1. Add command-line interface (CLI) tests if the package provides any CLI tools.
  2. Include simple functional tests to verify core functionality.
  3. If available, consider running the package's own test suite as part of the conda build process.

These additions would provide greater confidence in the package's functionality within the conda environment.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 83d2492 and 4adaaa2.

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

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

(syntax)

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

1-6: LGTM: Package name and version are correctly defined.

The package name and version are properly set using Jinja2 templating, which is a good practice in Conda recipes. The package name is correctly lowercased in the package section.

🧰 Tools
🪛 yamllint

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

(syntax)


8-10: LGTM: Source URL and checksum are correctly specified.

The source URL is properly constructed using Jinja2 templating, pointing to the correct PyPI package. The SHA256 checksum is provided, which is crucial for verifying the integrity of the downloaded package.


32-36: LGTM: About section is comprehensive and informative.

The about section provides all necessary metadata:

  • The home page URL is correctly specified.
  • The license (BSD-3-Clause) is clearly stated and appropriate for Bioconda.
  • The license file is correctly referenced.
  • The summary succinctly describes the package's functionality, highlighting its relevance to bioinformatics.

This information is valuable for users and maintainers of the package.


38-40: LGTM: Maintainer information is correctly provided.

The extra section appropriately lists the recipe maintainer (althonos), which matches the PR submitter. This information is crucial for package management and future communications regarding the package.


1-1: Note on YAML linting warning: False positive

The yamllint tool reported 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 correctly used in Conda recipe files. No action is required to address this warning.

🧰 Tools
🪛 yamllint

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

(syntax)


1-40: Overall assessment: Well-structured recipe ready for Bioconda

This recipe for mini3di is well-constructed and adheres to Conda and Bioconda best practices. It provides all necessary information for building and distributing the package. The package's functionality, focusing on encoding protein structures, aligns well with Bioconda's bioinformatics scope.

Key strengths:

  1. Proper use of Jinja2 templating
  2. Correct specification of build requirements and runtime dependencies
  3. Inclusion of a basic test
  4. Comprehensive metadata in the about section
  5. Clear maintainer information

Consider the minor suggestions provided in previous comments to further enhance the recipe. Once these are addressed (if deemed necessary), this recipe should be ready for inclusion in Bioconda.

🧰 Tools
🪛 yamllint

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

(syntax)

@althonos
Copy link
Contributor Author

althonos commented Oct 7, 2024

@BiocondaBot please add label

@BiocondaBot BiocondaBot added the please review & merge set to ask for merge label Oct 7, 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: 1

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

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

The build section is correctly set up for a pure Python package (noarch). The pip install script and run_exports section are appropriately configured.

Consider adding a comment explaining the purpose of the run_exports section, as it's not commonly used in all recipes. This would help future maintainers understand its importance.

  run_exports:
    # Ensure consistent versioning across the environment
    - {{ pin_subpackage(name, max_pin="x.x") }}

28-30: Consider adding more comprehensive tests.

While the import test is a good start, it would be beneficial to include more comprehensive tests to ensure the package functions correctly.

Consider adding additional tests, such as:

  1. Running the package's test suite if available.
  2. Testing specific functions or features of the package.
  3. Checking if any command-line scripts are installed and runnable.

Example addition:

test:
  imports:
    - {{ name }}
  commands:
    - python -c "import {{ name }}; {{ name }}.run_tests()"  # If a test function exists
    - mini3di --version  # If there's a CLI tool

Would you like assistance in identifying and adding more specific tests for this package?


38-40: Consider adding more maintainers.

While it's great to have a maintainer specified, it's often beneficial to have multiple maintainers for better long-term maintenance of the package.

Consider reaching out to other contributors or interested parties to add them as co-maintainers. This can help ensure the recipe stays up-to-date and well-maintained over time.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 4adaaa2 and 45714b2.

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

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

(syntax)

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

1-6: LGTM: Package and version section looks good.

The use of Jinja2 variables for the package name and version is a good practice, allowing for easier updates. Lowercasing the package name ensures consistency.

🧰 Tools
🪛 yamllint

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

(syntax)


8-10: LGTM: Source section is well-defined.

The source URL is correctly constructed using Jinja2 variables, following the PyPI standard format. The inclusion of a SHA256 checksum ensures package integrity and security.


32-36: LGTM: About section is well-documented.

The about section provides all necessary information including the home URL, license details, and a concise summary of the package's functionality. The inclusion of the license file path is particularly important for compliance.


1-2: Note on static analysis warning: False positive.

The static analysis tool (yamllint) reported a syntax error for the '%' character at the start of the file. This is a false positive as the '%' is part of the Jinja2 templating syntax, which is valid and commonly used in Conda meta.yaml files.

No action is needed to address this warning.

🧰 Tools
🪛 yamllint

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

(syntax)

Comment on lines +19 to +26
requirements:
host:
- python
- pip
- setuptools
run:
- python
- numpy
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

Issues Found: Incomplete Dependency Specifications in meta.yaml

The meta.yaml file specifies only python and numpy as run requirements. However, additional dependencies are defined within individual setup.py files across various recipes. This discrepancy may lead to missing dependencies during package installation.

  • Additional Dependencies Identified:
    • WTForms>=1.0.4
    • six>=1.4.1
    • validators>=0.5.0
    • intervals>=0.6.0
    • ...and others as listed in the shell script output.

Ensure that all necessary dependencies from the setup.py files are included in the meta.yaml to maintain consistency and prevent potential installation issues.

🔗 Analysis chain

LGTM: Requirements section looks good, but verify dependencies.

The host and run requirements are appropriately specified. However, it's worth verifying if these are all the necessary dependencies for the package.

Please run the following script to check if there are any additional dependencies listed in the package's setup.py or pyproject.toml:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for additional dependencies in setup.py or pyproject.toml

# Test: Search for setup.py
if fd -t f "setup.py"; then
    echo "Found setup.py. Checking for install_requires:"
    rg -i "install_requires\s*=" setup.py -A 10
fi

# Test: Search for pyproject.toml
if fd -t f "pyproject.toml"; then
    echo "Found pyproject.toml. Checking for dependencies:"
    rg -i "dependencies\s*=" pyproject.toml -A 10
fi

Length of output: 1190


Script:

#!/bin/bash
# Description: Search for install_requires in all setup.py files within the repository

# Find all setup.py files and search for install_requires
fd -t f "setup.py" | while read -r file; do
    echo "Checking $file for install_requires:"
    rg -i "install_requires\s*=" "$file" -A 10
done

Length of output: 6170

@martin-g martin-g merged commit e61ac71 into bioconda:master Oct 7, 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