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 r-chromvarmotifs #51395

Merged
merged 4 commits into from
Oct 15, 2024
Merged

add r-chromvarmotifs #51395

merged 4 commits into from
Oct 15, 2024

Conversation

mfansler
Copy link
Member

Adds the GitHub R package chromVARmotifs as r-chromvarmotifs. Unfortunately, upstream lacks a proper release (Issue posted), so we specify the commit in the meantime.

Notably, this is required by the dev branch of ArchR. Since ArchR stability is currently only guaranteed for R 4.1, we additionally make an R 4.1 variant here. Some related discussion in #51295.


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 15, 2024

📝 Walkthrough

Walkthrough

This pull request introduces several new components for the r-chromvarmotifs package. A new shell script, build.sh, is added to the recipes/r-chromvarmotifs directory, which sets the DISABLE_AUTOBREW environment variable and installs the package in build mode using R. Additionally, a new section named r_base is introduced in the conda_build_config.yaml file, specifying supported R versions (4.1, 4.2, and 4.3). The meta.yaml file is also newly created, containing essential metadata for the package, including its name, version (0.2.0), source URL, SHA256 checksum, and both host and runtime dependencies such as r-base and bioconductor-tfbstools. The meta.yaml further includes a test command to verify installation and provides licensing information along with a summary of the package's purpose. The recipe maintainer is designated as mfansler.

Possibly related PRs

  • add r-archr #51295: The build.sh script in the r-archr PR sets the DISABLE_AUTOBREW environment variable, similar to the build.sh in the main PR for r-chromvarmotifs.
  • Add recipe for consensify #50969: The meta.yaml file in the consensify PR includes a new package declaration, akin to the meta.yaml in the main PR for r-chromvarmotifs.
  • Add recipe for rukki v0.3.0 #51115: The build.sh and meta.yaml files in the rukki PR introduce a new package and its build process, paralleling the introduction of the r-chromvarmotifs package.

Suggested labels

please review & merge

Suggested reviewers

  • mencian

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: 2

🧹 Outside diff range and nitpick comments (4)
recipes/r-chromvarmotifs/build.sh (2)

3-3: Consider addressing the underlying issue instead of disabling ShellCheck

The ShellCheck directive # shellcheck disable=SC2086 is used to suppress warnings about unquoted variables. While this might be necessary due to how ${R_ARGS} is used, it's generally better to address the underlying issue rather than disable the check.

Consider modifying the next line to properly quote the variables, which would allow you to remove this ShellCheck disable directive. For example:

"${R}" CMD INSTALL --build . "${R_ARGS}"

This change would maintain the intended functionality while adhering to shell scripting best practices.


4-4: LGTM with a minor suggestion: Quote variables for safety

The R installation command is correct and uses the standard approach for installing R packages in build scripts. The use of ${R} and ${R_ARGS} variables allows for flexibility across different environments, which is good.

However, to address potential word splitting or globbing issues, consider modifying the line as follows:

"${R}" CMD INSTALL --build . "${R_ARGS}"

This change ensures that the variables are properly quoted, preventing any unexpected behavior if ${R_ARGS} contains spaces or special characters.

recipes/r-chromvarmotifs/meta.yaml (2)

9-11: LGTM: Source URL and checksum are correctly defined.

The use of a specific commit is appropriate when there's no proper release from the upstream repository. The SHA256 checksum ensures the integrity of the downloaded source.

Consider adding a comment explaining why a specific commit is used instead of a release version. This will help future maintainers understand the reasoning behind this choice.


43-45: Consider adding more maintainers.

Having a designated maintainer is crucial. However, to ensure continued maintenance and support, it might be beneficial to have multiple maintainers.

Consider reaching out to other contributors or maintainers of related packages to see if they would be interested in co-maintaining this package. This can help distribute the workload and ensure long-term support for the package.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 9b25c3e and f997084.

📒 Files selected for processing (3)
  • recipes/r-chromvarmotifs/build.sh (1 hunks)
  • recipes/r-chromvarmotifs/conda_build_config.yaml (1 hunks)
  • recipes/r-chromvarmotifs/meta.yaml (1 hunks)
🧰 Additional context used
🪛 yamllint
recipes/r-chromvarmotifs/meta.yaml

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

(syntax)

