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 recipe for CRAN package locuszoomr #51580

Merged
merged 9 commits into from
Nov 16, 2024

Conversation

GiulioCentorame
Copy link
Contributor

@GiulioCentorame GiulioCentorame commented Oct 23, 2024

Add recipe for CRAN package locuszoomr (built using conda skeleton cran locuszoomr)


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

📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

This pull request introduces two primary changes related to the R package r-locuszoomr. First, a new shell script named build.sh is added to automate the build process for the package. The script sets an environment variable to disable automatic dependency management, renames the existing DESCRIPTION file for backup, filters out lines starting with 'Priority:' from the old description, and then installs the package using R with specified arguments.

Second, a new metadata file meta.yaml is created for the r-locuszoomr package. This file outlines essential information such as the package version (0.3.5), source URLs for downloading the package, a SHA256 checksum for integrity verification, build requirements, runtime dependencies, and a test command to verify successful installation. The metadata also includes an about section that describes the package's functionality in creating regional gene locus plots, akin to the LocusZoom web interface.

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, which also sets this variable for the R package build process.
  • Update Earl Grey build.sh #51324: The build.sh script in the earlgrey PR includes modifications to enhance its functionality, which may relate to the automation aspect of the build.sh in the main PR for the R package.
  • Add seqspec #51326: The meta.yaml in the seqspec PR introduces a new package configuration, similar to the meta.yaml changes in the main PR for the r-locuszoomr package, both establishing foundational metadata for their respective packages.
  • Add genodsp #51488: The meta.yaml for genodsp introduces a new package with a defined structure, akin to the meta.yaml changes in the main PR, which also establishes a new package's metadata and dependencies.
  • Add svtopovz python package #51643: The meta.yaml for svtopovz introduces a new package configuration, similar to the meta.yaml changes in the main PR, both defining new packages with specific dependencies and metadata.
  • Add svtopo recipe #51665: The meta.yaml for svtopo introduces a new package that depends on svtopovz, which is related to the svtopovz package introduced in the previous PR, showing a connection in package dependencies and functionality.

Suggested labels

please review & merge

Suggested reviewers

  • mencian
  • adamhospital

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 (3)
recipes/r-locuszoomr/build.sh (1)

1-5: Consider architectural improvements for better maintainability.

While the script is functional, consider these improvements:

  1. Add logging for better debugging
  2. Preserve exit codes from R CMD INSTALL
  3. Clean up temporary files (DESCRIPTION.old)
 #!/bin/bash
+
+# Exit on error
+set -e
+
+# Enable logging
+set -x
+
 export DISABLE_AUTOBREW=1
+
+# Backup and modify DESCRIPTION file
 mv DESCRIPTION DESCRIPTION.old
 grep -va '^Priority: ' DESCRIPTION.old > DESCRIPTION
+
+# Install package and capture exit code
 ${R} CMD INSTALL --build . ${R_ARGS}
+install_status=$?
+
+# Cleanup
+rm -f DESCRIPTION.old
+
+exit $install_status
recipes/r-locuszoomr/meta.yaml (2)

21-60: Consider adding version constraints for dependencies.

While the dependencies list is comprehensive, it's recommended to add version constraints for critical dependencies to ensure reproducibility. This is particularly important for Bioconductor packages like r-annotationfilter, r-biocgenerics, etc.

Example format:

- r-base >=4.0
- r-annotationfilter >=1.16

62-64: Consider adding more comprehensive tests.

While loading the library is a basic test, consider adding tests that verify key functionality:

commands:
  - $R -e "library('locuszoomr')"
  - $R -e "stopifnot(packageVersion('locuszoomr') == '${PKG_VERSION}')"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between e03a132 and 845d318.

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

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

(syntax)

🔇 Additional comments (5)
recipes/r-locuszoomr/build.sh (1)

5-5: LGTM! R package installation command looks good.

The installation command follows Bioconda's R package build conventions correctly.

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

1-5: LGTM! Package naming and version handling follow Bioconda conventions.

The package name follows the r-* prefix convention for R packages, and version handling includes proper Jinja2 templating.

🧰 Tools
🪛 yamllint

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

(syntax)


13-19: LGTM! Build settings follow R package conventions.

The build configuration includes appropriate RPaths and Windows-specific settings.


66-78: LGTM! Package metadata is complete and well-structured.

The about section includes all required fields with appropriate license handling and a comprehensive description.


7-11: Verify package availability on CRAN.

The URLs and checksum look correct, but let's verify the package exists on CRAN.

✅ Verification successful

Since the output from the shell script shows that the package 'locuszoomr' exists on CRAN with version 0.3.5 and matches the expected version, I can generate the final response:

Package availability on CRAN confirmed

The package 'locuszoomr' version 0.3.5 is available on CRAN, confirming that both the direct and archive URLs in the recipe will work correctly.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package availability on CRAN
# Expected: Package should be listed in PACKAGES file with version 0.3.5

curl -s https://cran.r-project.org/src/contrib/PACKAGES | grep -A 2 "Package: locuszoomr"

Length of output: 146

