-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
recipe for pgrc #50973
recipe for pgrc #50973
Conversation
Note Currently processing new changes in this PR. This may take a few minutes, please wait... 📒 Files selected for processing (1)
📝 Walkthrough📝 Walkthrough📝 Walkthrough📝 WalkthroughWalkthroughThe changes introduce a new shell script Changes
Possibly related PRs
Suggested reviewers
Tip You can customize the tone of the review comments and chat replies.Set the 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: 3
🧹 Outside diff range and nitpick comments (2)
recipes/pgrc/meta.yaml (2)
13-15
: LGTM! Source section is correctly defined.The URL and SHA256 are properly set, with good use of Jinja2 variables and Linux-specific conditionals.
There's a trailing space on line 15. Consider removing it:
- sha256: {{ sha256 }} + sha256: {{ sha256 }}🧰 Tools
🪛 yamllint
[error] 15-15: trailing spaces
(trailing-spaces)
17-36
: LGTM! Requirements, test, about, and extra sections are well-defined.The build requirements are appropriate for a C++ project. The about section provides complete license information and a concise summary. The maintainer is correctly listed in the extra section.
Consider enhancing the test command to ensure the tool runs without errors:
test: commands: - PgRC -v 2>&1 | grep -F {{ version }} - PgRC --helpThis additional test will verify that the tool can execute its help command without errors, providing a more robust check of its functionality.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- recipes/pgrc/build.sh (1 hunks)
- recipes/pgrc/meta.yaml (1 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/pgrc/build.sh
[warning] 8-8: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
🪛 yamllint
recipes/pgrc/meta.yaml
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
[error] 15-15: trailing spaces
(trailing-spaces)
🔇 Additional comments (5)
recipes/pgrc/build.sh (1)
1-3
: LGTM: Proper script setup and binary directory creation.The script starts with the correct shebang for a bash script and creates the necessary directory for binary files. This is a good practice for ensuring the installation location is available.
recipes/pgrc/meta.yaml (4)
1-3
: LGTM! Version and SHA256 are correctly defined.The version and SHA256 are properly set using Jinja2 templating. The conditional SHA256 for Linux is a good practice.
Note: The yamllint error about the '%' character is a false positive. Jinja2 templating is valid in YAML files used for Conda recipes.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
4-6
: LGTM! Package name and version are correctly defined.The package name "pgrc" and version (using the Jinja2 variable) are properly set.
8-11
: LGTM! Build section is well-configured.The build number is correctly set, and the use of
run_exports
withpin_subpackage
is an excellent practice. This configuration ensures that packages depending on pgrc will automatically use compatible versions, reducing the risk of version conflicts.The
max_pin="x"
setting allows compatibility with future minor and patch versions, which is generally a good balance between stability and flexibility.
1-36
: Summary: The pgrc recipe is well-structured and ready for inclusion in Bioconda.The recipe follows Bioconda guidelines and properly defines all necessary sections for a Conda package. Minor improvements were suggested for trailing spaces and test commands, but these are not blocking issues.
To ensure all requirements are met, please run the following script:
If all checks pass, you can proceed with the following steps:
- Apply the suggested minor improvements.
- Run
conda-build
locally to ensure the package builds successfully.- Use the command
@BiocondaBot please add label
to indicate that the PR is ready for merging.🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
[error] 15-15: trailing spaces
(trailing-spaces)
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 (4)
recipes/pgrc/meta.yaml (4)
1-12
: LGTM! Consider using a more specific skip condition.The package and build sections look good. The use of
run_exports
is a good practice for maintaining ABI compatibility.Consider using a more specific skip condition:
- skip: True # [osx] + skip: True # [osx or win]This explicitly states that the package is not built for Windows either, which is implied by the Linux-specific build requirements.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
[error] 9-9: trailing spaces
(trailing-spaces)
14-16
: LGTM! Consider consistent use of selectors.The source section correctly specifies the URL and sha256 checksum.
For consistency, consider moving the Linux selector to the
source
level:source: # [linux] url: https://github.com/kowallus/PgRC/archive/refs/tags/v{{ version }}.tar.gz sha256: {{ sha256 }}This avoids repetition and makes it clear that the entire source section is Linux-specific.
🧰 Tools
🪛 yamllint
[error] 16-16: trailing spaces
(trailing-spaces)
24-26
: LGTM! Consider adding a basic functionality test.The version check is a good basic test.
Consider adding a basic functionality test to ensure the tool runs without errors:
test: commands: - PgRC -v 2>&1 | grep -F {{ version }} - PgRC --helpThis additional test ensures that the tool can be executed and responds to a basic command-line argument.
9-9
: Remove trailing spaces for better code hygiene.There are trailing spaces on lines 9 and 16. While they don't affect functionality, removing them improves code cleanliness.
Apply this diff to remove the trailing spaces:
- skip: True # [osx] + skip: True # [osx] - sha256: {{ sha256 }} + sha256: {{ sha256 }}Also applies to: 16-16
🧰 Tools
🪛 yamllint
[error] 9-9: trailing spaces
(trailing-spaces)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- recipes/pgrc/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/pgrc/meta.yaml
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
[error] 9-9: trailing spaces
(trailing-spaces)
[error] 16-16: trailing spaces
(trailing-spaces)
🔇 Additional comments (2)
recipes/pgrc/meta.yaml (2)
28-37
: LGTM! About and extra sections are well-defined.The about section provides comprehensive information about the package, including the correct license details. The extra section properly lists the maintainer.
18-22
: LGTM! Consider adding run-time requirements if needed.The build requirements are appropriate for a C++ project using CMake.
It's common for C++ projects to have run-time dependencies. Please verify if any run-time requirements are needed. If so, add them to the
requirements
section:requirements: build: - {{ compiler('cxx') }} # [linux] - cmake >=3.5 # [linux] - make # [linux] run: - {{ pin_compatible('libstdc++', max_pin='x.x') }} # [linux] # Add any other run-time dependencies hereTo verify if there are any additional run-time dependencies, you can check the project's documentation or run the following command:
@BiocondaBot please add label |
ping @bioconda/core |
Reposting for @kowallus to enable pings (courtesy of the BiocondaBot):
|
recipes/pgrc/build.sh
Outdated
|
||
mkdir -p $PREFIX/bin | ||
|
||
if [[ "$(uname)" == "Linux" ]]; then |
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.
Is this needed ? You already have skip: True # [osx]
in meta.yaml
recipes/pgrc/build.sh
Outdated
cd build | ||
export CPATH=${BUILD_PREFIX}/include | ||
export CXXPATH=${BUILD_PREFIX}/include | ||
export CFLAGS="$CFLAGS -I$BUILD_PREFIX/include" |
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.
You enhance the CFLAGS
but later cmake
does not make use of them via -DCMAKE_C_FLAGS=${CFLAGS}
recipes/pgrc/build.sh
Outdated
export CXXFLAGS="$CFLAGS -I$BUILD_PREFIX/include" | ||
export LDFLAGS="$LDFLAGS -L$BUILD_PREFIX/lib" | ||
cmake .. | ||
make PgRC |
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.
make PgRC | |
make -j ${CPU_COUNT} PgRC |
recipes/pgrc/meta.yaml
Outdated
|
||
requirements: | ||
build: | ||
- {{ compiler('cxx') }} # [linux] |
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.
The selector (# [linux]
) is not needed
recipes/pgrc/meta.yaml
Outdated
|
||
about: | ||
home: https://github.com/kowallus/PgRC | ||
license: GPL3 |
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.
Please use SPDX identifier
license: GPL3 | |
license: GPL-3.0-or-later |
recipes/pgrc/meta.yaml
Outdated
home: https://github.com/kowallus/PgRC | ||
license: GPL3 | ||
license_file: LICENSE | ||
license_family: GPL |
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.
license_family: GPL | |
license_family: GPL3 |
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/pgrc/build.sh (1 hunks)
- recipes/pgrc/meta.yaml (1 hunks)
🧰 Additional context used
🪛 Shellcheck
recipes/pgrc/build.sh
[warning] 6-6: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
🪛 yamllint
recipes/pgrc/meta.yaml
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
🔇 Additional comments (12)
recipes/pgrc/build.sh (4)
1-3
: LGTM: Initial setup is correct.The shebang is properly set, and the bin directory is created correctly in $PREFIX.
7-10
: Verify CMAKE_C_FLAGS usage in cmake command.The environment variables are set correctly, but there's a concern that cmake might not be using these flags.
To ensure these flags are being used, you may need to pass them explicitly to cmake. Consider modifying the cmake command (on line 11) as follows:
-cmake .. +cmake -DCMAKE_C_FLAGS="${CFLAGS}" -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" ..This change explicitly passes the flags to cmake, ensuring they are used in the build process.
1-14
: Verify necessity of OS-specific code.A past review comment mentioned OS-specific code and a skip directive in meta.yaml. However, the current script doesn't contain any OS-specific code.
Please confirm if any OS-specific code was removed from this script. If so, this is correct as it aligns with the skip directive in meta.yaml. If not, you can disregard this comment.
🧰 Tools
🪛 Shellcheck
[warning] 6-6: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
14-14
: 🛠️ Refactor suggestionImprove robustness of the installation step.
The installation step is simple but could benefit from some improvements for better robustness and error handling.
Consider modifying the installation command as follows:
-cp PgRC $PREFIX/bin +cp build/PgRC "${PREFIX}/bin/PgRC" || exit 1This change:
- Specifies the full source path (
build/PgRC
), ensuring we're copying the correct file.- Uses quotes around the destination path to handle potential spaces in
$PREFIX
.- Adds error handling to exit if the copy fails.
These modifications will make the installation step more robust and less prone to errors.
Likely invalid or redundant comment.
recipes/pgrc/meta.yaml (8)
1-6
: LGTM: Package and version section looks good.The package name, version, and SHA256 checksum are correctly defined using Jinja2 templating.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
8-12
: LGTM: Build section is well-configured.The build configuration looks good:
- Correctly skips build for macOS.
- Build number is set to 0 for a new package.
- Appropriate use of run_exports for version pinning.
14-16
: LGTM: Source section is correctly configured.The source URL and SHA256 checksum are properly defined, using the correct version tag and Jinja2 templating.
24-27
: LGTM: Test commands are appropriate.The test commands effectively verify the package version and basic functionality by checking the version output and running the help command.
29-34
: LGTM: About section is complete and accurate.The about section provides all necessary information:
- Correct home URL
- License using SPDX identifier (GPL-3.0-or-later)
- Appropriate license file and family
- Concise summary of the package functionality
The past comments regarding the license and license family have been addressed.
36-38
: LGTM: Extra section correctly specifies the maintainer.The maintainer information is properly provided in the extra section.
1-1
: Note on static analysis warning: False positiveThe yamllint tool reported a syntax error for the '%' character at the beginning of the file. This is a false positive as the '%' is part of the Jinja2 templating syntax, which is correct and commonly used in Conda recipe files.
🧰 Tools
🪛 yamllint
[error] 1-1: syntax error: found character '%' that cannot start any token
(syntax)
18-22
: LGTM: Build requirements look appropriate.The build requirements (C++ compiler, CMake >=3.5, and Make) are correctly specified for a C++ project.
Please verify if there are any runtime requirements needed for this package. If not, the current configuration is correct.
mkdir build | ||
cd build |
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.
Improve error handling for directory change.
While the build directory creation is correct, it's important to handle potential failures when changing directories.
Apply this change to improve error handling:
mkdir build
-cd build
+cd build || exit 1
This ensures the script exits if it fails to change to the build directory, preventing issues in subsequent steps.
📝 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.
mkdir build | |
cd build | |
mkdir build | |
cd build || exit 1 |
🧰 Tools
🪛 Shellcheck
[warning] 6-6: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
(SC2164)
cmake .. | ||
make -j ${CPU_COUNT} PgRC |
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
Enhance build process with error handling and parallel jobs.
The build commands look good, but could benefit from improved error handling. The use of parallel jobs in the make command is excellent for performance.
Consider modifying the build commands as follows:
-cmake ..
-make -j ${CPU_COUNT} PgRC
+cmake .. || exit 1
+make -j${CPU_COUNT} PgRC || exit 1
These changes ensure that the script exits if either the cmake
or make
command fails, preventing issues with incomplete or failed builds. The space after -j
has been removed as it's not necessary.
📝 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.
cmake .. | |
make -j ${CPU_COUNT} PgRC | |
cmake .. || exit 1 | |
make -j${CPU_COUNT} PgRC || exit 1 |
ping @bioconda/core |
Reposting for @kowallus to enable pings (courtesy of the BiocondaBot):
|
ping @bioconda/core |
Reposting for @kowallus to enable pings (courtesy of the BiocondaBot):
|
Adds pgrc, a tool for compressing the DNA stream of FASTQ datasets.
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
pgrc
(version 2.0) for compressing FASTQ datasets.Documentation
meta.yaml
file detailing package configuration, dependencies, and metadata.