-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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 deepchopper-cli #51780
Add deepchopper-cli #51780
Conversation
📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces two main files: Possibly related PRs
Suggested labels
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/deepchopper-cli/build.sh (1 hunks)
- recipes/deepchopper-cli/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/deepchopper-cli/meta.yaml
[error] 38-38: trailing spaces
(trailing-spaces)
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
🔇 Additional comments (3)
recipes/deepchopper-cli/build.sh (3)
1-5
: LGTM! Good error handling setup.
The script properly uses set -ex
for strict error handling and command tracing, which is essential for debugging build issues.
1-19
: Verify compliance with Bioconda build requirements.
As this is a Bioconda recipe, please ensure:
- The build process is reproducible across different platforms
- All build dependencies are properly declared in meta.yaml
- The package follows Bioconda's guidelines for CLI tools
#!/bin/bash
# Check if meta.yaml includes all necessary build dependencies
rg -l 'rust-.*|maturin' recipes/*/meta.yaml
# Check for similar Rust-based CLI tools in Bioconda
rg -l 'rust.*toolchain' recipes/*/build.sh
7-9
: Verify if macOS temporary home directory is needed.
The commented code for creating a temporary home directory on macOS is a common pattern in Bioconda recipes. Please verify if this is necessary for macOS builds of deepchopper-cli.
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly --profile=minimal -y | ||
|
||
export PATH="$HOME/.cargo/bin:$PATH" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using stable Rust toolchain for better reproducibility.
Using the nightly toolchain could lead to build reproducibility issues as it changes frequently. Consider:
- Using the stable toolchain unless nightly is specifically required
- Pinning the exact nightly version if it's necessary
- Adding checksum verification for the rustup script
If nightly is required, consider pinning the version:
-curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly --profile=minimal -y
+curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-01-01 --profile=minimal -y
Committable suggestion was skipped due to low confidence.
recipes/deepchopper-cli/build.sh
Outdated
cd py_cli | ||
|
||
maturin build --interpreter python --release -b bin | ||
|
||
$PYTHON -m pip install target/wheels/*.whl --no-deps --ignore-installed -vv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add directory checks and improve wheel installation.
The build process could be more robust with the following improvements:
- Verify the py_cli directory exists
- Clean up build artifacts after installation
- Use a more specific wheel path pattern
Consider this improved version:
-cd py_cli
-maturin build --interpreter python --release -b bin
-$PYTHON -m pip install target/wheels/*.whl --no-deps --ignore-installed -vv
+if [ ! -d "py_cli" ]; then
+ echo "Error: py_cli directory not found"
+ exit 1
+fi
+
+cd py_cli
+maturin build --interpreter python --release -b bin
+
+WHEEL_PATH=$(find target/wheels -name "*.whl" -type f)
+if [ -z "$WHEEL_PATH" ]; then
+ echo "Error: No wheel file found"
+ exit 1
+fi
+
+$PYTHON -m pip install "$WHEEL_PATH" --no-deps --ignore-installed -vv
+
+# Clean up build artifacts
+rm -rf target/
📝 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.
cd py_cli | |
maturin build --interpreter python --release -b bin | |
$PYTHON -m pip install target/wheels/*.whl --no-deps --ignore-installed -vv | |
if [ ! -d "py_cli" ]; then | |
echo "Error: py_cli directory not found" | |
exit 1 | |
fi | |
cd py_cli | |
maturin build --interpreter python --release -b bin | |
WHEEL_PATH=$(find target/wheels -name "*.whl" -type f) | |
if [ -z "$WHEEL_PATH" ]; then | |
echo "Error: No wheel file found" | |
exit 1 | |
fi | |
$PYTHON -m pip install "$WHEEL_PATH" --no-deps --ignore-installed -vv | |
# Clean up build artifacts | |
rm -rf target/ |
There was a problem hiding this 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/deepchopper-cli/meta.yaml (3)
19-32
: Consider adding version constraints for dependencies.
While maturin has version constraints, other dependencies like setuptools-rust and setuptools should also have version constraints to ensure reproducible builds.
Consider adding version constraints like:
host:
- python
- pip
- maturin >=1.2.1,<2
- - setuptools-rust
- - setuptools
+ - setuptools-rust >=1.0
+ - setuptools >=65.0
35-38
: Enhance test coverage and fix formatting.
- Consider adding more test commands to verify key functionality.
- Remove trailing whitespace on line 38.
Suggested additional tests:
test:
commands:
- deepchopper-chop -h
- deepchopper-chop --version
# Add more commands to test core functionality
🧰 Tools
🪛 yamllint
[error] 38-38: trailing spaces
(trailing-spaces)
51-56
: Consider adding more maintainers.
Having multiple maintainers helps ensure long-term maintenance of the package. Consider adding more maintainers from the development team.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/deepchopper-cli/build.sh (1 hunks)
- recipes/deepchopper-cli/meta.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- recipes/deepchopper-cli/build.sh
🧰 Additional context used
🪛 yamllint
recipes/deepchopper-cli/meta.yaml
[error] 38-38: trailing spaces
(trailing-spaces)
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
🔇 Additional comments (4)
recipes/deepchopper-cli/meta.yaml (4)
1-3
: LGTM! Package metadata is well-defined.
The package name follows conda naming conventions, and the version and checksum are properly specified.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
13-17
: LGTM! Build configuration is well-structured.
The build section correctly:
- Sets build number to 0 for new package
- Constrains Python version appropriately
- Uses run_exports for version pinning
39-49
: LGTM! About section is comprehensive.
All required metadata fields are present with clear descriptions and appropriate license information.
9-11
: Verify the source URL format.
The package name in the URL uses an underscore (deepchopper_cli
) while the package name is defined with a hyphen (deepchopper-cli
). Please verify that this is the correct URL format on PyPI.
✅ Verification successful
Let me try another verification approach to check both URL formats and get more information.
Let me try one final verification by checking the actual PyPI API to determine the correct package name and URL format.
Source URL format is correct
The current source URL format using deepchopper_cli
in the tarball name is correct. This is verified through the PyPI API which shows the official source distribution URL uses underscore format: deepchopper_cli-1.2.5.tar.gz
. While the package name uses a hyphen, the source distribution tarball name consistently uses an underscore.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the PyPI package URL exists and is accessible
curl -s -I "https://pypi.io/packages/source/d/deepchopper-cli/deepchopper_cli-1.2.5.tar.gz" | head -n 1
Length of output: 115
Script:
#!/bin/bash
# Check both hyphen and underscore variants
echo "Checking URL with hyphens:"
curl -s -I "https://pypi.io/packages/source/d/deepchopper-cli/deepchopper-cli-1.2.5.tar.gz" | head -n 1
echo -e "\nChecking URL with underscores:"
curl -s -I "https://pypi.io/packages/source/d/deepchopper-cli/deepchopper_cli-1.2.5.tar.gz" | head -n 1
# Check if we can find the actual package name format in the meta.yaml
echo -e "\nChecking package name in meta.yaml:"
cat recipes/deepchopper-cli/meta.yaml | grep "name:"
# Let's also check if there's a setup.py or pyproject.toml that might indicate the correct package name
echo -e "\nLooking for setup files:"
fd "setup.py|pyproject.toml" recipes/deepchopper-cli/
Length of output: 659
Script:
#!/bin/bash
# Query PyPI API for the package information
echo "Querying PyPI API for deepchopper-cli:"
curl -s "https://pypi.org/pypi/deepchopper-cli/json" | jq -r '.urls[] | select(.packagetype=="sdist") | .url'
echo -e "\nQuerying PyPI API for deepchopper_cli:"
curl -s "https://pypi.org/pypi/deepchopper_cli/json" | jq -r '.urls[] | select(.packagetype=="sdist") | .url'
Length of output: 671
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @cauliyang!
Describe your pull request here
A CLI for Language models identify chimeric artificial reads in NanoPore direct-RNA sequencing data.
Please read the guidelines for Bioconda recipes before opening a pull request (PR).
General instructions
@BiocondaBot please add label
command.@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:with
...
being one of:{{ pin_subpackage("myrecipe", max_pin="x") }}
{{ pin_subpackage("myrecipe", max_pin="x.x") }}
{{ pin_subpackage("myrecipe", max_pin="x.x") }}
(in such a case, please add a note that shortly mentions your evidence for that){{ pin_subpackage("myrecipe", max_pin="x.x.x") }}
(in such a case, please add a note that shortly mentions your evidence for that){{ pin_subpackage("myrecipe", max_pin=None) }}
while replacing
"myrecipe"
with eithername
if aname|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
@BiocondaBot please add label
please review & merge
label.@BiocondaBot please fetch artifacts
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>
.