Skip to content
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 KmerCamel #51245

Merged
merged 5 commits into from
Oct 8, 2024
Merged

Add KmerCamel #51245

merged 5 commits into from
Oct 8, 2024

Conversation

OndrejSladky
Copy link
Contributor

This adds the recipe for installing KmerCamel for computing masked superstrings for k-mer sets.


Please read the guidelines for Bioconda recipes before opening a pull request (PR).

General instructions

  • If this PR adds or updates a recipe, use "Add" or "Update" appropriately as the first word in its title.
  • New recipes not directly relevant to the biological sciences need to be submitted to the conda-forge channel instead of Bioconda.
  • PRs require reviews prior to being merged. Once your PR is passing tests and ready to be merged, please issue the @BiocondaBot please add label command.
  • Please post questions on Gitter or ping @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:

build:
  run_exports:
    - ...

with ... being one of:

Case run_exports statement
semantic versioning {{ pin_subpackage("myrecipe", max_pin="x") }}
semantic versioning (0.x.x) {{ pin_subpackage("myrecipe", max_pin="x.x") }}
known breakage in minor versions {{ pin_subpackage("myrecipe", max_pin="x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
known breakage in patch versions {{ pin_subpackage("myrecipe", max_pin="x.x.x") }} (in such a case, please add a note that shortly mentions your evidence for that)
calendar versioning {{ pin_subpackage("myrecipe", max_pin=None) }}

while replacing "myrecipe" with either name if a name|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 Merge the master branch into a PR.
@BiocondaBot please add label Add the please review & merge label.
@BiocondaBot please fetch artifacts Post links to CI-built packages/containers.
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>.

Copy link
Contributor

coderabbitai bot commented Oct 8, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes introduced in this pull request include the addition of two new files in the recipes/kmercamel directory: build.sh and meta.yaml.

The build.sh script automates the build and installation process for the kmercamel application. It utilizes environment variables for C++ compiler settings, executes the make command, creates a bin directory at ${PREFIX}/bin, and installs the kmercamel executable into this directory.

The meta.yaml file provides configuration details for the kmercamel package version 1.0.2. It includes the package name, version, source information such as the filename, download URL, and SHA256 checksum for integrity verification. The build section specifies the build number and lists dependencies required for building, hosting, and running the package, which include make, zlib, and glpk. Additionally, it includes a test command to verify the installation and an about section that provides metadata such as the project's homepage, license type, license file, and a brief summary of the package's functionality.


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (5)
recipes/kmercamel/build.sh (2)

3-3: Consider quoting variable expansions in the make command.

The make command correctly uses environment variables for compiler settings, which is good practice. However, to handle potential spaces in the variable values, consider quoting the expansions:

-make CXX="${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}"
+make CXX="${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}"

This change ensures that spaces in any of the variables don't cause unexpected behavior.


4-5: LGTM: Correct installation commands with a suggestion for error handling.

The installation commands are correct and follow good practices:

  • Using install -d to create the directory is appropriate.
  • Using install to copy the executable and set permissions is correct.
  • The use of ${PREFIX} is consistent with conda build practices.

However, consider adding a check to ensure the kmercamel executable exists before attempting to install it:

 install -d "${PREFIX}/bin"
+if [ ! -f kmercamel ]; then
+    echo "Error: kmercamel executable not found" >&2
+    exit 1
+fi
 install kmercamel "${PREFIX}/bin/"

This addition will provide better error handling if the build process fails.

recipes/kmercamel/meta.yaml (3)

13-14: Consider adding run_exports section

The build section correctly sets the initial build number to 0. However, as mentioned in the PR objectives, it's recommended to add a run_exports section to avoid API, ABI, and CLI breakage issues.

Consider adding the run_exports section based on your versioning strategy. For example:

build:
  number: 0
  run_exports:
    - {{ pin_subpackage('kmercamel', max_pin='x.x') }}

This example pins the major and minor version. Adjust the max_pin value according to your versioning strategy.


27-29: Consider adding more comprehensive tests

The current test command checks for the presence of "KmerCamel" in the help output, which is a good basic check. However, to ensure the tool functions correctly, consider adding more comprehensive tests.

For example, you could add:

  1. A version check: kmercamel --version
  2. A simple functional test using example data (if available)

Example:

test:
  commands:
    - kmercamel -h 2>&1 | grep "KmerCamel"
    - kmercamel --version
    # Add a functional test if possible, e.g.:
    # - kmercamel -i example_input.txt -o test_output.txt
    # - diff test_output.txt expected_output.txt

36-36: Remove extra blank lines at the end of the file

The static analysis tool detected extra blank lines at the end of the file. To adhere to YAML best practices, please remove these extra blank lines.

 about:
   home: https://github.com/OndrejSladky/kmercamel/
   license: MIT
   license_file: LICENSE.txt
   summary: KmerCamel🐫 - compressing k-mer sets using masked superstrings
-
-
🧰 Tools
🪛 yamllint

[warning] 36-36: too many blank lines

(1 > 0) (empty-lines)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between a60c239 and dd4757c.

📒 Files selected for processing (2)
  • recipes/kmercamel/build.sh (1 hunks)
  • recipes/kmercamel/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/kmercamel/meta.yaml

[warning] 36-36: too many blank lines

(1 > 0) (empty-lines)


[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (6)
recipes/kmercamel/build.sh (2)

1-1: LGTM: Correct shebang for a bash script.

The shebang #!/bin/bash is appropriate for a bash script and is generally more portable than using /usr/bin/env bash.


1-5: Overall assessment: Well-structured build script with minor suggestions for improvement.

The build.sh script is concise and follows conda build practices. It correctly uses environment variables for compiler settings and appropriate commands for installation. The suggested improvements (quoting variable expansions and adding an existence check for the executable) are minor and aimed at enhancing robustness. The script should function as intended for building and installing kmercamel.

recipes/kmercamel/meta.yaml (4)

1-6: LGTM: Package metadata is well-structured

The package metadata section is correctly defined using Jinja2 templating for version and checksum, which is a good practice for maintainability. The package name and version are properly structured.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


8-11: LGTM: Source section is correctly configured

The source section is well-structured, using variables for consistency and including the necessary elements: filename, URL, and SHA256 checksum for integrity verification. This follows Bioconda best practices.


16-25: LGTM: Requirements are well-defined

The requirements section is correctly structured with appropriate build, host, and run dependencies. The inclusion of make, C++ compiler, zlib, and glpk seems suitable for the KmerCamel project.


31-35: LGTM: About section is complete and informative

The about section provides all the necessary information including the home URL, license type, license file location, and a concise summary of the tool's functionality. This follows Bioconda best practices for recipe metadata.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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/kmercamel/meta.yaml (2)

30-32: LGTM: Test section provides a basic check. Consider enhancing tests.

The current test command checks if the kmercamel help output contains "KmerCamel", which is a good basic check to ensure the package is installed and can be executed.

Consider enhancing the test section with more comprehensive tests if available, such as:

  • Checking for specific expected output or version information.
  • Running a simple analysis with sample data, if feasible.
  • Verifying the presence of important executable files or libraries.

Example of an enhanced test section:

test:
  commands:
    - kmercamel -h 2>&1 | grep "KmerCamel"
    - kmercamel --version 2>&1 | grep "{{ version }}"
    - test -f $PREFIX/bin/kmercamel
    # Add more specific tests here if available

39-39: Minor: Remove extra blank lines at the end of the file.

There are extra blank lines at the end of the file that can be removed.

Please remove the extra blank lines at the end of the file.

Note: The static analysis tool reported a syntax error for the '%' character, but this can be safely ignored as it's a false positive due to the valid use of Jinja2 templating in this context.

🧰 Tools
🪛 yamllint

[warning] 39-39: too many blank lines

(1 > 0) (empty-lines)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between dd4757c and 60833bd.

📒 Files selected for processing (1)
  • recipes/kmercamel/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/kmercamel/meta.yaml

[warning] 39-39: too many blank lines

(1 > 0) (empty-lines)


[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (5)
recipes/kmercamel/meta.yaml (5)

1-6: LGTM: Package and version section is well-defined.

The use of Jinja2 templating for version and checksum is a good practice for maintainability. The package name and version are correctly specified according to Bioconda guidelines.

🧰 Tools
🪛 yamllint

[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)


13-17: 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 follows the instructions provided in the PR objectives and allows for minor version updates, which is a good practice for maintaining compatibility.


34-38: LGTM: About section is well-defined. Verify license information.

The about section includes all necessary information as per Bioconda guidelines, including the home URL, license type, license file, and a brief summary of the package's functionality.

Please run the following script to verify the license information:

#!/bin/bash
# Description: Verify the license information for KmerCamel

# Test: Check if the LICENSE.txt file exists and contains the word "MIT"
echo "Searching for LICENSE.txt file:"
fd -i license

echo "Checking content of LICENSE.txt file:"
rg -i 'mit license' $(fd -i license)

echo "Please review the output above to ensure the license information in meta.yaml matches the actual license file."

19-28: LGTM: Requirements section looks good. Verify dependencies.

The requirements section includes appropriate build tools and dependencies for a C++ project using zlib and glpk. The use of {{ compiler('cxx') }} is correct for C++ projects in Bioconda.

Please run the following script to verify the dependencies:


8-11: LGTM: Source section is correctly defined. Verify URL and checksum.

The source section follows Bioconda guidelines, and the use of the version variable in the URL is good for maintainability.

Please run the following script to verify the source URL and checksum:

@karel-brinda karel-brinda enabled auto-merge (squash) October 8, 2024 13:14
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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/kmercamel/meta.yaml (4)

12-15: LGTM: Build settings are appropriate.

The build number is correctly set to 0 for a new package. The use of run_exports with pin_subpackage is good for maintaining ABI compatibility.

Consider adding a comment explaining the rationale behind using max_pin="x". This can help future maintainers understand the versioning strategy.


29-31: LGTM: Test command is functional.

The test command effectively checks if the kmercamel executable is available and outputs expected content.

Consider adding more comprehensive tests, such as checking for specific options or running a simple example, to ensure the tool functions correctly after installation.


33-37: LGTM: About section is well-defined.

The about section correctly includes the home URL, license information, and a concise summary of the package's functionality.

Consider adding a description field with a more detailed explanation of KmerCamel's features and use cases. This can help users better understand the tool's capabilities.


38-38: Remove extra blank lines at the end of the file.

The linter detected extra blank lines at the end of the file. Please remove these to adhere to YAML best practices.

Apply this diff to fix the issue:

-
-
🧰 Tools
🪛 yamllint

[warning] 38-38: too many blank lines

(1 > 0) (empty-lines)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 60833bd and 4339a46.

📒 Files selected for processing (1)
  • recipes/kmercamel/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/kmercamel/meta.yaml

[warning] 38-38: too many blank lines

(1 > 0) (empty-lines)


[error] 1-1: syntax error: found character '%' that cannot start any token

(syntax)

🔇 Additional comments (3)
recipes/kmercamel/meta.yaml (3)

1-6: LGTM: Package and version definition looks good.

The use of Jinja2 variables for version and SHA256 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)


8-10: LGTM: Source configuration is correct.

The source URL is correctly defined using the version variable, which is good for maintainability. The SHA256 checksum is provided, ensuring integrity verification of the downloaded source.


18-27: LGTM: Requirements are well-defined.

The build, host, and run requirements are appropriately specified. The inclusion of make and C++ compiler for building, and zlib and glpk for both host and run environments, seems consistent with the package's needs.

To ensure all necessary dependencies are included, let's verify the package requirements:

✅ Verification successful

To ensure all usages of zlib and glpk are captured, let's search across the entire codebase:


Zlib is already included in the requirements

Thank you for your suggestion to add zlib to the requirements. However, I can confirm that zlib is already listed in both the build and run requirements of the recipe. Specifically:

requirements:
  build:
    - zlib
  run:
    - zlib

Therefore, no changes are necessary regarding zlib in this recipe.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package dependencies in the source code

# Test: Search for zlib and glpk usage in the source code
rg -i 'zlib|glpk' --type cpp

Length of output: 30


Script:

#!/bin/bash
# Description: Search for zlib and glpk usage across the entire codebase

rg -i 'zlib|glpk'

Length of output: 303423

@karel-brinda karel-brinda merged commit 83e229c into bioconda:master Oct 8, 2024
6 of 7 checks passed
This was referenced Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants