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

new tool: orthodb #51959

Merged
merged 94 commits into from
Nov 6, 2024
Merged

new tool: orthodb #51959

merged 94 commits into from
Nov 6, 2024

Conversation

ftegenfe
Copy link
Contributor

@ftegenfe ftegenfe commented Nov 6, 2024

Add new tool prthodb

Copy link
Contributor

coderabbitai bot commented Nov 6, 2024

Warning

Rate limit exceeded

@ftegenfe has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 59 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

Reviewing files that changed from the base of the PR and between 75525a5 and 1989848.

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request introduces two new files within the recipes/orthodb directory: build.sh and meta.yaml. The build.sh script is a Bash shell script designed to install the orthodb Python package using pip with specific options to ignore dependencies and previously installed versions. It utilizes a variable for the Python interpreter, allowing flexibility in the execution environment. The meta.yaml file defines the package configuration for the orthodb interface, specifying its version (0.9.0), SHA256 checksum, and architecture independence. It outlines the build requirements, which include Python 3.7 or higher, and includes test commands to verify the installation. Additionally, the meta.yaml provides metadata such as the package's homepage, license, summary, description, development, and documentation URLs, along with identifiers for biotools and a DOI. The recipe maintainer is also specified in this file.

Possibly related PRs

  • upd orthologer to 3.4.2 #51128: This PR updates the meta.yaml for the orthologer package, which is related to the orthodb package introduced in the main PR, as both deal with orthology and share a common focus on gene mapping.
  • Update orthofinder for 3.0.1b1 beta release #51202: This PR updates the meta.yaml for the orthofinder package, which also relates to orthology and gene mapping, similar to the orthodb package in the main PR.
  • new version #51269: This PR updates the meta.yaml for the orthologer package, which is again related to the orthodb package, reinforcing the connection through shared functionality in orthology.
  • Add seqspec #51326: This PR introduces the seqspec package, which, while not directly related to orthodb, may share common dependencies or use cases in genomic data processing, potentially linking it to the broader context of the main PR's focus on bioinformatics tools.

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

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

9-14: Consider removing run_exports configuration.

The run_exports section is typically used for compiled libraries where ABI compatibility matters. For a pure Python package, this configuration is unnecessary and can be safely removed.

 build:
   number: 0
   noarch: python
-  run_exports:
-    - {{ pin_subpackage('orthodb', max_pin="x") }}

31-34: Consider adding more comprehensive tests.

While the basic import test is good, consider adding more functional tests to verify the API's basic operations. For example:

  • Test API connection
  • Verify basic query functionality
  • Check error handling
 test:
   commands:
     - python -c 'import orthodb; api=orthodb.OdbAPI();'
+    - python -c 'import orthodb; api=orthodb.OdbAPI(); api.ping()'
+    - python -c 'import orthodb; help(orthodb)'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 4e52242 and 6e64a6f.

📒 Files selected for processing (2)
  • recipes/orthodb/build.sh (1 hunks)
  • recipes/orthodb/meta.yaml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • recipes/orthodb/build.sh
🧰 Additional context used
🪛 yamllint
recipes/orthodb/meta.yaml

[error] 30-30: trailing spaces

(trailing-spaces)


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

(syntax)

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

1-8: LGTM: Package metadata is well-structured.

The package metadata section follows conda packaging best practices with proper use of Jinja2 templating.

🧰 Tools
🪛 yamllint

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

(syntax)


15-18: LGTM: Source configuration is correct.

The source URL and checksum are properly configured for GitLab source distribution.


45-51: LGTM: Extra metadata is well-documented.

The extra section includes appropriate identifiers (biotools, DOI, PMID) and correctly lists the recipe maintainer.


35-44: Verify LICENSE file existence.

The meta.yaml references a LICENSE file, but we should verify its existence in the source package.

✅ Verification successful

LICENSE file exists in the source package

The LICENSE file is present in the source package at orthodb_py-0.9.0/LICENSE, confirming the correct reference in meta.yaml.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify the LICENSE file exists in the package
curl -sL https://gitlab.com/ezlab/orthodb_py/-/archive/0.9.0/orthodb_py-0.9.0.tar.gz | tar tz | grep -i license

Length of output: 138

Comment on lines 19 to 30
requirements:
build:
- python >=3.9
- bash >=4.1
host:
- python >=3.9
- pip
- bash >=4.1
run:
- python >=3.9
- bash >=4.1

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

Remove unnecessary Bash dependency requirements

The package only uses Bash in the build script with a simple pip install command that doesn't require any Bash-specific features. The build.sh could easily use sh instead. The Bash dependency in all sections (build, host, run) is unnecessary since:

  1. The package itself is a pure Python package
  2. The build script doesn't use any Bash-specific features
  3. No other shell scripts or Bash usage was found in the package