🔇 Additional comments (8)
recipes/r-chromvarmotifs/conda_build_config.yaml (1)

1-4: LGTM! Good job on including multiple R versions.

The configuration looks good and includes R versions 4.1, 4.2, and 4.3. This is particularly important as it includes R 4.1, which is crucial for the stability of the ArchR package as mentioned in the PR objectives. Including newer versions (4.2 and 4.3) also future-proofs the package.

To ensure these R versions align with the package's compatibility requirements, please run the following script:

This script will help verify that the R versions specified in conda_build_config.yaml are consistent with any version constraints or specific commands in meta.yaml and build.sh.

recipes/r-chromvarmotifs/build.sh (3)

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

The shebang #!/bin/bash is correct and follows the standard practice for bash scripts.


2-2: LGTM: Disabling Autobrew is appropriate for Conda recipes

Setting DISABLE_AUTOBREW=1 is correct. This prevents the automatic use of Homebrew for dependencies, which is appropriate in a Conda environment where we want to use Conda-managed dependencies.


1-4: Overall assessment: Good script with minor improvements suggested

This build script for the r-chromvarmotifs package is well-structured and follows common practices for Conda recipe build scripts. It correctly sets up the environment and uses the standard R installation command.

Key points:

  1. The shebang and DISABLE_AUTOBREW setting are correct.
  2. The R installation command is appropriate for building the package.

Suggestions for improvement:

  1. Consider quoting variables in the R installation command to prevent potential issues with word splitting or globbing.
  2. If possible, address the underlying issue that necessitated the ShellCheck disable directive.

These minor adjustments will enhance the script's robustness and adherence to shell scripting best practices.

recipes/r-chromvarmotifs/meta.yaml (4)

1-7: LGTM: Package name and version are correctly defined.

The package name follows the Bioconda naming convention for R packages, and the version is set using Jinja2 templating, which allows for easier updates.

🧰 Tools
🪛 yamllint

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

(syntax)


13-20: LGTM: Build section is correctly configured.

The build section is well-configured:

  • The noarch: generic setting is appropriate for R packages.
  • The build number is correctly set to 0 for a new package.
  • The RPaths are correctly set for R libraries.
  • The use of run_exports helps manage dependency versions effectively.

34-41: LGTM: About section is comprehensive and accurate.

The about section provides all necessary information:

  • The home URL is correctly set to the GitHub repository.
  • The license is specified as MIT, with the correct license family and files.
  • A concise summary of the package's purpose is provided.

1-1: Note on yamllint warning: False positive

The yamllint tool reports a syntax error for the '%' character at the beginning of the file. This is a false positive as the '%' character is part of the Jinja2 templating syntax, which is valid and commonly used in Conda recipe files.

No action is required to address this warning.

🧰 Tools
🪛 yamllint

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

(syntax)

Comment on lines +22 to +28
requirements:
host:
- r-base
- bioconductor-tfbstools
run:
- r-base
- bioconductor-tfbstools
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider pinning the r-base version.

The requirements section includes the necessary dependencies. However, to ensure compatibility and reproducibility, it's recommended to pin the r-base version.

Consider updating the r-base requirement to specify a version range. For example:

requirements:
  host:
    - r-base {{ r_base }}
    - bioconductor-tfbstools
  run:
    - r-base {{ r_base }}
    - bioconductor-tfbstools

This assumes that {{ r_base }} is defined in your conda_build_config.yaml file. If not, you may need to specify the version explicitly, e.g., r-base >=4.1,<4.4.

Comment on lines +30 to +32
test:
commands:
- $R -e "library(chromVARmotifs)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider adding more comprehensive tests.

The current test command checks if the package can be loaded, which is a good basic test. However, to ensure the package functions correctly, consider adding more comprehensive tests.

You could add additional test commands to verify specific functionalities of the package. For example:

test:
  commands:
    - $R -e "library(chromVARmotifs)"
    - $R -e "stopifnot(length(chromVARmotifs::JASPAR2022_human) > 0)"
    - $R -e "stopifnot(is(chromVARmotifs::JASPAR2022_human, 'PWMatrixList'))"

These additional tests check if the package contains the expected data and if it's of the correct type.

@mfansler mfansler merged commit b8a6a96 into bioconda:master Oct 15, 2024
7 checks passed
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