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 pyhmmsearch #51419

Closed
wants to merge 12 commits into from
43 changes: 43 additions & 0 deletions recipes/pyhmmsearch/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% set name = "pyhmmsearch" %}
{% set version = "2024.7.29" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/pyhmmsearch-{{ version }}.tar.gz
sha256: 5134759a9053a9c3f52ab6c3d672094915292d431f734074d1d33021138c75ec

build:
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
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

Reconsider the use of --no-deps --no-build-isolation flags.

The build script uses --no-deps --no-build-isolation flags, which may prevent necessary dependencies from being installed during the build process. This could lead to build failures or runtime issues if required packages are not present in the environment.

Consider removing these flags unless there's a specific reason for their inclusion. If they are necessary, please provide a justification in a comment.

-  script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
+  script: {{ PYTHON }} -m pip install . -vv
📝 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
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
script: {{ PYTHON }} -m pip install . -vv

number: 0
entry_points:
- pyhmmsearch.py=pyhmmsearch/pyhmmsearch.py
- reformat_pyhmmsearch.py=reformat_pyhmmsearch.py
- serialize_hmm_models.py=serialize_hmm_models.py
run_exports:
- {{ pin_subpackage("pyhmmsearch", max_pin="x.x") }}
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

Potential Issues with --no-deps --no-build-isolation Flags

The use of --no-deps --no-build-isolation in the build script may prevent necessary dependencies from being installed during the build process. Since setup.py specifies install_requires, omitting dependencies could lead to build failures or runtime issues if required packages are not already present in the environment.

🔗 Analysis chain

LGTM! Verify the necessity of build script flags.

The build section is well-defined, with correct entry points and run_exports implementation. However, please verify if the --no-deps --no-build-isolation flags in the build script are necessary for this package. These flags prevent pip from installing or building dependencies, which might lead to issues if the package requires any build-time dependencies.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if the package has any build-time dependencies that might be affected by the --no-deps flag.

# Test: Search for setup.py or pyproject.toml to check build-time dependencies
fd -e py -e toml '(setup|pyproject)' | xargs cat

Length of output: 4708



requirements:
host:
- python
- pip
run:
- python
- pyhmmer >=0.10.12
- pandas
- tqdm
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 adding version constraints for pandas and tqdm.

While you've specified a version constraint for pyhmmer, the pandas and tqdm dependencies don't have any version specifications. To ensure compatibility and reproducibility, it's generally a good practice to specify version constraints for all dependencies.

Consider adding version constraints like this:

  run:
    - python
    - pyhmmer >=0.10.12
-   - pandas
-   - tqdm
+   - pandas >=1.0.0
+   - tqdm >=4.0.0

Please adjust the version numbers according to the minimum versions required by your package.

📝 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
requirements:
host:
- python
- pip
run:
- python
- pyhmmer >=0.10.12
- pandas
- tqdm
requirements:
host:
- python
- pip
run:
- python
- pyhmmer >=0.10.12
- pandas >=1.0.0
- tqdm >=4.0.0


test:
commands:
- pyhmmsearch.py -h
- reformat_pyhmmsearch.py -h
- serialize_hmm_models.py -h
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 adding more comprehensive tests.

The current test commands check if the scripts can be executed with the -h flag, which is a good basic check. However, more comprehensive tests could provide better assurance of package functionality.

Consider adding tests that:

  1. Execute the scripts with sample inputs
  2. Verify expected outputs
  3. Check for specific functionalities

For example, you could add:

  commands:
    - pyhmmsearch.py -h
    - reformat_pyhmmsearch.py -h
    - serialize_hmm_models.py -h
    - python -c "import pyhmmsearch; assert pyhmmsearch.__version__ == '{{ version }}'"
    # Add more specific functional tests here

This addition checks if the package can be imported and if the version is correct. Add more specific tests based on the package's functionality.


about:
home: https://github.com/new-atlantis-labs/pyhmmsearch-stable
summary: Fast implementation of HMMSEARCH optimized for high-memory systems using PyHmmer
license: MIT
license_file: LICENSE
Loading