-
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 consensify #50969
Add recipe for consensify #50969
Conversation
📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe changes introduce a new shell script, Changes
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: 2
🧹 Outside diff range and nitpick comments (7)
recipes/consensify/build.sh (2)
9-10
: Linking step is correct, with a minor suggestionThe linking step is well-structured, correctly using environment variables and explicitly linking against zlib.
For consistency with the compilation step, consider using
${CXX}
instead of${CXX}
for the linking command:-${CXX} consensify_c.o -o consensify_c -lz ${LDFLAGS} +${CXX} consensify_c.o -o consensify_c -lz ${LDFLAGS}This change doesn't affect functionality but maintains consistent style throughout the script.
12-14
: Installation step is correct, with a minor suggestion for robustnessThe installation step correctly creates the bin directory and copies the executable to the appropriate location.
For added robustness, consider using the
-p
option withcp
as well:-cp consensify_c ${PREFIX}/bin/consensify_c +cp -p consensify_c "${PREFIX}/bin/consensify_c"This change preserves the executable permissions and uses quotes to handle potential spaces in the path. While unlikely in this context, it's a good practice for shell scripts.
recipes/consensify/meta.yaml (5)
7-9
: LGTM: Source URL and checksum are correctly defined.The source URL and SHA256 checksum are correctly specified. Using the version variable in the URL is a good practice for maintainability.
Consider adding a comment above the
sha256
line to remind contributors to update the checksum when the version changes. For example:source: url: https://github.com/jlapaijmans/Consensify/archive/refs/tags/{{ version }}.tar.gz # Remember to update the checksum when changing the version sha256: 2b88cda2c6ad44b6fd749d86485d3f16418b189b9c8ff4d20dd19640792dac1e
11-14
: LGTM: Build section is well-defined.The build number is correctly set to 0 for a new package. The use of
run_exports
withpin_subpackage
is good for maintaining ABI compatibility.Consider adding a
script
section to specify how the package should be built. For C++ projects, this typically involves usingmake
orcmake
. For example:build: number: 0 script: - mkdir build - cd build - cmake .. - make - make install run_exports: - {{ pin_subpackage('consensify', max_pin="x") }}Please adjust the build commands according to the actual build process of the Consensify project.
22-24
: LGTM with suggestions: Test section could be more comprehensive.The current test command is a good basic smoke test, checking if the
consensify_c
executable can run with the-h
option.Consider adding more comprehensive tests:
Check if the executable exists:
- test -f $PREFIX/bin/consensify_c # [unix] - if not exist %PREFIX%\\Scripts\\consensify_c.exe exit 1 # [win]Run a small example dataset if available:
- consensify_c --input test_data.fastq --output test_output.fastq # adjust parameters as neededCheck the version:
- consensify_c --version
These additional tests would provide more confidence in the correct installation and functionality of the package.
26-33
: LGTM: About section is comprehensive.The about section includes all required metadata fields and provides good information about the package.
Consider adding a
license_family
field to make it easier for automated tools to categorize the license. For GPL-3.0, you can add:about: ... license: GPL-3.0 license_family: GPL ...Also, consider adding a
description
field with a more detailed explanation of the package, separate from thesummary
. This can help users understand the package better when viewing it in conda repositories.
21-21
: Minor: Remove trailing spaces.There are trailing spaces on this line. Please remove them to improve code cleanliness.
- +🧰 Tools
🪛 yamllint
[error] 21-21: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/consensify/build.sh (1 hunks)
- recipes/consensify/meta.yaml (1 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/consensify/build.sh
[warning] 4-4: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
🪛 yamllint
recipes/consensify/meta.yaml
[error] 21-21: trailing spaces
(trailing-spaces)
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
🔇 Additional comments (3)
recipes/consensify/build.sh (2)
6-7
: Compilation step looks goodThe compilation step is well-structured, using environment variables for flexibility and including the current directory in the header search path.
1-14
: Overall, the build script is well-structured and functionalThis build script for consensify covers all necessary steps (compilation, linking, and installation) and follows good practices such as using environment variables for flexibility. The minor suggestions provided in the review will enhance its robustness and consistency, but the script is already in a good state to serve its purpose in the Bioconda recipe.
🧰 Tools
🪛 Shellcheck
[warning] 4-4: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
recipes/consensify/meta.yaml (1)
1-5
: LGTM: Package and version are correctly defined.The use of a Jinja2 variable for the version is a good practice for maintainability. The package name and version are correctly defined.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
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/consensify/meta.yaml (2)
24-26
: LGTM: Basic test is present. Consider adding more comprehensive tests.The current test command checks if the
consensify_c
executable runs without errors, which is a good basic test. However, if possible, consider adding more comprehensive tests to verify the functionality of the package.
23-23
: Remove trailing spaces.There are trailing spaces on this line. Please remove them to improve code cleanliness.
🧰 Tools
🪛 yamllint
[error] 23-23: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/consensify/build.sh (1 hunks)
- recipes/consensify/meta.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- recipes/consensify/build.sh
🧰 Additional context used
🪛 yamllint
recipes/consensify/meta.yaml
[error] 23-23: trailing spaces
(trailing-spaces)
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
🔇 Additional comments (6)
recipes/consensify/meta.yaml (6)
1-5
: LGTM: Package and version are correctly defined.The package name and version are properly set. Using a Jinja2 variable for the version is a good practice for maintainability.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
7-9
: LGTM: Source information is correctly specified.The source URL and SHA256 checksum are properly defined. Using the version variable in the URL is a good practice for consistency.
11-14
: LGTM: Build section is properly configured.The build number is correctly set to 0 for a new package. The
run_exports
section is using the recommended syntax for pinning, which helps ensure compatibility with downstream packages.
28-35
: LGTM: About section is comprehensive and well-documented.The about section includes all necessary metadata, including home URL, license information, development URL, documentation URL, and a clear summary of the package's functionality. The detailed description provides valuable context about the method and its associated publication.
1-1
: Note on YAML syntax warning (can be ignored).The static analysis tool reported a syntax error for the '%' character on this line. This is a false positive, as the '%' is part of a valid Jinja2 template syntax used in Conda recipes. No action is required for this warning.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
16-22
: Verify zlib dependency and consider removing if unused.The C++ compiler requirement is correct for a C++ project. However, the necessity of the zlib dependency was questioned in previous reviews, and no evidence of its usage was found.
To verify the zlib usage, please run the following script:
If no zlib usage is found, consider removing the zlib dependency from both the
host
andrun
sections.
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/consensify/meta.yaml (1)
31-38
: LGTM with a minor suggestion: About section is well-defined.The about section provides comprehensive metadata:
- All required fields (home URL, license, dev_url, doc_url, summary) are present.
- The license is correctly specified as GPL3 with a reference to the license file.
- The summary and about fields provide clear descriptions of the package's purpose and background.
Minor suggestion: Consider adding a
license_family: GPL
field for better categorization in the Conda ecosystem.You can add the license family field like this:
about: ... license: GPL3 license_family: GPL license_file: LICENCE.txt ...
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- recipes/consensify/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/consensify/meta.yaml
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
🔇 Additional comments (5)
recipes/consensify/meta.yaml (5)
1-5
: LGTM: Package and version are correctly defined.The use of a Jinja2 variable for the version is a good practice for maintainability. The package name and version are correctly set.
Note: The static analysis hint about a syntax error for the '%' character is a false positive. This is a valid Jinja2 template syntax used in Conda recipes.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
7-9
: LGTM: Source URL and checksum are correctly specified.The source URL correctly uses the version variable, which is good for consistency. The SHA256 checksum is provided, ensuring the integrity of the downloaded source.
11-14
: LGTM: Build section is correctly configured.The build number is correctly set to 0 for a new package. The run_exports section with
pin_subpackage
is a good practice, ensuring that the package is correctly pinned in downstream dependencies. Themax_pin="x"
allows updates to minor and patch versions, which is generally appropriate for most packages.
24-29
: LGTM: Test section is well-defined.The test section is comprehensive:
- It includes source files from the test directory, which is good for thorough testing.
- The help command test (
consensify_c -h
) ensures the executable is properly installed and accessible.- The specific command test checks the functionality with actual input files, providing a more robust verification of the package's operation.
This approach to testing helps ensure the package is correctly installed and functional.
16-22
: Verify the necessity of zlib dependency.The C++ compiler requirement is correct for a C++ project. However, as noted in a previous review, the necessity of the zlib dependency should be verified:
- Is zlib actually required for building and running Consensify?
- If zlib is not used, consider removing it from both host and run requirements.
To help verify the zlib dependency, you can run the following script:
If the script doesn't find any zlib usage or headers, consider removing the zlib dependency.
mulled-test ignores resources set in the meta.yaml, so the more advanced tests that work on conda fail on mulled.
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 (1)
recipes/consensify/meta.yaml (1)
24-26
: LGTM with suggestion: Test section is good, but could be expanded.The test command verifies that the main executable is installed and can run. This is a good basic test.
Consider adding more comprehensive tests if possible, such as:
- Checking for the presence of other executables or scripts if any.
- Running a simple analysis on a small dataset to ensure functionality.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/consensify/build.sh (1 hunks)
- recipes/consensify/meta.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- recipes/consensify/build.sh
🧰 Additional context used
📓 Learnings (1)
recipes/consensify/meta.yaml (1)
Learnt from: dramanica PR: bioconda/bioconda-recipes#50969 File: recipes/consensify/meta.yaml:16-20 Timestamp: 2024-09-26T11:44:14.445Z Learning: In the Consensify package, `zlib` is a necessary dependency for building, and it must not be removed from the requirements, even if code analysis suggests otherwise.
🪛 yamllint
recipes/consensify/meta.yaml
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
🔇 Additional comments (6)
recipes/consensify/meta.yaml (6)
1-5
: LGTM: Package and version are correctly defined.The package name and version are properly set. Using a Jinja2 variable for the version is a good practice for maintainability.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
7-9
: LGTM: Source URL and checksum are properly defined.The source URL correctly uses the version variable, and the SHA256 checksum is provided to ensure the integrity of the downloaded source.
11-14
: LGTM: Build section is correctly configured.The build number is set to 0, which is correct for a new package. The
run_exports
section uses the recommended syntax for pinning the package version.
16-22
: LGTM: Requirements are correctly specified.The requirements section is properly configured:
- The C++ compiler is correctly specified for building.
- Zlib is included in both host and run requirements, which is necessary for building and running the package as confirmed by the maintainer.
1-1
: Note on static analysis warning: False positive.The yamllint tool reports a syntax error for the '%' character at the beginning of the file. This is a false positive because:
- The '%' is part of a Jinja2 template, which is commonly used and encouraged in Conda recipes.
- Bioconda explicitly allows and recommends the use of Jinja2 templates in meta.yaml files.
No action is required to address this warning.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
1-36
: Summary: Recipe looks good overall with minor updates needed.The consensify recipe is well-structured and follows Bioconda guidelines. Here's a summary of the review:
- Package, version, and source sections are correctly defined.
- Build and requirements sections are properly configured.
- Test section is good but could be expanded for more comprehensive testing.
- About section needs a minor update to the license information.
Next steps:
- Update the license information as suggested.
- Consider expanding the test section if possible.
- Once these changes are made, the recipe should be ready for submission.
Great job on creating this Bioconda recipe for consensify!
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
@BiocondaBot please add label |
This PR adds a recipe for consensify, a method for generating a consensus pseudohaploid genome sequence
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>
.Summary by CodeRabbit
New Features
consensify
project.consensify
, version2.4.0
, including metadata and dependencies.Documentation