Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/R-CMD-check-dev-recipes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# NOTE: Used to check against dev recipes until recipes 1.0.0 is released.
# Needed to ensure that hardhat's special recipes 1.0.0
# `update_role_requirements()` support has correct behavior in pre and post
# recipes 1.0.0. After recipes 1.0.0 is release, we can:
# - Remove this workflow
# - Remove `skip_if_no_update_role_requirements()`
# - Put `recipes (>= 1.0.0)` in Suggests

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
#
# NOTE: This workflow is overkill for most R packages and
# check-standard.yaml is likely a better choice.
# usethis::use_github_action("check-standard") will install it.
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: R-CMD-check-dev-recipes

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-18.04, r: 'devel', http-user-agent: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, tidymodels/recipes#1011
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
25 changes: 25 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# hardhat (development version)

* We have reverted the change made in hardhat 1.0.0 that caused recipe
preprocessors to drop non-standard roles by default when calling `forge()`.
Determining what roles are required at `bake()` time is really something
that should be controlled within recipes, not hardhat. This results in the
following changes (#207):

* The new argument, `bake_dependent_roles`, that was added to
`default_recipe_blueprint()` in 1.0.0 has been removed. It is no longer
needed with the new behavior.

* By default, `forge()` will pass on all columns from `new_data` to `bake()`
except those with roles of `"outcome"` or `"case_weights"`. With
`outcomes = TRUE`, it will also pass on the `"outcome"` role. This is
essentially the same as the pre-1.0.0 behavior, and means that, by default,
all non-standard roles are required at `bake()` time. This assumption is
now also enforced by recipes 1.0.0, even if you aren't using hardhat or
a workflow.

* In the development version of recipes, which will become recipes 1.0.0,
there is a new `update_role_requirements()` function that can be used to
declare that a role is not required at `bake()` time. hardhat now knows how
to respect that feature, and in `forge()` it won't pass on columns of
`new_data` to `bake()` that have roles that aren't required at `bake()`
time.

# hardhat 1.1.0

* Fixed a bug where the results from calling `mold()` using hardhat < 1.0.0 were
Expand Down
Loading