-
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
Update Earl Grey build.sh #51324
Update Earl Grey build.sh #51324
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request includes changes to the In the Possibly related PRs
Suggested reviewers
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: 0
🧹 Outside diff range and nitpick comments (1)
recipes/earlgrey/build.sh (1)
Line range hint
54-58
: Permissions set correctly, but consider restricting write accessThe addition of explicit permission settings is a good practice to ensure that all necessary files are executable. However, the
chmod a+w ${SCRIPT_DIR}/repeatCraft/example
command grants write permissions to all users, which might be overly permissive.Consider using a more restrictive permission setting for the
repeatCraft/example
directory, such as:chmod u+w ${SCRIPT_DIR}/repeatCraft/example
This would grant write permissions only to the owner of the directory, which is typically sufficient and more secure.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/earlgrey/build.sh (1 hunks)
- recipes/earlgrey/meta.yaml (1 hunks)
🧰 Additional context used
🔇 Additional comments (7)
recipes/earlgrey/meta.yaml (2)
14-14
: Build number increment looks good.The build number has been correctly incremented from 0 to 1. This is the appropriate action when making changes to a package without altering its version number.
Line range hint
1-85
: No other changes detected. Verify package integrity.Apart from the build number increment, no other changes are visible in this file. This is consistent with the PR objectives and AI summary. However, it's always good to verify that the package still builds and functions correctly after any change.
To ensure the package integrity, you can run the following commands:
These commands will help ensure that the package can still be built and installed correctly after the build number change.
recipes/earlgrey/build.sh (5)
50-50
: LGTM: Correct path set for STRAIN_SCRIPTSThis change correctly sets the STRAIN_SCRIPTS variable to the appropriate path within the package directory structure. It's consistent with other path updates in the script and should ensure that the TEstrainer script can locate its dependencies correctly.
Line range hint
61-61
: LGTM: Proper extraction of tRNAdbThe addition of this line correctly extracts the tRNAdb tarball required for LTR_FINDER functionality. The command is well-structured, extracting to the correct directory and cleaning up the tarball afterward, which is a good practice for managing disk space.
Line range hint
64-64
: Clarify the purpose of the disk space checkThe addition of
df -h
seems out of place in this context. It's not clear why a disk space check is necessary at this point in the build process, and the output isn't being used or logged.Could you please clarify the purpose of this disk space check? If it's not essential, consider removing it. If it is needed, consider adding a comment explaining its purpose or implementing a more comprehensive check that acts on the information. For example:
# Check if there's sufficient disk space for the build process if [ $(df -P . | awk 'NR==2 {print $4}') -lt 1000000 ]; then echo "Error: Insufficient disk space. At least 1GB free space is required." exit 1 fiThis would check if there's at least 1GB of free space and exit with an error if not.
Line range hint
67-76
: LGTM: Proper management of PERL5LIB environment variableThe addition of activation and deactivation scripts for conda is an excellent practice. These scripts correctly manage the PERL5LIB environment variable, ensuring that the necessary paths for RepeatMasker and RepeatModeler are available when the environment is activated and cleaned up when deactivated.
This approach helps maintain a clean environment and prevents potential conflicts with other Perl installations or packages.
Line range hint
1-81
: Overall, the changes improve the build process with one point for clarificationThe modifications to this build script generally enhance its functionality and cross-platform compatibility. Key improvements include:
- Consistent setting of the SCRIPT_DIR variable.
- Explicit permission settings for executables and directories.
- Proper extraction of the tRNAdb for LTR_FINDER.
- Implementation of conda activation/deactivation scripts for managing the PERL5LIB environment variable.
These changes should result in a more robust and reliable build process. However, the addition of the disk space check (
df -h
) requires clarification or potential removal if it's not serving a specific purpose.Please address the comment regarding the disk space check to complete this review.
@BiocondaBot please add label |
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 (2)
recipes/earlgrey/build.sh (2)
48-52
: LGTM: Consistent script directory path updatesThese changes ensure that the
SCRIPT_DIR
variable is consistently set across all relevant scripts, including the newly addedearlGreyAnnotationOnly
. This improves the overall consistency and maintainability of the package.Consider using a loop to apply these changes to reduce code duplication:
for script in ${PACKAGE_HOME}/earlGrey ${PACKAGE_HOME}/earlGreyLibConstruct ${PACKAGE_HOME}/earlGreyAnnotationOnly ${SCRIPT_DIR}/rcMergeRepeat* ${SCRIPT_DIR}/headSwap.sh ${SCRIPT_DIR}/autoPie.sh; do sed -i.bak "s|SCRIPT_DIR=.*|SCRIPT_DIR=${SCRIPT_DIR}|g" "$script" doneThis approach would make future additions or removals easier to manage.
Line range hint
58-62
: LGTM: Consistent permission settingsThe addition of permission settings for
earlGreyAnnotationOnly
and other scripts ensures that all necessary files are executable. This is crucial for the correct functioning of the package.Consider using a more concise approach to set permissions:
chmod +x ${PACKAGE_HOME}/earlGrey* chmod +x ${SCRIPT_DIR}/TEstrainer/TEstrainer_for_earlGrey.sh ${SCRIPT_DIR}/* ${SCRIPT_DIR}/bin/LTR_FINDER.x86_64-1.0.7/ltr_finder chmod a+w ${SCRIPT_DIR}/repeatCraft/exampleThis approach reduces redundancy and makes it easier to maintain if new scripts are added in the future.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- recipes/earlgrey/build.sh (3 hunks)
🧰 Additional context used
🔇 Additional comments (5)
recipes/earlgrey/build.sh (5)
30-30
: LGTM: Consistent removal of conda environment name checkThis change aligns with the modifications made to other scripts, removing the check for a specific conda environment name. This improves flexibility and allows users to use custom environment names.
33-33
: LGTM: Consistentsed
command update for cross-platform compatibilityThe inclusion of
earlGreyAnnotationOnly
in thesed
command modification ensures consistent behavior across Linux and macOS for all relevant scripts. This change improves the overall robustness of the build process.
85-85
: LGTM: Consistent symbolic link creationThe addition of a symbolic link for
earlGreyAnnotationOnly
in the bin directory is consistent with the treatment of other main scripts. This ensures that the script is easily accessible from the command line, improving the overall usability of the package.
Line range hint
1-85
: Please clarify the impact of parameter removals and provide rationale for new additions
The script removes the
-pa
parameter from RepeatClassifier and the-t
parameter from sa-ssr. Could you please explain the reasoning behind these changes and their potential impact on the tool's functionality or performance?A new extraction step for
tRNAdb
has been added. Can you provide more context on why this is necessary and how it affects the package's functionality?The addition of activation and deactivation scripts for conda to manage the
PERL5LIB
environment variable is a good practice. However, could you confirm if this change is backwards compatible with existing installations?To ensure these changes don't introduce unintended consequences, please run the following tests:
#!/bin/bash # Test RepeatClassifier without -pa parameter RepeatClassifier -h | grep "\-pa" # Test sa-ssr without -t parameter sa-ssr -h | grep "\-t" # Verify tRNAdb extraction ls ${SCRIPT_DIR}/bin/LTR_FINDER.x86_64-1.0.7/tRNAdb* # Test PERL5LIB setting source ${PREFIX}/etc/conda/activate.d/${PKG_NAME}_activate.sh echo $PERL5LIB source ${PREFIX}/etc/conda/deactivate.d/${PKG_NAME}_deactivate.sh echo $PERL5LIB
Line range hint
1-85
: Security considerations for file permissions and tarball extractionWhile the script appears to handle permissions and symbolic links appropriately, please consider the following security-related suggestions:
Ensure that the permissions set on files and directories are as restrictive as possible while still allowing the package to function correctly.
For the tarball extraction, consider adding safeguards against potential security risks:
tar --strip-components=1 -C ${SCRIPT_DIR}/bin/LTR_FINDER.x86_64-1.0.7 -zxf ${SCRIPT_DIR}/bin/LTR_FINDER.x86_64-1.0.7/tRNAdb.tar.gzThis approach limits the extraction to a specific directory and removes the top-level directory from the archive, reducing the risk of unintended file placement.
Verify the integrity of the tRNAdb.tar.gz file before extraction, if possible, by checking its checksum against a known good value.
To ensure proper file permissions, please run the following command after the build process:
Review the output to confirm that no files or directories have overly permissive settings (e.g., world-writable).
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 @TobyBaril!
Describe your pull request here
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>
.