tidy-deprecate-function

Automate R function and argument deprecation workflows in dbplyr.

514|191|Updated Mar 28, 2017
One-click install
npx skills add https://github.com/tidyverse/dbplyr --skill tidy-deprecate-function
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tidy-deprecate-function
Source: https://github.com/tidyverse/dbplyr/tree/main/.claude/skills/tidy-deprecate-function
Command: npx skills add https://github.com/tidyverse/dbplyr --skill tidy-deprecate-function

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides you through deprecating R functions and parameters in dbplyr, ensuring all necessary steps—depwarning, tests, docs, and NEWS entries—are completed consistently.

Core Features & Use Cases

  • Deprecation Warnings: Add lifecycle::deprecate_warn() to the target function or parameter.
  • Testing & Silence: Silence deprecation warnings in existing tests.
  • Documentation & NEWS: Add lifecycle badge to documentation and a NEWS entry.
  • Tests for Deprecation: Create tests to verify the deprecation message.

Quick Start

Use the tidy-deprecate-function skill to deprecate a function in your package, ensuring a deprecation warning is emitted, tests are updated, and users are guided to a replacement.

Frequently Asked Questions about tidy-deprecate-function

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deprecate an R function in dbplyr?

Deprecating an R function involves adding a lifecycle::deprecate_warn() call to emit a warning, updating tests to silence the warning, adding a lifecycle badge to documentation, creating a NEWS entry, and writing tests to verify the deprecation message displays correctly.

What steps are needed to deprecate a function argument in R?

Deprecate a function argument by inserting lifecycle::deprecate_warn() for the parameter, silencing the warning in existing tests, documenting the deprecation with a lifecycle badge, adding a NEWS entry describing the change, and creating tests that confirm the deprecation warning triggers.

How do I update tests when deprecating an R function?

Silence deprecation warnings in existing tests using lifecycle's testing utilities, then create new tests specifically for the deprecation flow to verify the warning message and guidance to users is correct.

What documentation changes are required when deprecating a function?

Add a lifecycle badge to your function documentation and create a NEWS entry that explains the deprecation, the recommended replacement, and the version in which the function will be removed.

Can I deprecate multiple function arguments at once?

Yes, this Skill handles both function-level and parameter-level deprecation cases, so you can deprecate multiple arguments in a single workflow while updating warnings, tests, docs, and NEWS consistently.

How does the Skill determine which version to mark for deprecation?

The Skill reads the deprecation version from your package's DESCRIPTION file, ensuring the version you assign to lifecycle::deprecate_warn() matches your package release cycle.