Skip to content

feat: Add configurable protocol support to ensembl reference download #2649

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

pettyalex
Copy link

@pettyalex pettyalex commented Feb 15, 2024

This PR adds support for configurable protocol, ftp, http, or https to ensembl reference data download and vep cache download.

I was evaluating snakemake-wrapper and widely used workflows as a tool for my group to potentially use, and immediately ran into our firewall rules. By default we're able to make outgoing HTTP and HTTPS requests, but not FTP. I can request a change to our firewall, but it also would be helpful if these rules that download reference files were able to download them over HTTP, as ftp.ensembl.org has has been available over HTTP for a very long time.

If you'd prefer, I can create an issue to track this. I also intend to update test cases on these wrappers, and if you are happy with this pattern I could apply it across all wrappers in this repository that are currently hard-coded to make ftp requests.

QC

  • I confirm that:

For all wrappers added by this PR,

  • there is a test case which covers any introduced changes,
  • input: and output: file paths in the resulting rule can be changed arbitrarily,
  • either the wrapper can only use a single core, or the example rule contains a threads: x statement with x being a reasonable default,
  • rule names in the test case are in snake_case and somehow tell what the rule is about or match the tools purpose or name (e.g., map_reads for a step that maps reads),
  • all environment.yaml specifications follow the respective best practices,
  • the environment.yaml pinning has been updated by running snakedeploy pin-conda-envs environment.yaml on a linux machine,
  • wherever possible, command line arguments are inferred and set automatically (e.g. based on file extensions in input: or output:),
  • all fields of the example rules in the Snakefiles and their entries are explained via comments (input:/output:/params: etc.),
  • stderr and/or stdout are logged correctly (log:), depending on the wrapped tool,
  • temporary files are either written to a unique hidden folder in the working directory, or (better) stored where the Python function tempfile.gettempdir() points to (see here; this also means that using any Python tempfile default behavior works),
  • the meta.yaml contains a link to the documentation of the respective tool or command,
  • Snakefiles pass the linting (snakemake --lint),
  • Snakefiles are formatted with snakefmt,
  • Python wrapper scripts are formatted with black.
  • Conda environments use a minimal amount of channels, in recommended ordering. E.g. for bioconda, use (conda-forge, bioconda, nodefaults, as conda-forge should have highest priority and defaults channels are usually not needed because most packages are in conda-forge nowadays).

Summary by CodeRabbit

  • New Features

    • Enhanced data retrieval workflows now support dynamic protocol selection, enabling secure downloads (HTTPS/HTTP) for annotation, genome, variation, and cache data.
    • Added a workflow step for processing multiple chromosomes in a single operation.
  • Tests

    • Expanded the test suite to validate and ensure reliability of the new secure protocol-based workflows.

…embl reference data download and vep cache download.
@fgvieira
Copy link
Collaborator

Thanks for your contribution.
Can you add a test case for (e.g.) HTTP and HTTPS?

@pettyalex
Copy link
Author

I've run snakefmt, black and the linter over these changes. I believe this to be ready to merge.

@fgvieira
Copy link
Collaborator

@pettyalex can you fix the fail test?
And you need to add the tests to test.py.

@pettyalex
Copy link
Author

@fgvieira I fixed all the tests, and now see that what I had previously done introduced multiple ways to generate the desired output files.

I also unintentionally ran black over test.py, which it seems like is not being done? Should I revert running black over test.py, or should we have it running through black as well?