recipes/r-locuszoomr/build.sh Show resolved Hide resolved
recipes/r-locuszoomr/build.sh Outdated Show resolved Hide resolved
GiulioCentorame added a commit to GiulioCentorame/bioconda-recipes that referenced this pull request Oct 23, 2024
Following the suggestion in [this comment](bioconda#51580 (comment))

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 1

🧹 Outside diff range and nitpick comments (1)
recipes/r-locuszoomr/meta.yaml (1)

64-66: Consider adding more comprehensive tests.

While the basic import test is present, consider adding additional functional tests to verify key package features.

Example additional tests:

 test:
   commands:
     - $R -e "library('locuszoomr')"
+    - $R -e "packageVersion('locuszoomr')"
+    - $R -e "help(package = 'locuszoomr')"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between ad1ded4 and 8944b42.

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

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

(syntax)

🔇 Additional comments (5)
recipes/r-locuszoomr/meta.yaml (5)

1-5: LGTM! Package naming and version configuration are correct.

The package follows Bioconda's R package naming convention and properly uses Jinja2 templating for version management.

🧰 Tools
🪛 yamllint

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

(syntax)


7-11: LGTM! Source configuration is properly structured.

Good practice including both current and archive URLs with SHA256 verification.


23-62: LGTM! Dependencies are well-structured and comprehensive.

The dependencies appropriately include both CRAN and Bioconductor packages needed for genomic visualization functionality.


68-80: LGTM! Package metadata is complete and well-documented.

The about section provides comprehensive information including homepage, license details, and a clear description of the package's functionality.


1-80: Verify package availability on CRAN.

Let's confirm the package exists on CRAN and check its latest version.

✅ Verification successful

Package verified on CRAN with matching version 0.3.5

The package locuszoomr is available on CRAN and the version (0.3.5) in the recipe matches the current version on CRAN, confirming it's a valid source. This validates the package source configuration in the recipe.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify package existence and version on CRAN
curl -s "https://cran.r-project.org/web/packages/locuszoomr/index.html" | grep -A 1 "Version:"

Length of output: 125

🧰 Tools
🪛 yamllint

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

(syntax)

recipes/r-locuszoomr/meta.yaml Outdated Show resolved Hide resolved
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 (1)
recipes/r-locuszoomr/meta.yaml (1)

65-69: Consider enhancing test coverage.

While the current test commands cover basic functionality, consider adding:

  1. A test that exercises a core function from the package
  2. Validation of expected outputs

Example additional test:

 test:
   commands:
     - $R -e "library('locuszoomr')"
     - $R -e "packageVersion('locuszoomr')"
     - $R -e "help(package = 'locuszoomr')"
+    - $R -e "data <- data.frame(SNP=c('rs1', 'rs2'), P=c(0.01, 0.05)); tryCatch(locuszoomr::locus_plot(data), error=function(e) quit(status=1))"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 8944b42 and 9394d20.

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

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

(syntax)

🔇 Additional comments (5)
recipes/r-locuszoomr/meta.yaml (5)

1-5: LGTM! Package metadata follows Bioconda guidelines.

The package name and version are correctly formatted.

🧰 Tools
🪛 yamllint

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

(syntax)


7-11: LGTM! Source configuration is well-structured.

Good practices observed:

  • Multiple source URLs for reliability
  • SHA256 checksum for package verification

13-22: LGTM! Build configuration is appropriate for an R package.

The build settings follow Conda's R packaging guidelines:

  • Correct use of run_exports for dependency pinning
  • noarch: generic is appropriate for R packages
  • Proper rpaths configuration

71-83: LGTM! Package information is complete and accurate.

The about section contains all required metadata:

  • Valid repository URL
  • Correct license information
  • Comprehensive package description

24-64: Verify availability of dependencies.

The dependencies list looks comprehensive, but we should verify:

  1. All dependencies are available in Bioconda/Conda-forge channels
  2. Whether any critical dependencies need version constraints

@GiulioCentorame
Copy link
Contributor Author

GiulioCentorame commented Oct 24, 2024

I am waiting for a dependency that I completely missed when first submitting this (gggrid), but then it should be good to go

GiulioCentorame and others added 8 commits November 1, 2024 08:53
Following the suggestion in [this comment](bioconda#51580 (comment))

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Whoops

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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 (1)
recipes/r-locuszoomr/meta.yaml (1)

65-69: Consider adding functional tests.

While the basic package loading tests are present, consider adding functional tests to verify key package functionality.

Example addition:

 test:
   commands:
     - $R -e "library('locuszoomr')"
     - $R -e "packageVersion('locuszoomr')"
     - $R -e "help(package = 'locuszoomr')"
+    - $R -e "data(package = 'locuszoomr')"  # Test data availability if package includes datasets
+    - $R -e "example(package = 'locuszoomr')"  # Test examples if available
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 9394d20 and cec608c.

📒 Files selected for processing (2)
  • recipes/r-locuszoomr/build.sh (1 hunks)
  • recipes/r-locuszoomr/meta.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • recipes/r-locuszoomr/build.sh
🧰 Additional context used
🪛 yamllint
recipes/r-locuszoomr/meta.yaml

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

(syntax)

🔇 Additional comments (4)
recipes/r-locuszoomr/meta.yaml (4)

1-11: LGTM! Package metadata follows best practices.

The package metadata is well-structured with proper versioning, source URLs (including archive fallback), and checksum verification.

🧰 Tools
🪛 yamllint

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

(syntax)


13-23: LGTM! Build configuration is properly set up.

The build configuration follows R packaging best practices with correct run_exports, noarch setting, and standard R library paths.


71-83: LGTM! Package metadata is complete and well-documented.

The about section provides comprehensive information including homepage, license details, and a clear description of the package's functionality.


24-64: Verify availability of r-gggrid package.

The r-gggrid package was recently added to conda-forge. Let's verify its availability to prevent build failures.

@bgruening bgruening enabled auto-merge (squash) November 16, 2024 20:10
@bgruening bgruening merged commit b4557b6 into bioconda:master Nov 16, 2024
6 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