Please remove the Bash requirements from all sections and fix the trailing whitespace on line 30.

🔗 Analysis chain

Verify Bash dependency requirement.

The inclusion of Bash >=4.1 as a requirement in all sections (build, host, run) is unusual for a Python package. Please verify if this is actually needed for the package functionality.

Also, there's a trailing whitespace on line 30 that should be removed.


Let me generate additional scripts to check for bash script usage specifically in the orthodb package.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the package actually uses bash in its code
rg -l 'subprocess.*bash|os.system.*bash' || echo "No direct bash usage found"

# Check if there are any shell scripts in the package
ast-grep --pattern 'from subprocess import|import subprocess'

Length of output: 11022


Script:

#!/bin/bash
# Check for shell scripts in the orthodb package directory
fd -e sh . recipes/orthodb/

# Check for bash shebang in any files
rg '^#!.*bash' recipes/orthodb/

# Check build.sh and any other scripts for bash-specific features
cat recipes/orthodb/build.sh || echo "No build.sh found"

Length of output: 226

🧰 Tools
🪛 yamllint

[error] 30-30: trailing spaces

(trailing-spaces)

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

19-27: Simplify requirements section

For a pure Python package using noarch: python, the build section requirements are unnecessary. The host and run sections are sufficient.

 requirements:
-  build:
-    - python >=3.9
   host:
     - python >=3.9
     - pip
   run:
     - python >=3.9

28-31: Enhance test coverage and fix formatting

  1. The current test only verifies import and API instantiation. Consider adding more comprehensive tests:
    • Verify basic API functionality
    • Test error handling
  2. Remove trailing whitespace on line 30
 test:
   commands:
-    - python -c 'import orthodb; api=orthodb.OdbAPI();' 
+    - python -c 'import orthodb; api=orthodb.OdbAPI();'
+    - python -c 'from orthodb import __version__; assert __version__ == "0.9.0"'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 6e64a6f and 862004f.

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

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

(syntax)

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

1-8: LGTM! Package metadata is well-structured and follows conda packaging conventions.

🧰 Tools
🪛 yamllint

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

(syntax)


15-18: LGTM! Source configuration is correct and follows best practices.


32-41: LGTM! Package metadata is complete and well-documented.


42-48: LGTM! Extra metadata is properly formatted with appropriate identifiers.

Comment on lines +9 to +14
build:
number: 0
noarch: python
run_exports:
- {{ pin_subpackage('orthodb', max_pin="x") }}

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

Remove unnecessary run_exports configuration

The run_exports section is typically used for compiled libraries where ABI compatibility matters. For a pure Python package, this configuration is unnecessary and could potentially constrain downstream packages unnecessarily.

 build:
   number: 0
   noarch: python
-  run_exports:
-    - {{ pin_subpackage('orthodb', max_pin="x") }}
📝 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
noarch: python
run_exports:
- {{ pin_subpackage('orthodb', max_pin="x") }}
build:
number: 0
noarch: python

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
recipes/orthodb/meta.yaml (1)

32-34: Consider adding offline test cases

The current test creates an API instance which might fail in environments without network access. Consider adding offline tests that verify the package installation without requiring API connectivity.

 test:
   commands:
-    - python -c 'import orthodb; api=orthodb.OdbAPI();'
+    - python -c 'import orthodb'
+    - python -c 'from orthodb import OdbAPI'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 862004f and 2364fd9.

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

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

(syntax)

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

12-13: Remove unnecessary run_exports configuration

The run_exports section is typically used for compiled libraries where ABI compatibility matters. For a pure Python package, this configuration is unnecessary and could potentially constrain downstream packages unnecessarily.


19-31: Verify Python version constraint

The Python >=3.9 requirement seems restrictive. Let's verify if this constraint is actually needed by the package.

#!/bin/bash
# Description: Check for Python version requirements in the package
# Test: Look for version-specific features or explicit version checks
rg -l 'python_requires|requires-python' || echo "No explicit Python version requirement found in package"
ast-grep --pattern 'if sys.version_info $$$:'

15-17: Verify source URL accessibility and checksum

The source URL and checksum configuration look correct. Let's verify the accessibility and integrity of the source.

✅ Verification successful

The previous script didn't execute properly. Let's try again with a focused verification of the source configuration.


Source URL and checksum configuration verified successfully

The verification confirms:

  • The source URL is accessible (HTTP 200 response)
  • The URL template correctly uses the version variable (0.9.0)
  • The sha256 checksum is properly defined
  • The source configuration follows the expected format for GitLab archives
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify source URL accessibility and checksum
# Test: Check if the URL is accessible and returns expected content
curl -sI "https://gitlab.com/ezlab/orthodb_py/-/archive/0.9.0/orthodb_py-0.9.0.tar.gz" | head -n1

