-
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
Build dialign2 on OSX #51262
Build dialign2 on OSX #51262
Conversation
📝 WalkthroughWalkthroughThe pull request includes modifications to the The Possibly related PRs
Suggested labels
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: 1
🧹 Outside diff range and nitpick comments (3)
recipes/dialign2/build.sh (2)
8-10
: LGTM with a minor suggestion.The addition of INCLUDE_PATH and LIBRARY_PATH exports is good practice. The optimization flag in CFLAGS is also appropriate for release builds. However, including the library path in CFLAGS is redundant since LIBRARY_PATH is already set.
Consider removing the redundant library path from CFLAGS:
-export CFLAGS="${CFLAGS} -O3 -L${PREFIX}/lib" +export CFLAGS="${CFLAGS} -O3"
12-16
: Good addition for macOS compatibility, with a minor improvement.The macOS-specific flags to suppress implicit function declaration warnings are a good addition for cross-platform compatibility. However, the else case is unnecessary as it doesn't modify CFLAGS.
Consider simplifying the conditional block by removing the unnecessary else case:
if [[ `uname` == "Darwin" ]]; then export CFLAGS="${CFLAGS} -Wno-implicit-int -Wno-implicit-function-declaration" -else - export CFLAGS="${CFLAGS}" firecipes/dialign2/meta.yaml (1)
13-13
: Remove trailing spaceThere is a trailing space at the end of line 13. While this doesn't affect functionality, it's good practice to remove trailing spaces for consistency and to avoid potential issues in some systems.
Please remove the trailing space at the end of this line:
- patches: + patches:🧰 Tools
🪛 yamllint
[error] 13-13: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- recipes/dialign2/build.sh (1 hunks)
- recipes/dialign2/meta.yaml (2 hunks)
- recipes/dialign2/patches/patchdialign.txt (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- recipes/dialign2/patches/patchdialign.txt
🧰 Additional context used
🪛 Shellcheck
recipes/dialign2/build.sh
[warning] 20-20: The surrounding quotes actually unquote this. Remove or escape them.
(SC2027)
🪛 yamllint
recipes/dialign2/meta.yaml
[error] 13-13: trailing spaces
(trailing-spaces)
🔇 Additional comments (9)
recipes/dialign2/build.sh (3)
23-23
: Excellent improvements to the make command.The changes to the make command are all positive:
- Using
${CC}
allows for flexibility in choosing the compiler.- Including
${CFLAGS}
ensures that the previously set flags are used during compilation.- The
-j"${CPU_COUNT}"
flag enables parallel build, which can significantly speed up the build process on multi-core systems.These modifications enhance the build process's flexibility and efficiency.
24-24
: LGTM: Proper file permissions and location.The chmod command correctly sets the executable permission for the dialign2-2 binary, which is crucial for its proper functioning. Moving the binary to ${PREFIX}/bin ensures it's in the correct location for conda to manage it. These are both good practices in package management.
Line range hint
1-24
: Summary: Successful implementation of OSX support with room for minor improvements.The changes in this build script successfully address the PR objective of building dialign2 on OSX (macOS). The modifications enhance cross-platform compatibility, improve build flexibility, and increase build efficiency. Key improvements include:
- Addition of necessary environment variables.
- OS-specific compiler flags for macOS.
- More flexible installation paths.
- Improved make command with parallel build support.
While the changes are generally good, there are a few minor suggestions for improvement:
- Remove the redundant library path from CFLAGS.
- Simplify the conditional block for OS-specific flags.
- Fix the quoting issue in the sed command.
These minor adjustments will further refine the build process. Overall, this PR successfully achieves its goal of adding OSX support for dialign2.
🧰 Tools
🪛 Shellcheck
[warning] 20-20: The surrounding quotes actually unquote this. Remove or escape them.
(SC2027)
recipes/dialign2/meta.yaml (6)
9-9
: LGTM: Updated to HTTPS URLUpdating the source URL to use HTTPS is a good security practice. This change ensures that the package is downloaded over an encrypted connection.
15-17
: LGTM: Build number increment and run_exports addition
- The build number increment is correct, as it reflects the changes made to the package.
- The addition of the
run_exports
section with{{ pin_subpackage('dialign2', max_pin="x") }}
is a good practice. This ensures that whendialign2
is used as a dependency in other packages, the correct version constraints are automatically applied. Themax_pin="x"
allows for minor version updates but prevents major version changes, which helps maintain compatibility.These changes improve the package's versioning and dependency management.
26-26
: LGTM: Improved formatting in test commandThe addition of a space before the
grep
command in the test section improves readability and consistency in the YAML file. This is a minor but positive change that doesn't affect functionality.
29-33
: LGTM: Improved metadata in the about sectionThe changes in the about section enhance the package metadata:
- Updating the home URL to HTTPS improves security.
- Adding quotation marks around string values improves YAML consistency.
- Adding a period at the end of the summary improves readability.
- The new
doc_url
field provides users with a direct link to the package documentation, which is very helpful.These changes improve the overall quality and user-friendliness of the package metadata.
37-38
: LGTM: Updated and added identifiersThe changes in the identifiers section improve the package's metadata:
- Changing the DOI format to lowercase (
doi:10.1093/nar/gkt283
) aligns with the more commonly used and preferred format for DOIs.- Adding the
biotools:dialign
identifier provides an additional reference to the Bio.tools registry, which is valuable for bioinformatics tools.These updates enhance the discoverability and cross-referencing of the package across different platforms and registries.
Line range hint
1-38
: Overall LGTM: Improved package metadata and configurationThe changes made to this
meta.yaml
file significantly improve thedialign2
package:
- Enhanced security by updating URLs to HTTPS.
- Improved version management with the build number increment and
run_exports
addition.- Better metadata with updated and additional identifiers.
- Increased consistency in YAML formatting.
- Added documentation URL for improved user reference.
These updates align well with Conda packaging best practices and enhance the overall quality of the package. Great job on these improvements!
else | ||
export CFLAGS="${CFLAGS}" | ||
fi | ||
|
||
cd src | ||
|
||
sed -i.bak "s|strcpy ( dialign_dir , \"DIALIGN2_DIR\" );|strcpy ( par_dir , \""${PREFIX}"/share/dialign2\" );|g" dialign.c |
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.
Good improvement for installation flexibility, but watch out for quoting.
The use of ${PREFIX} in the sed command allows for a more flexible installation path, which is good practice and aligns with conda build conventions.
However, the static analysis tool flagged a potential issue with quoting. The surrounding quotes are actually unquoting the inner quotes, which may lead to unexpected behavior. To fix this, you can escape the inner quotes:
-sed -i.bak "s|strcpy ( dialign_dir , \"DIALIGN2_DIR\" );|strcpy ( par_dir , \""${PREFIX}"/share/dialign2\" );|g" dialign.c
+sed -i.bak "s|strcpy ( dialign_dir , \"DIALIGN2_DIR\" );|strcpy ( par_dir , \"${PREFIX}/share/dialign2\" );|g" dialign.c
📝 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.
sed -i.bak "s|strcpy ( dialign_dir , \"DIALIGN2_DIR\" );|strcpy ( par_dir , \""${PREFIX}"/share/dialign2\" );|g" dialign.c | |
sed -i.bak "s|strcpy ( dialign_dir , \"DIALIGN2_DIR\" );|strcpy ( par_dir , \"${PREFIX}/share/dialign2\" );|g" dialign.c |
🧰 Tools
🪛 Shellcheck
[warning] 20-20: The surrounding quotes actually unquote this. Remove or escape them.
(SC2027)
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>
.