-
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 recipe for sizemeup #51033
add recipe for sizemeup #51033
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p $PREFIX/bin ${PREFIX}/share/sizemeup | ||
|
||
# Install sizemup library | ||
$PYTHON -m pip install --no-deps --ignore-installed -vv . | ||
|
||
# move main executable, and replace with wrapper | ||
chmod 755 bin/sizemeup-bioconda | ||
mv $PREFIX/bin/sizemeup $PREFIX/bin/sizemeup-main | ||
cp -f bin/sizemeup-bioconda $PREFIX/bin/sizemeup | ||
|
||
# Copy genome size database (~100kb) | ||
cp -f data/sizemeup-sizes.txt ${PREFIX}/share/sizemeup | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{% set name = "sizemeup" %} | ||
{% set version = "1.0.0" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://github.com/rpetit3/sizemeup/archive/v{{ version }}.tar.gz | ||
sha256: f8307bd4c9fb7b404046c87e18f1811daeefe9e8d431c0ea55e6adc004008338 | ||
|
||
build: | ||
number: 0 | ||
noarch: generic | ||
run_exports: | ||
- {{ pin_subpackage(name, max_pin='x.x') }} | ||
|
||
requirements: | ||
host: | ||
- python >=3.12 | ||
- poetry | ||
- pip | ||
run: | ||
- python >=3.12 | ||
- requests | ||
- rich-click >=1.6.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adjusting Python version constraint and host requirements. While the requirements are generally well-defined, there are two points to consider:
Suggested changes: requirements:
host:
- python >=3.7
- pip
run:
- python >=3.7
- requests
- rich-click >=1.6.0 If there are specific reasons for the current choices, please provide more context. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one should include poetry There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rpetit3, understood regarding including Regarding the Python version constraint of ✏️ Learnings added
🧠 Learnings used
|
||
|
||
test: | ||
imports: | ||
- sizemeup | ||
commands: | ||
- pip check | ||
- sizemeup --version | ||
- sizemeup --help | ||
- sizemeup --species "Staphylococcus aureus" | ||
- sizemeup-build --help | ||
requires: | ||
- pip | ||
Comment on lines
+28
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Remove undefined The
🔗 Analysis chainLGTM! Please clarify the sizemeup-build command. The test section is well-defined and comprehensive, covering import checks, pip check, and various CLI functionalities. Could you please provide more information about the To verify the existence and purpose of this command, we can check the project's documentation: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for sizemeup-build documentation
rg -i 'sizemeup-build' README.md || echo "No mention of sizemeup-build in README.md"
Length of output: 125 Script: #!/bin/bash
# Description: Search for the implementation of 'sizemeup-build' in the codebase
rg -i 'sizemeup-build' src/ || echo "sizemeup-build command not found in the src directory"
Length of output: 189 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AI growing pains, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rpetit3 Thank you for the clarification! I apologize for the oversight. I'll make sure to remember that (>_<) Sorry for the confusion. ✏️ Learnings added
Comment on lines
+28
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Consider adjusting the specific use case test. The test section is comprehensive and well-structured. However, there's a potential issue to address: The specific use case test on line 35: - sizemeup --species "Staphylococcus aureus" might fail due to the permission error mentioned in the PR comments. This error occurs when the tool attempts to write the output file. Consider modifying this test to avoid the permission issue. You could:
For example: - sizemeup --species "Staphylococcus aureus" --output /tmp/sizemeup_test_output.txt or - sizemeup --species "Staphylococcus aureus" > /dev/null Please choose the most appropriate option based on the tool's capabilities and the desired test coverage. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not affect the tests and was corrected in the source of sizemeup There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rpetit3, thank you for the clarification. It's great to hear that the permission issue has been corrected in the source of sizemeup and does not affect the tests. (・_・)? ✏️ Learnings added
🧠 Learnings used
If you found this review helpful, would you consider giving us a shout-out on X? |
||
|
||
about: | ||
home: https://github.com/rpetit3/sizemeup | ||
summary: A simple tool to determine the genome size of an organism | ||
license: MIT | ||
license_file: LICENSE | ||
|
||
extra: | ||
recipe-maintainers: | ||
- rpetit3 |
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
Consider adding overall error handling and logging.
While the script is functional and follows Bioconda conventions, it could benefit from some overall improvements:
Here's an example of how you could implement these improvements:
This version of the script includes logging, error handling, and a cleanup function to make the installation process more robust and easier to debug.
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.
I'm going to pass on this recommendation as it makes the
build.sh
way more complex then it really needs to beThere 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.
@rpetit3, understood, thank you for letting me know.
(_/)
( •_•)
💧
✏️ Learnings added