def test_vep_cache_https_protocol():
run(
"bio/vep/cache",
["snakemake", "--cores", "1", "resources/vep/cache", "--use-conda", "-F"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
["snakemake", "--cores", "1", "resources/vep/cache", "--use-conda", "-F"],
["snakemake", "--cores", "1", "resources/vep/cache", "--use-conda", "-F", "-s", "vep_cache_https.smk"],

Comment on lines +5865 to +5866
"-s",
"vep_cache_https.smk",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"-s",
"vep_cache_https.smk",

@@ -5428,17 +5461,26 @@ def test_ensembl_variation_with_contig_lengths():


@skip_if_not_modified
def test_ega_fetch():
def test_ensembl_variation_old_release():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def test_ensembl_variation_old_release():
def test_ensembl_variation_old_release_https_protocol():

Copy link
Contributor

@johanneskoester johanneskoester left a comment

Choose a reason for hiding this comment

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

Fantastic, thanks! Can you please also add the respective protocol lines to each Snakefile in the test folder? Those are used to generate the wrapper docs, from which people can copy paste into their workflows.

@fgvieira fgvieira mentioned this pull request May 13, 2024
1 task
johanneskoester pushed a commit that referenced this pull request May 28, 2024
<!-- Ensure that the PR title follows conventional commit style (<type>:
<description>)-->
<!-- Possible types are here:
https://github.com/commitizen/conventional-commit-types/blob/master/index.json
-->

<!-- Add a description of your PR here-->
Allow for custom URLs (fix issues #366 and #2649).

### QC
<!-- Make sure that you can tick the boxes below. -->

* [x] I confirm that:

For all wrappers added by this PR, 

* there is a test case which covers any introduced changes,
* `input:` and `output:` file paths in the resulting rule can be changed
arbitrarily,
* either the wrapper can only use a single core, or the example rule
contains a `threads: x` statement with `x` being a reasonable default,
* rule names in the test case are in
[snake_case](https://en.wikipedia.org/wiki/Snake_case) and somehow tell
what the rule is about or match the tools purpose or name (e.g.,
`map_reads` for a step that maps reads),
* all `environment.yaml` specifications follow [the respective best
practices](https://stackoverflow.com/a/64594513/2352071),
* the `environment.yaml` pinning has been updated by running
`snakedeploy pin-conda-envs environment.yaml` on a linux machine,
* wherever possible, command line arguments are inferred and set
automatically (e.g. based on file extensions in `input:` or `output:`),
* all fields of the example rules in the `Snakefile`s and their entries
are explained via comments (`input:`/`output:`/`params:` etc.),
* `stderr` and/or `stdout` are logged correctly (`log:`), depending on
the wrapped tool,
* temporary files are either written to a unique hidden folder in the
working directory, or (better) stored where the Python function
`tempfile.gettempdir()` points to (see
[here](https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir);
this also means that using any Python `tempfile` default behavior
works),
* the `meta.yaml` contains a link to the documentation of the respective
tool or command,
* `Snakefile`s pass the linting (`snakemake --lint`),
* `Snakefile`s are formatted with
[snakefmt](https://github.com/snakemake/snakefmt),
* Python wrapper scripts are formatted with
[black](https://black.readthedocs.io).
* Conda environments use a minimal amount of channels, in recommended
ordering. E.g. for bioconda, use (conda-forge, bioconda, nodefaults, as
conda-forge should have highest priority and defaults channels are
usually not needed because most packages are in conda-forge nowadays).
@fgvieira
Copy link
Collaborator

PR #2928 allowed for custom URLs when downloading from VEP cache. Maybe something similar can be done here for ensembl annotation/variation/sequence?

fgvieira pushed a commit that referenced this pull request Jun 3, 2024
🤖 I have created a release \*beep\* \*boop\*
---
##
[3.11.0](https://www.github.com/snakemake/snakemake-wrappers/compare/v3.10.2...v3.11.0)
(2024-05-31)


### Features

* add samtools markdup wrapper
([#2926](https://www.github.com/snakemake/snakemake-wrappers/issues/2926))
([3c86bae](https://www.github.com/snakemake/snakemake-wrappers/commit/3c86baef4586b596c6c3375336828257e8bb815f))
* Add support for regions file and arbitrary FAI/GZI paths
([#2936](https://www.github.com/snakemake/snakemake-wrappers/issues/2936))
([445b35f](https://www.github.com/snakemake/snakemake-wrappers/commit/445b35f314f035d8248ca84cb16b273b0e65847c))
* add wrapper to samtools collate
([#2929](https://www.github.com/snakemake/snakemake-wrappers/issues/2929))
([0c7ae27](https://www.github.com/snakemake/snakemake-wrappers/commit/0c7ae27622e45167b9cc1aaf1be238b0d25429b9))
* All ngsderive subcommands
([#2732](https://www.github.com/snakemake/snakemake-wrappers/issues/2732))
([847ab1d](https://www.github.com/snakemake/snakemake-wrappers/commit/847ab1d918c09908bcdb40fa3413b6dbc88d4803))
* auto infer run mode
([#2937](https://www.github.com/snakemake/snakemake-wrappers/issues/2937))
([08bd3cd](https://www.github.com/snakemake/snakemake-wrappers/commit/08bd3cd79243c4c0636f88d229667e58595611bd))
* Goleft indexcov
([#2734](https://www.github.com/snakemake/snakemake-wrappers/issues/2734))
([ebef6f8](https://www.github.com/snakemake/snakemake-wrappers/commit/ebef6f8259e89d9a06b2264a5d0a34da23d2e84e))


### Bug Fixes

* bamcoverage without effective genome size
([#2941](https://www.github.com/snakemake/snakemake-wrappers/issues/2941))
([b6ad55f](https://www.github.com/snakemake/snakemake-wrappers/commit/b6ad55f4d2c702ecc904d6b40b4b35b2463c895a))
* issue
[#366](https://www.github.com/snakemake/snakemake-wrappers/issues/366)
and
[#2649](https://www.github.com/snakemake/snakemake-wrappers/issues/2649)
([#2928](https://www.github.com/snakemake/snakemake-wrappers/issues/2928))
([e10ab57](https://www.github.com/snakemake/snakemake-wrappers/commit/e10ab571a63b36ce1295e50b6f6b7e4742e0beae))
* remove NA string replacement, fixed upstream
([#2940](https://www.github.com/snakemake/snakemake-wrappers/issues/2940))
([8f4d223](https://www.github.com/snakemake/snakemake-wrappers/commit/8f4d223ec6c1e1e2715708d0532399ede4ed2727))


### Performance Improvements

* autobump bio/bismark/bam2nuc
([#2943](https://www.github.com/snakemake/snakemake-wrappers/issues/2943))
([9228479](https://www.github.com/snakemake/snakemake-wrappers/commit/9228479896c2410ae6a58849bf59e5f01bc5e712))
* autobump bio/bismark/bismark
([#2948](https://www.github.com/snakemake/snakemake-wrappers/issues/2948))
([d9abb20](https://www.github.com/snakemake/snakemake-wrappers/commit/d9abb20e0e002d9ec16507d86211b0555a2546ba))
* autobump bio/bismark/bismark_genome_preparation
([#2945](https://www.github.com/snakemake/snakemake-wrappers/issues/2945))
([899ae0d](https://www.github.com/snakemake/snakemake-wrappers/commit/899ae0d96d04fa56a7ba5989d9dea18be0d3ebc6))
* autobump bio/bismark/bismark_methylation_extractor
([#2944](https://www.github.com/snakemake/snakemake-wrappers/issues/2944))
([1b232d2](https://www.github.com/snakemake/snakemake-wrappers/commit/1b232d24816a40f75568bec224eff4e164b3f953))
* autobump bio/bismark/bismark2bedGraph
([#2947](https://www.github.com/snakemake/snakemake-wrappers/issues/2947))
([ab29098](https://www.github.com/snakemake/snakemake-wrappers/commit/ab29098757c3eef17884f198234ec456e19414f9))
* autobump bio/bismark/bismark2report
([#2951](https://www.github.com/snakemake/snakemake-wrappers/issues/2951))
([13dd155](https://www.github.com/snakemake/snakemake-wrappers/commit/13dd155a20025b8aaaa80ce3747e6822562bb6b1))
* autobump bio/bismark/bismark2summary
([#2946](https://www.github.com/snakemake/snakemake-wrappers/issues/2946))
([bfb3d30](https://www.github.com/snakemake/snakemake-wrappers/commit/bfb3d305daa519faee4ad4ea7dbd313941f4c128))
* autobump bio/bismark/deduplicate_bismark
([#2950](https://www.github.com/snakemake/snakemake-wrappers/issues/2950))
([bcf3c06](https://www.github.com/snakemake/snakemake-wrappers/commit/bcf3c06887443dae9749254f0e8d34e30f880b7e))
* autobump bio/bowtie2/align
([#2949](https://www.github.com/snakemake/snakemake-wrappers/issues/2949))
([6b0593f](https://www.github.com/snakemake/snakemake-wrappers/commit/6b0593facfcae0b9c92cb1f31423426752c0230d))
* autobump bio/bowtie2/build
([#2942](https://www.github.com/snakemake/snakemake-wrappers/issues/2942))
([5b3ca20](https://www.github.com/snakemake/snakemake-wrappers/commit/5b3ca20635bd0e427a548e68cd8a40fdb0047f10))
* autobump bio/bwa-mem2/mem-samblaster
([#2962](https://www.github.com/snakemake/snakemake-wrappers/issues/2962))
([ff613f3](https://www.github.com/snakemake/snakemake-wrappers/commit/ff613f37f857f23d19e4dc0cace22b02113a7e07))
* autobump bio/bwa/mem-samblaster
([#2961](https://www.github.com/snakemake/snakemake-wrappers/issues/2961))
([83754dd](https://www.github.com/snakemake/snakemake-wrappers/commit/83754dd9f158ea978faa1ed33668a6dda648cdb7))
* autobump bio/fastq_screen
([#2952](https://www.github.com/snakemake/snakemake-wrappers/issues/2952))
([e45fcac](https://www.github.com/snakemake/snakemake-wrappers/commit/e45fcac221ef45f345a516bff905a53c864e7355))
* autobump bio/freebayes
([#2963](https://www.github.com/snakemake/snakemake-wrappers/issues/2963))
([7a0d553](https://www.github.com/snakemake/snakemake-wrappers/commit/7a0d553e09921cebc77b54d314c211b91099f7bd))
* autobump bio/gatk/applybqsr
([#2938](https://www.github.com/snakemake/snakemake-wrappers/issues/2938))
([498c67f](https://www.github.com/snakemake/snakemake-wrappers/commit/498c67fb12691b0021a7b234dfc279957b46708c))
* autobump bio/gatk3/realignertargetcreator
([#2931](https://www.github.com/snakemake/snakemake-wrappers/issues/2931))
([2d2835c](https://www.github.com/snakemake/snakemake-wrappers/commit/2d2835c51f974f7f45420f832b8084520d2d3ec0))
* autobump bio/gdc-api/bam-slicing
([#2954](https://www.github.com/snakemake/snakemake-wrappers/issues/2954))
([32d25c1](https://www.github.com/snakemake/snakemake-wrappers/commit/32d25c1560b4c581694c49dc6d3a596e5ca581ab))
* autobump bio/goleft/indexcov
([#2930](https://www.github.com/snakemake/snakemake-wrappers/issues/2930))
([5ccbdb0](https://www.github.com/snakemake/snakemake-wrappers/commit/5ccbdb078a835ad0c2fd3e9e63677103fe216eeb))
* autobump bio/gseapy/gsea
([#2953](https://www.github.com/snakemake/snakemake-wrappers/issues/2953))
([dda3d16](https://www.github.com/snakemake/snakemake-wrappers/commit/dda3d16c9b49145bd58d287db1021c41d5a24710))
* autobump bio/hifiasm
([#2932](https://www.github.com/snakemake/snakemake-wrappers/issues/2932))
([3722de7](https://www.github.com/snakemake/snakemake-wrappers/commit/3722de7000d0b74a3c56bfdb27aad6cf318562ee))
* autobump bio/multiqc
([#2955](https://www.github.com/snakemake/snakemake-wrappers/issues/2955))
([91ad107](https://www.github.com/snakemake/snakemake-wrappers/commit/91ad1079fa03b07f8ebb9ebf21fe92d21c8a3c13))
* autobump bio/ngsderive
([#2964](https://www.github.com/snakemake/snakemake-wrappers/issues/2964))
([df82b38](https://www.github.com/snakemake/snakemake-wrappers/commit/df82b381a49b7810087f73b7c83db4fff6d57b66))
* autobump bio/open-cravat/module
([#2966](https://www.github.com/snakemake/snakemake-wrappers/issues/2966))
([f1ffa3e](https://www.github.com/snakemake/snakemake-wrappers/commit/f1ffa3eee366cba828314cc9a368ba69f17d98c2))
* autobump bio/open-cravat/run
([#2965](https://www.github.com/snakemake/snakemake-wrappers/issues/2965))
([9b371ca](https://www.github.com/snakemake/snakemake-wrappers/commit/9b371ca6014a38cf23e78598638e4c709a5e82af))
* autobump bio/ptrimmer
([#2933](https://www.github.com/snakemake/snakemake-wrappers/issues/2933))
([cd37e0b](https://www.github.com/snakemake/snakemake-wrappers/commit/cd37e0bb19e341ad40560828f3c052ef69529088))
* autobump bio/rasusa
([#2967](https://www.github.com/snakemake/snakemake-wrappers/issues/2967))
([9f25643](https://www.github.com/snakemake/snakemake-wrappers/commit/9f2564323429bea84dfb0b01a5b9f53b37fa397c))
* autobump bio/rbt/csvreport
([#2956](https://www.github.com/snakemake/snakemake-wrappers/issues/2956))
([b2a469d](https://www.github.com/snakemake/snakemake-wrappers/commit/b2a469dc907c8f3761399affd29ca53f012cc3ee))
* autobump bio/sambamba/flagstat
([#2973](https://www.github.com/snakemake/snakemake-wrappers/issues/2973))
([4575792](https://www.github.com/snakemake/snakemake-wrappers/commit/4575792deb144dd80401d46bc2fb72175976305a))
* autobump bio/sambamba/index
([#2971](https://www.github.com/snakemake/snakemake-wrappers/issues/2971))
([18359ac](https://www.github.com/snakemake/snakemake-wrappers/commit/18359ac437bb9f1065c703b3bf2da1d3da9548be))
* autobump bio/sambamba/markdup
([#2968](https://www.github.com/snakemake/snakemake-wrappers/issues/2968))
([191542d](https://www.github.com/snakemake/snakemake-wrappers/commit/191542d475853f6f19495e136e105970928a9fd8))
* autobump bio/sambamba/merge
([#2975](https://www.github.com/snakemake/snakemake-wrappers/issues/2975))
([adf9a28](https://www.github.com/snakemake/snakemake-wrappers/commit/adf9a28b64f87aec3fa8286f356f44b6bb77561e))
* autobump bio/sambamba/slice
([#2972](https://www.github.com/snakemake/snakemake-wrappers/issues/2972))
([88ac3f6](https://www.github.com/snakemake/snakemake-wrappers/commit/88ac3f6dfae93606f74ae8c88b6f8b9e2d059a02))
* autobump bio/sambamba/sort
([#2976](https://www.github.com/snakemake/snakemake-wrappers/issues/2976))
([990e841](https://www.github.com/snakemake/snakemake-wrappers/commit/990e8416b730267a65ba5a97b71537655bbfe6db))
* autobump bio/sambamba/view
([#2970](https://www.github.com/snakemake/snakemake-wrappers/issues/2970))
([613e55d](https://www.github.com/snakemake/snakemake-wrappers/commit/613e55d915215348651e878fe37f6533e6d77363))
* autobump bio/seqkit
([#2969](https://www.github.com/snakemake/snakemake-wrappers/issues/2969))
([e25b840](https://www.github.com/snakemake/snakemake-wrappers/commit/e25b8409af3cc9e591b5106f1ebb00289f628207))
* autobump bio/sra-tools/fasterq-dump
([#2974](https://www.github.com/snakemake/snakemake-wrappers/issues/2974))
([d8b4b5f](https://www.github.com/snakemake/snakemake-wrappers/commit/d8b4b5fab114c66bf712ee271b00f831a5ed558d))
* autobump bio/unicycler
([#2957](https://www.github.com/snakemake/snakemake-wrappers/issues/2957))
([185ce7e](https://www.github.com/snakemake/snakemake-wrappers/commit/185ce7e4bd6adbdf840effa665f62e358865c8b8))
* autobump bio/vep/annotate
([#2958](https://www.github.com/snakemake/snakemake-wrappers/issues/2958))
([728658d](https://www.github.com/snakemake/snakemake-wrappers/commit/728658d5fae40ea784f7b8d3c567c4f7240ef7c7))
* autobump bio/vep/cache
([#2959](https://www.github.com/snakemake/snakemake-wrappers/issues/2959))
([f4e5b66](https://www.github.com/snakemake/snakemake-wrappers/commit/f4e5b66f8765d09d51d4a640d2d775d781c3018f))
* autobump bio/whatshap/haplotag
([#2934](https://www.github.com/snakemake/snakemake-wrappers/issues/2934))
([f0b638a](https://www.github.com/snakemake/snakemake-wrappers/commit/f0b638a55280c0727ccef5aab24e03b3d565f290))
* Update Datavzrd to 2.36.12
([#2924](https://www.github.com/snakemake/snakemake-wrappers/issues/2924))
([beb9d22](https://www.github.com/snakemake/snakemake-wrappers/commit/beb9d2231c5d59ba74f23f56bbfc5e004aa72331))
* Use samtools collate in fastq separate wrapper
([#2960](https://www.github.com/snakemake/snakemake-wrappers/issues/2960))
([9c8cf81](https://www.github.com/snakemake/snakemake-wrappers/commit/9c8cf81c1894fc019ffbf0f906eb88e0960c3e7d))
---


This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
votti pushed a commit to FroeseLab/snakemake-wrappers that referenced this pull request Jun 22, 2024
<!-- Ensure that the PR title follows conventional commit style (<type>:
<description>)-->
<!-- Possible types are here:
https://github.com/commitizen/conventional-commit-types/blob/master/index.json
-->

<!-- Add a description of your PR here-->
Allow for custom URLs (fix issues snakemake#366 and snakemake#2649).

### QC
<!-- Make sure that you can tick the boxes below. -->

* [x] I confirm that:

For all wrappers added by this PR, 

* there is a test case which covers any introduced changes,
* `input:` and `output:` file paths in the resulting rule can be changed
arbitrarily,
* either the wrapper can only use a single core, or the example rule
contains a `threads: x` statement with `x` being a reasonable default,
* rule names in the test case are in
[snake_case](https://en.wikipedia.org/wiki/Snake_case) and somehow tell
what the rule is about or match the tools purpose or name (e.g.,
`map_reads` for a step that maps reads),
* all `environment.yaml` specifications follow [the respective best
practices](https://stackoverflow.com/a/64594513/2352071),
* the `environment.yaml` pinning has been updated by running
`snakedeploy pin-conda-envs environment.yaml` on a linux machine,
* wherever possible, command line arguments are inferred and set
automatically (e.g. based on file extensions in `input:` or `output:`),
* all fields of the example rules in the `Snakefile`s and their entries
are explained via comments (`input:`/`output:`/`params:` etc.),
* `stderr` and/or `stdout` are logged correctly (`log:`), depending on
the wrapped tool,
* temporary files are either written to a unique hidden folder in the
working directory, or (better) stored where the Python function
`tempfile.gettempdir()` points to (see
[here](https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir);
this also means that using any Python `tempfile` default behavior
works),
* the `meta.yaml` contains a link to the documentation of the respective
tool or command,
* `Snakefile`s pass the linting (`snakemake --lint`),
* `Snakefile`s are formatted with
[snakefmt](https://github.com/snakemake/snakefmt),
* Python wrapper scripts are formatted with
[black](https://black.readthedocs.io).
* Conda environments use a minimal amount of channels, in recommended
ordering. E.g. for bioconda, use (conda-forge, bioconda, nodefaults, as
conda-forge should have highest priority and defaults channels are
usually not needed because most packages are in conda-forge nowadays).
votti pushed a commit to FroeseLab/snakemake-wrappers that referenced this pull request Jun 22, 2024
🤖 I have created a release \*beep\* \*boop\*
---
##
[3.11.0](https://www.github.com/snakemake/snakemake-wrappers/compare/v3.10.2...v3.11.0)
(2024-05-31)


### Features

* add samtools markdup wrapper
([snakemake#2926](https://www.github.com/snakemake/snakemake-wrappers/issues/2926))
([3c86bae](https://www.github.com/snakemake/snakemake-wrappers/commit/3c86baef4586b596c6c3375336828257e8bb815f))
* Add support for regions file and arbitrary FAI/GZI paths
([snakemake#2936](https://www.github.com/snakemake/snakemake-wrappers/issues/2936))
([445b35f](https://www.github.com/snakemake/snakemake-wrappers/commit/445b35f314f035d8248ca84cb16b273b0e65847c))
* add wrapper to samtools collate
([snakemake#2929](https://www.github.com/snakemake/snakemake-wrappers/issues/2929))
([0c7ae27](https://www.github.com/snakemake/snakemake-wrappers/commit/0c7ae27622e45167b9cc1aaf1be238b0d25429b9))
* All ngsderive subcommands
([snakemake#2732](https://www.github.com/snakemake/snakemake-wrappers/issues/2732))
([847ab1d](https://www.github.com/snakemake/snakemake-wrappers/commit/847ab1d918c09908bcdb40fa3413b6dbc88d4803))
* auto infer run mode
([snakemake#2937](https://www.github.com/snakemake/snakemake-wrappers/issues/2937))
([08bd3cd](https://www.github.com/snakemake/snakemake-wrappers/commit/08bd3cd79243c4c0636f88d229667e58595611bd))
* Goleft indexcov
([snakemake#2734](https://www.github.com/snakemake/snakemake-wrappers/issues/2734))
([ebef6f8](https://www.github.com/snakemake/snakemake-wrappers/commit/ebef6f8259e89d9a06b2264a5d0a34da23d2e84e))


### Bug Fixes

* bamcoverage without effective genome size
([snakemake#2941](https://www.github.com/snakemake/snakemake-wrappers/issues/2941))
([b6ad55f](https://www.github.com/snakemake/snakemake-wrappers/commit/b6ad55f4d2c702ecc904d6b40b4b35b2463c895a))
* issue
[snakemake#366](https://www.github.com/snakemake/snakemake-wrappers/issues/366)
and
[snakemake#2649](https://www.github.com/snakemake/snakemake-wrappers/issues/2649)
([snakemake#2928](https://www.github.com/snakemake/snakemake-wrappers/issues/2928))
([e10ab57](https://www.github.com/snakemake/snakemake-wrappers/commit/e10ab571a63b36ce1295e50b6f6b7e4742e0beae))
* remove NA string replacement, fixed upstream
([snakemake#2940](https://www.github.com/snakemake/snakemake-wrappers/issues/2940))
([8f4d223](https://www.github.com/snakemake/snakemake-wrappers/commit/8f4d223ec6c1e1e2715708d0532399ede4ed2727))


### Performance Improvements

* autobump bio/bismark/bam2nuc
([snakemake#2943](https://www.github.com/snakemake/snakemake-wrappers/issues/2943))
([9228479](https://www.github.com/snakemake/snakemake-wrappers/commit/9228479896c2410ae6a58849bf59e5f01bc5e712))
* autobump bio/bismark/bismark
([snakemake#2948](https://www.github.com/snakemake/snakemake-wrappers/issues/2948))
([d9abb20](https://www.github.com/snakemake/snakemake-wrappers/commit/d9abb20e0e002d9ec16507d86211b0555a2546ba))
* autobump bio/bismark/bismark_genome_preparation
([snakemake#2945](https://www.github.com/snakemake/snakemake-wrappers/issues/2945))
([899ae0d](https://www.github.com/snakemake/snakemake-wrappers/commit/899ae0d96d04fa56a7ba5989d9dea18be0d3ebc6))
* autobump bio/bismark/bismark_methylation_extractor
([snakemake#2944](https://www.github.com/snakemake/snakemake-wrappers/issues/2944))
([1b232d2](https://www.github.com/snakemake/snakemake-wrappers/commit/1b232d24816a40f75568bec224eff4e164b3f953))
* autobump bio/bismark/bismark2bedGraph
([snakemake#2947](https://www.github.com/snakemake/snakemake-wrappers/issues/2947))
([ab29098](https://www.github.com/snakemake/snakemake-wrappers/commit/ab29098757c3eef17884f198234ec456e19414f9))
* autobump bio/bismark/bismark2report
([snakemake#2951](https://www.github.com/snakemake/snakemake-wrappers/issues/2951))
([13dd155](https://www.github.com/snakemake/snakemake-wrappers/commit/13dd155a20025b8aaaa80ce3747e6822562bb6b1))
* autobump bio/bismark/bismark2summary
([snakemake#2946](https://www.github.com/snakemake/snakemake-wrappers/issues/2946))
([bfb3d30](https://www.github.com/snakemake/snakemake-wrappers/commit/bfb3d305daa519faee4ad4ea7dbd313941f4c128))
* autobump bio/bismark/deduplicate_bismark
([snakemake#2950](https://www.github.com/snakemake/snakemake-wrappers/issues/2950))
([bcf3c06](https://www.github.com/snakemake/snakemake-wrappers/commit/bcf3c06887443dae9749254f0e8d34e30f880b7e))
* autobump bio/bowtie2/align
([snakemake#2949](https://www.github.com/snakemake/snakemake-wrappers/issues/2949))
([6b0593f](https://www.github.com/snakemake/snakemake-wrappers/commit/6b0593facfcae0b9c92cb1f31423426752c0230d))
* autobump bio/bowtie2/build
([snakemake#2942](https://www.github.com/snakemake/snakemake-wrappers/issues/2942))
([5b3ca20](https://www.github.com/snakemake/snakemake-wrappers/commit/5b3ca20635bd0e427a548e68cd8a40fdb0047f10))
* autobump bio/bwa-mem2/mem-samblaster
([snakemake#2962](https://www.github.com/snakemake/snakemake-wrappers/issues/2962))
([ff613f3](https://www.github.com/snakemake/snakemake-wrappers/commit/ff613f37f857f23d19e4dc0cace22b02113a7e07))
* autobump bio/bwa/mem-samblaster
([snakemake#2961](https://www.github.com/snakemake/snakemake-wrappers/issues/2961))
([83754dd](https://www.github.com/snakemake/snakemake-wrappers/commit/83754dd9f158ea978faa1ed33668a6dda648cdb7))
* autobump bio/fastq_screen
([snakemake#2952](https://www.github.com/snakemake/snakemake-wrappers/issues/2952))
([e45fcac](https://www.github.com/snakemake/snakemake-wrappers/commit/e45fcac221ef45f345a516bff905a53c864e7355))
* autobump bio/freebayes
([snakemake#2963](https://www.github.com/snakemake/snakemake-wrappers/issues/2963))
([7a0d553](https://www.github.com/snakemake/snakemake-wrappers/commit/7a0d553e09921cebc77b54d314c211b91099f7bd))
* autobump bio/gatk/applybqsr
([snakemake#2938](https://www.github.com/snakemake/snakemake-wrappers/issues/2938))
([498c67f](https://www.github.com/snakemake/snakemake-wrappers/commit/498c67fb12691b0021a7b234dfc279957b46708c))
* autobump bio/gatk3/realignertargetcreator
([snakemake#2931](https://www.github.com/snakemake/snakemake-wrappers/issues/2931))
([2d2835c](https://www.github.com/snakemake/snakemake-wrappers/commit/2d2835c51f974f7f45420f832b8084520d2d3ec0))
* autobump bio/gdc-api/bam-slicing
([snakemake#2954](https://www.github.com/snakemake/snakemake-wrappers/issues/2954))
([32d25c1](https://www.github.com/snakemake/snakemake-wrappers/commit/32d25c1560b4c581694c49dc6d3a596e5ca581ab))
* autobump bio/goleft/indexcov
([snakemake#2930](https://www.github.com/snakemake/snakemake-wrappers/issues/2930))
([5ccbdb0](https://www.github.com/snakemake/snakemake-wrappers/commit/5ccbdb078a835ad0c2fd3e9e63677103fe216eeb))
* autobump bio/gseapy/gsea
([snakemake#2953](https://www.github.com/snakemake/snakemake-wrappers/issues/2953))
([dda3d16](https://www.github.com/snakemake/snakemake-wrappers/commit/dda3d16c9b49145bd58d287db1021c41d5a24710))
* autobump bio/hifiasm
([snakemake#2932](https://www.github.com/snakemake/snakemake-wrappers/issues/2932))
([3722de7](https://www.github.com/snakemake/snakemake-wrappers/commit/3722de7000d0b74a3c56bfdb27aad6cf318562ee))
* autobump bio/multiqc
([snakemake#2955](https://www.github.com/snakemake/snakemake-wrappers/issues/2955))
([91ad107](https://www.github.com/snakemake/snakemake-wrappers/commit/91ad1079fa03b07f8ebb9ebf21fe92d21c8a3c13))
* autobump bio/ngsderive
([snakemake#2964](https://www.github.com/snakemake/snakemake-wrappers/issues/2964))
([df82b38](https://www.github.com/snakemake/snakemake-wrappers/commit/df82b381a49b7810087f73b7c83db4fff6d57b66))
* autobump bio/open-cravat/module
([snakemake#2966](https://www.github.com/snakemake/snakemake-wrappers/issues/2966))
([f1ffa3e](https://www.github.com/snakemake/snakemake-wrappers/commit/f1ffa3eee366cba828314cc9a368ba69f17d98c2))
* autobump bio/open-cravat/run
([snakemake#2965](https://www.github.com/snakemake/snakemake-wrappers/issues/2965))
([9b371ca](https://www.github.com/snakemake/snakemake-wrappers/commit/9b371ca6014a38cf23e78598638e4c709a5e82af))
* autobump bio/ptrimmer
([snakemake#2933](https://www.github.com/snakemake/snakemake-wrappers/issues/2933))
([cd37e0b](https://www.github.com/snakemake/snakemake-wrappers/commit/cd37e0bb19e341ad40560828f3c052ef69529088))
* autobump bio/rasusa
([snakemake#2967](https://www.github.com/snakemake/snakemake-wrappers/issues/2967))
([9f25643](https://www.github.com/snakemake/snakemake-wrappers/commit/9f2564323429bea84dfb0b01a5b9f53b37fa397c))
* autobump bio/rbt/csvreport
([snakemake#2956](https://www.github.com/snakemake/snakemake-wrappers/issues/2956))
([b2a469d](https://www.github.com/snakemake/snakemake-wrappers/commit/b2a469dc907c8f3761399affd29ca53f012cc3ee))
* autobump bio/sambamba/flagstat
([snakemake#2973](https://www.github.com/snakemake/snakemake-wrappers/issues/2973))
([4575792](https://www.github.com/snakemake/snakemake-wrappers/commit/4575792deb144dd80401d46bc2fb72175976305a))
* autobump bio/sambamba/index
([snakemake#2971](https://www.github.com/snakemake/snakemake-wrappers/issues/2971))
([18359ac](https://www.github.com/snakemake/snakemake-wrappers/commit/18359ac437bb9f1065c703b3bf2da1d3da9548be))
* autobump bio/sambamba/markdup
([snakemake#2968](https://www.github.com/snakemake/snakemake-wrappers/issues/2968))
([191542d](https://www.github.com/snakemake/snakemake-wrappers/commit/191542d475853f6f19495e136e105970928a9fd8))
* autobump bio/sambamba/merge
([snakemake#2975](https://www.github.com/snakemake/snakemake-wrappers/issues/2975))
([adf9a28](https://www.github.com/snakemake/snakemake-wrappers/commit/adf9a28b64f87aec3fa8286f356f44b6bb77561e))
* autobump bio/sambamba/slice
([snakemake#2972](https://www.github.com/snakemake/snakemake-wrappers/issues/2972))
([88ac3f6](https://www.github.com/snakemake/snakemake-wrappers/commit/88ac3f6dfae93606f74ae8c88b6f8b9e2d059a02))
* autobump bio/sambamba/sort
([snakemake#2976](https://www.github.com/snakemake/snakemake-wrappers/issues/2976))
([990e841](https://www.github.com/snakemake/snakemake-wrappers/commit/990e8416b730267a65ba5a97b71537655bbfe6db))
* autobump bio/sambamba/view
([snakemake#2970](https://www.github.com/snakemake/snakemake-wrappers/issues/2970))
([613e55d](https://www.github.com/snakemake/snakemake-wrappers/commit/613e55d915215348651e878fe37f6533e6d77363))
* autobump bio/seqkit
([snakemake#2969](https://www.github.com/snakemake/snakemake-wrappers/issues/2969))
([e25b840](https://www.github.com/snakemake/snakemake-wrappers/commit/e25b8409af3cc9e591b5106f1ebb00289f628207))
* autobump bio/sra-tools/fasterq-dump
([snakemake#2974](https://www.github.com/snakemake/snakemake-wrappers/issues/2974))
([d8b4b5f](https://www.github.com/snakemake/snakemake-wrappers/commit/d8b4b5fab114c66bf712ee271b00f831a5ed558d))
* autobump bio/unicycler
([snakemake#2957](https://www.github.com/snakemake/snakemake-wrappers/issues/2957))
([185ce7e](https://www.github.com/snakemake/snakemake-wrappers/commit/185ce7e4bd6adbdf840effa665f62e358865c8b8))
* autobump bio/vep/annotate
([snakemake#2958](https://www.github.com/snakemake/snakemake-wrappers/issues/2958))
([728658d](https://www.github.com/snakemake/snakemake-wrappers/commit/728658d5fae40ea784f7b8d3c567c4f7240ef7c7))
* autobump bio/vep/cache
([snakemake#2959](https://www.github.com/snakemake/snakemake-wrappers/issues/2959))
([f4e5b66](https://www.github.com/snakemake/snakemake-wrappers/commit/f4e5b66f8765d09d51d4a640d2d775d781c3018f))
* autobump bio/whatshap/haplotag
([snakemake#2934](https://www.github.com/snakemake/snakemake-wrappers/issues/2934))
([f0b638a](https://www.github.com/snakemake/snakemake-wrappers/commit/f0b638a55280c0727ccef5aab24e03b3d565f290))
* Update Datavzrd to 2.36.12
([snakemake#2924](https://www.github.com/snakemake/snakemake-wrappers/issues/2924))
([beb9d22](https://www.github.com/snakemake/snakemake-wrappers/commit/beb9d2231c5d59ba74f23f56bbfc5e004aa72331))
* Use samtools collate in fastq separate wrapper
([snakemake#2960](https://www.github.com/snakemake/snakemake-wrappers/issues/2960))
([9c8cf81](https://www.github.com/snakemake/snakemake-wrappers/commit/9c8cf81c1894fc019ffbf0f906eb88e0960c3e7d))
---


This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@fgvieira
Copy link
Collaborator

Can you fix the conflicts?

Copy link
Contributor

github-actions bot commented Mar 1, 2025

This PR was marked as stale because it has been open for 6 months with no activity.

@github-actions github-actions bot added the Stale label Mar 1, 2025
Copy link
Contributor

coderabbitai bot commented Mar 1, 2025

📝 Walkthrough

Walkthrough

The changes introduce several new Snakemake rules that support HTTPS (and HTTP) protocols for downloading Ensembl resources, including annotation, sequence, variation, and VEP cache data. Wrapper scripts are updated to use a dynamic protocol parameter (defaulting to "ftp") for URL construction. Additionally, a new rule for processing multiple chromosomes is added, and several existing Snakemake files receive trailing comma adjustments for formatting consistency. New test functions have been added and existing tests updated to reflect the new HTTPS-based workflows.

Changes

File(s) Change Summary
bio/.../ensembl_annotation_https.smk, bio/.../ensembl_sequence_https.smk, bio/.../ensembl_variation_https.smk, bio/.../vep_cache_https.smk, bio/.../Snakefile (multi-chromosome rule) Added new Snakemake rules specifying outputs, parameters (including protocol), logging, and caching for HTTPS/HTTP downloads and multi-chromosome processing.
bio/.../ensembl-annotation/wrapper.py, bio/.../ensembl-sequence/wrapper.py, bio/.../ensembl-variation/wrapper.py, bio/.../vep/cache/wrapper.py Introduced a new protocol parameter (default "ftp") to dynamically construct URL strings instead of using a hardcoded protocol.
bio/.../chrom_wise.smk, bio/.../grch37.smk, bio/.../old_release.smk, bio/.../with_fai.smk Added trailing commas in rule sections (input, output, params, log) for standardized formatting.
test.py Added new test functions (test_ensembl_sequence_https, test_ensembl_annotation_gtf_https_gz) and modified the test_ensembl_variation_old_release to reference the updated HTTPS Snakefile; reordering tests as necessary.

Sequence Diagram(s)

sequenceDiagram
    participant S as Snakemake Rule
    participant W as Wrapper Script
    participant D as Download Service

    S->>W: Invoke rule with parameters (including protocol)
    W->>W: Retrieve protocol (default "ftp" or overridden to "https"/"http")
    W->>D: Construct URL and request download using dynamic protocol
    D-->>W: Return downloaded data
    W-->>S: Output file and log execution
Loading

Suggested Reviewers

  • fgvieira

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9797636 and 1a84082.

📒 Files selected for processing (14)
  • bio/reference/ensembl-annotation/test/ensembl_annotation_https.smk (1 hunks)
  • bio/reference/ensembl-annotation/wrapper.py (3 hunks)
  • bio/reference/ensembl-sequence/test/Snakefile (1 hunks)
  • bio/reference/ensembl-sequence/test/ensembl_sequence_https.smk (1 hunks)
  • bio/reference/ensembl-sequence/wrapper.py (2 hunks)
  • bio/reference/ensembl-variation/test/chrom_wise.smk (1 hunks)
  • bio/reference/ensembl-variation/test/ensembl_variation_https.smk (1 hunks)
  • bio/reference/ensembl-variation/test/grch37.smk (1 hunks)
  • bio/reference/ensembl-variation/test/old_release.smk (1 hunks)
  • bio/reference/ensembl-variation/test/with_fai.smk (1 hunks)
  • bio/reference/ensembl-variation/wrapper.py (2 hunks)
  • bio/vep/cache/test/vep_cache_https.smk (1 hunks)
  • bio/vep/cache/wrapper.py (2 hunks)
  • test.py (4 hunks)
✅ Files skipped from review due to trivial changes (4)
  • bio/reference/ensembl-variation/test/with_fai.smk
  • bio/reference/ensembl-variation/test/grch37.smk
  • bio/reference/ensembl-variation/test/chrom_wise.smk
  • bio/reference/ensembl-variation/test/old_release.smk
🧰 Additional context used
📓 Path-based instructions (2)
`**/*.py`: Do not try to improve formatting. Do not suggest ...

**/*.py: Do not try to improve formatting.
Do not suggest type annotations for functions that are defined inside of functions or methods.
Do not suggest type annotation of the self argument of methods.
Do not suggest type annotation of the cls argument of classmethods.
Do not suggest return type annotation if a function or method does not contain a return statement.

  • bio/vep/cache/wrapper.py
  • bio/reference/ensembl-annotation/wrapper.py
  • bio/reference/ensembl-variation/wrapper.py
  • bio/reference/ensembl-sequence/wrapper.py
  • test.py
`**/wrapper.py`: Do not complain about use of undefined vari...

**/wrapper.py: Do not complain about use of undefined variable called snakemake.

  • bio/vep/cache/wrapper.py
  • bio/reference/ensembl-annotation/wrapper.py
  • bio/reference/ensembl-variation/wrapper.py
  • bio/reference/ensembl-sequence/wrapper.py
🪛 Ruff (0.8.2)
bio/vep/cache/wrapper.py

12-12: Undefined name snakemake

(F821)

bio/reference/ensembl-annotation/wrapper.py

22-22: Undefined name snakemake

(F821)

bio/reference/ensembl-variation/wrapper.py

18-18: Undefined name snakemake

(F821)

bio/reference/ensembl-sequence/wrapper.py

14-14: Undefined name snakemake

(F821)

test.py

5464-5464: Redefinition of unused test_ensembl_variation_old_release from line 5423

(F811)

🔇 Additional comments (17)
bio/reference/ensembl-sequence/test/Snakefile (1)

33-47: New rule for multiple chromosomes looks good.

The new get_multiple_chromosome rule is well-structured and consistent with the existing rules. It appropriately demonstrates how to retrieve multiple chromosomes (I and II) in a single workflow step.

While the PR objective mentions adding configurable protocol support, I don't see a direct protocol parameter in this rule. This parameter might be implemented in the wrapper script itself. If not already handled by the wrapper, consider adding a protocol parameter here to demonstrate the new functionality.

bio/vep/cache/wrapper.py (2)

12-12: Parameter added to allow for configurable protocol.

The new protocol parameter allows users to specify an alternative protocol (HTTP or HTTPS) when facing firewall restrictions, aligning well with the PR objective. The default "ftp" maintains backward compatibility.

🧰 Tools
🪛 Ruff (0.8.2)

12-12: Undefined name snakemake

(F821)


28-28: URL pattern updated to use the configurable protocol.

The hardcoded "ftp" protocol has been replaced with the dynamically determined {protocol}, enabling the wrapper to use alternative protocols as specified in the parameters.

bio/reference/ensembl-annotation/test/ensembl_annotation_https.smk (1)

1-14: New test rule for HTTPS protocol download looks good.

This test rule correctly verifies the new functionality by explicitly setting the protocol parameter to "https". The rule structure is appropriate and follows the standard pattern for Snakemake rules.

bio/reference/ensembl-sequence/test/ensembl_sequence_https.smk (1)

1-14: New test rule for HTTP protocol download looks good.

The rule properly tests the HTTP protocol functionality. Note that despite the filename including "https", this test is using the "http" protocol, which is acceptable since the PR aims to support both HTTP and HTTPS protocols.

bio/reference/ensembl-variation/test/ensembl_variation_https.smk (1)

1-14: New test rule for HTTPS protocol download looks good.

This test rule correctly verifies the variation data download functionality with the HTTPS protocol. The rule structure follows the established pattern and includes all necessary parameters.

bio/vep/cache/test/vep_cache_https.smk (1)

1-15: Rule looks good - correctly exercises HTTPS protocol support.

This new test rule correctly defines a test case for the HTTPS protocol functionality, with appropriate parameters and output specifications. The rule structure follows Snakemake conventions and properly exercises the new protocol parameter.

bio/reference/ensembl-variation/wrapper.py (2)

18-18: Good implementation of the protocol parameter.

Adding the protocol parameter with a default value of "ftp" maintains backward compatibility while enabling the new functionality.

🧰 Tools
🪛 Ruff (0.8.2)

18-18: Undefined name snakemake

(F821)


67-74: URL construction correctly incorporates the protocol parameter.

The URL formatting has been updated to use the protocol parameter rather than hardcoding "ftp", which successfully implements the configurable protocol feature.

bio/reference/ensembl-annotation/wrapper.py (2)

22-22: Good implementation of the protocol parameter.

Adding the protocol parameter with a default value of "ftp" maintains backward compatibility while enabling the new functionality.

🧰 Tools
🪛 Ruff (0.8.2)

22-22: Undefined name snakemake

(F821)


52-63: URL construction correctly incorporates the protocol parameter.

The URL formatting has been updated to use the protocol parameter rather than hardcoding "ftp", which successfully implements the configurable protocol feature.

bio/reference/ensembl-sequence/wrapper.py (2)

14-14: Good implementation of the protocol parameter.

Adding the protocol parameter with a default value of "ftp" maintains backward compatibility while enabling the new functionality.

🧰 Tools
🪛 Ruff (0.8.2)

14-14: Undefined name snakemake

(F821)


55-55: URL construction correctly incorporates the protocol parameter.

The f-string URL construction has been updated to use the protocol parameter rather than hardcoding "ftp", which successfully implements the configurable protocol feature.

test.py (4)

5333-5346: LGTM! Added test function for HTTPS protocol support.

This new test function aligns perfectly with the PR objective to add support for configurable protocols (HTTP, HTTPS) for Ensembl reference data.


5398-5412: LGTM! Added test function for HTTPS protocol annotation downloads.

The test function correctly tests Ensembl GTF annotation downloads via HTTPS protocol, aligned with the PR's objectives.


5847-5852: LGTM! Added test function for VEP cache downloads via HTTPS.

This new test function appropriately extends the HTTPS protocol support to VEP cache downloads.


5858-5867: LGTM! Updated to use HTTPS-enabled Snakefile.

The modification correctly updates the test to use the HTTPS-compatible Snakefile for VEP plugins.

✨ Finishing Touches
  • 📝 Generate Docstrings

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 generate docstrings to generate docstrings for this 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.

@github-actions github-actions bot removed the Stale label Apr 1, 2025
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.

3 participants