Length of output: 5530


Script:

#!/bin/bash
# Let's verify the source URL and checksum properly
curl -sI "https://gitlab.com/ezlab/orthodb_py/-/archive/0.9.0/orthodb_py-0.9.0.tar.gz" | head -n1

# Also check if we can find the version and sha256 values in meta.yaml
cat recipes/orthodb/meta.yaml

Length of output: 1313


40-40: Verify license file existence

Let's verify that the LICENSE file is included in the source package.

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

30-34: Consider adding more comprehensive tests.

While the basic import tests are good, consider adding tests that verify API functionality, such as:

  • Testing connection to the API
  • Basic query operations
 test:
   commands:
     - python -c 'import orthodb'
     - python -c 'from orthodb import OdbAPI'
+    - python -c 'api = OdbAPI(); api.ping()'  # Add basic connectivity test if available
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2364fd9 and 2e54c99.

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

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

(syntax)

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

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

The package metadata section is well-structured using Jinja2 variables for maintainability.

🧰 Tools
🪛 yamllint

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

(syntax)


9-12: LGTM! Build configuration is appropriate.

The build configuration correctly specifies this as a pure Python package with noarch: python.


35-44: LGTM! Package metadata is complete.

The about section provides all necessary metadata including license, documentation, and development URLs.


45-51: LGTM! Extra metadata is well-documented.

The extra section properly includes relevant identifiers (biotools, DOI, PMID) and maintainer information.


13-16: Verify if package is available on PyPI.

While the GitLab source is valid, if the package is available on PyPI, it would be preferred to use that as the source.

✅ Verification successful

GitLab source is appropriate as package is not available on PyPI

The verification shows that:

  1. The package is not available on PyPI (null response from PyPI API)
  2. The GitLab source URL is accessible and valid (HTTP 200 response)

Therefore, using the GitLab repository as the source is the correct approach here.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if package exists on PyPI
curl -s "https://pypi.org/pypi/orthodb/json" | jq -r '.info.version' || echo "Not found on PyPI"

# Verify the GitLab URL is accessible
curl -sI "https://gitlab.com/ezlab/orthodb_py/-/archive/0.9.0/orthodb_py-0.9.0.tar.gz" | head -n1

Length of output: 181

Comment on lines 17 to 29
requirements:
build:
- python >=3.4
- pip
- setuptools
host:
- python >=3.4
- pip
- setuptools
run:
- python >=3.4
- requests

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider updating minimum Python version requirement.

Python 3.4 reached end-of-life in March 2019. Consider updating to a more recent minimum version (e.g., >=3.7) for better security and feature support.

   build:
     - python >=3.4
+    - python >=3.7
     - pip
     - setuptools
   host:
     - python >=3.4
+    - python >=3.7
     - pip
     - setuptools
   run:
     - python >=3.4
+    - python >=3.7
     - requests

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

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

29-30: Consider adding version constraint for requests

The requests package is specified without version constraints. Consider adding a minimum version requirement to ensure compatibility and security updates.

  run:
    - python >=3.7
-    - requests
+    - requests >=2.25.0

32-35: Consider adding functional API tests

The current tests only verify imports. Consider adding basic API functionality tests to ensure the package works as expected.

Example test to add:

  test:
    commands:
      - python -c 'import orthodb'
      - python -c 'from orthodb import OdbAPI'
+     - python -c 'api = OdbAPI(); assert api.get_version() is not None'
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 2e54c99 and 75525a5.

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

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

(syntax)

🔇 Additional comments (1)
recipes/orthodb/meta.yaml (1)

15-17: Verify package name in source URL

The source URL uses orthodb_py while the package name is orthodb. Please verify if this is intentional and if the URL will remain stable.

✅ Verification successful

Source URL is valid and accessible

The GitLab source URL is correct and accessible. The package name difference (orthodb_py vs orthodb) is intentional - it's common for Python packages to have different repository names than their installation names. The HTTP 200 response confirms the URL is stable and working.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify if the URL is accessible and returns the expected content
curl -sI "https://gitlab.com/ezlab/orthodb_py/-/archive/0.9.0/orthodb_py-0.9.0.tar.gz" | head -n1

Length of output: 109

home: https://www.ezlab.org/orthodb_v12_userguide.html
license: GPL3
license_family: GPL3
license_file: LICENSE
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 to the files section

The license_file is specified but there's no files section to ensure it's included in the package.

Add this section after the source section:

files:
  - LICENSE

@berkelem berkelem merged commit e773238 into bioconda:master Nov 6, 2024
6 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants