Skip to content

Commit 914ad18

Browse files
committed
Updates the shared scripts
1 parent d83e5e6 commit 914ad18

31 files changed

+392
-206
lines changed

.github/workflows/test-clone-scripts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
- name: Verify all packages cloned
118118
run: |
119119
cd /tmp/test-all
120-
if [ ! -d "repos/yardstick" ] || [ ! -d "repos/recipes" ] || [ ! -d "repos/dials" ]; then
120+
if [ ! -d "repos/yardstick" ] || [ ! -d "repos/recipes" ] || [ ! -d "repos/dials" ] || [ ! -d "repos/parsnip" ]; then
121121
echo "✗ Not all packages cloned"
122122
exit 1
123123
fi
@@ -279,7 +279,7 @@ jobs:
279279
$testDir = "$env:TEMP\test-all"
280280
Set-Location $testDir
281281
282-
if (!(Test-Path "repos\yardstick") -or !(Test-Path "repos\recipes") -or !(Test-Path "repos\dials")) {
282+
if (!(Test-Path "repos\yardstick") -or !(Test-Path "repos\recipes") -or !(Test-Path "repos\dials") -or !(Test-Path "repos\parsnip")) {
283283
Write-Error "Not all packages cloned"
284284
exit 1
285285
}

developers/add-dials-parameter/references/scripts/README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Repository cloning scripts for tidymodels development reference.
44

55
## Purpose
66

7-
These scripts clone tidymodels package repositories (yardstick, recipes, dials) into a local `repos/` directory for development reference. Having local access to the source code helps Claude provide more accurate guidance with real implementation examples during skill execution.
7+
These scripts clone tidymodels package repositories (yardstick, recipes, dials, parsnip) into a local `repos/` directory for development reference. Having local access to the source code helps Claude provide more accurate guidance with real implementation examples during skill execution.
88

99
## Scripts
1010

@@ -32,8 +32,11 @@ We provide three platform-native scripts for the best user experience:
3232
# Clone dials
3333
./developers/shared-references/scripts/clone-tidymodels-repos.sh dials
3434

35+
# Clone parsnip
36+
./developers/shared-references/scripts/clone-tidymodels-repos.sh parsnip
37+
3538
# Clone multiple packages
36-
./developers/shared-references/scripts/clone-tidymodels-repos.sh yardstick recipes dials
39+
./developers/shared-references/scripts/clone-tidymodels-repos.sh yardstick recipes dials parsnip
3740

3841
# Clone all packages
3942
./developers/shared-references/scripts/clone-tidymodels-repos.sh all
@@ -51,8 +54,11 @@ We provide three platform-native scripts for the best user experience:
5154
# Clone dials
5255
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 dials
5356
57+
# Clone parsnip
58+
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 parsnip
59+
5460
# Clone multiple packages
55-
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 yardstick recipes dials
61+
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 yardstick recipes dials parsnip
5662
5763
# Clone all packages
5864
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 all
@@ -104,7 +110,7 @@ All scripts use consistent exit codes:
104110
- macOS: Install Xcode Command Line Tools or download from https://git-scm.com/downloads
105111
- Linux: Install via package manager (`apt-get install git`, `yum install git`, etc.)
106112
- Windows: Download from https://git-scm.com/downloads
107-
- **Disk Space**: ~5-8 MB per repository (yardstick, recipes, dials - shallow clones)
113+
- **Disk Space**: ~5-8 MB per repository (yardstick, recipes, dials, parsnip - shallow clones)
108114
- **Python script only**: Python 3.6 or higher
109115

110116
## Directory Structure
@@ -125,7 +131,11 @@ my-package/
125131
│ │ ├── R/
126132
│ │ ├── tests/
127133
│ │ └── ...
128-
│ └── dials/ # Cloned repository
134+
│ ├── dials/ # Cloned repository
135+
│ │ ├── R/
136+
│ │ ├── tests/
137+
│ │ └── ...
138+
│ └── parsnip/ # Cloned repository
129139
│ ├── R/
130140
│ ├── tests/
131141
│ └── ...

developers/add-dials-parameter/references/scripts/clone-tidymodels-repos.ps1

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Clone Tidymodels Repositories for development reference.
44
55
.DESCRIPTION
6-
Clones tidymodels package repositories (yardstick, recipes, dials) for
7-
development reference. Creates repos\ directory, clones with shallow clone
8-
for speed, and updates .gitignore and .Rbuildignore to prevent committing
9-
cloned code.
6+
Clones tidymodels package repositories (yardstick, recipes, dials, parsnip)
7+
for development reference. Creates repos\ directory, clones with shallow
8+
clone for speed, and updates .gitignore and .Rbuildignore to prevent
9+
committing cloned code.
1010
1111
.PARAMETER Packages
12-
One or more package names to clone: yardstick, recipes, dials, or all
12+
One or more package names to clone: yardstick, recipes, dials, parsnip, or all
1313
1414
.EXAMPLE
1515
.\clone-tidymodels-repos.ps1 yardstick
@@ -21,7 +21,10 @@
2121
.\clone-tidymodels-repos.ps1 dials
2222
2323
.EXAMPLE
24-
.\clone-tidymodels-repos.ps1 yardstick recipes dials
24+
.\clone-tidymodels-repos.ps1 parsnip
25+
26+
.EXAMPLE
27+
.\clone-tidymodels-repos.ps1 yardstick recipes dials parsnip
2528
2629
.EXAMPLE
2730
.\clone-tidymodels-repos.ps1 all
@@ -55,6 +58,7 @@ $Repos = @{
5558
"yardstick" = "https://github.com/tidymodels/yardstick.git"
5659
"recipes" = "https://github.com/tidymodels/recipes.git"
5760
"dials" = "https://github.com/tidymodels/dials.git"
61+
"parsnip" = "https://github.com/tidymodels/parsnip.git"
5862
}
5963

6064
# Function to print colored messages
@@ -198,13 +202,14 @@ function Main {
198202
Write-Error "No packages specified."
199203
Write-Host ""
200204
Write-Host "Usage: .\clone-tidymodels-repos.ps1 PACKAGE [PACKAGE ...]"
201-
Write-Host " Packages: yardstick, recipes, dials, all"
205+
Write-Host " Packages: yardstick, recipes, dials, parsnip, all"
202206
Write-Host ""
203207
Write-Host "Examples:"
204208
Write-Host " .\clone-tidymodels-repos.ps1 yardstick"
205209
Write-Host " .\clone-tidymodels-repos.ps1 recipes"
206210
Write-Host " .\clone-tidymodels-repos.ps1 dials"
207-
Write-Host " .\clone-tidymodels-repos.ps1 yardstick recipes dials"
211+
Write-Host " .\clone-tidymodels-repos.ps1 parsnip"
212+
Write-Host " .\clone-tidymodels-repos.ps1 yardstick recipes dials parsnip"
208213
Write-Host " .\clone-tidymodels-repos.ps1 all"
209214
exit 1
210215
}
@@ -254,12 +259,14 @@ function Main {
254259
Write-Error "No valid packages specified"
255260
Write-Host ""
256261
Write-Host "Usage: .\clone-tidymodels-repos.ps1 PACKAGE [PACKAGE ...]"
257-
Write-Host " Packages: yardstick, recipes, all"
262+
Write-Host " Packages: yardstick, recipes, dials, parsnip, all"
258263
Write-Host ""
259264
Write-Host "Examples:"
260265
Write-Host " .\clone-tidymodels-repos.ps1 yardstick"
261266
Write-Host " .\clone-tidymodels-repos.ps1 recipes"
262-
Write-Host " .\clone-tidymodels-repos.ps1 yardstick recipes"
267+
Write-Host " .\clone-tidymodels-repos.ps1 dials"
268+
Write-Host " .\clone-tidymodels-repos.ps1 parsnip"
269+
Write-Host " .\clone-tidymodels-repos.ps1 yardstick recipes dials parsnip"
263270
Write-Host " .\clone-tidymodels-repos.ps1 all"
264271
exit 1
265272
}

developers/add-dials-parameter/references/scripts/clone-tidymodels-repos.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
Clone Tidymodels Repositories
44
55
Description:
6-
Clones tidymodels package repositories (yardstick, recipes, dials) for
7-
development reference. Creates repos/ directory, clones with shallow clone
8-
for speed, and updates .gitignore and .Rbuildignore to prevent committing
9-
cloned code.
6+
Clones tidymodels package repositories (yardstick, recipes, dials, parsnip)
7+
for development reference. Creates repos/ directory, clones with shallow
8+
clone for speed, and updates .gitignore and .Rbuildignore to prevent
9+
committing cloned code.
1010
1111
Usage:
1212
python3 clone-tidymodels-repos.py yardstick
1313
python3 clone-tidymodels-repos.py recipes
1414
python3 clone-tidymodels-repos.py dials
15-
python3 clone-tidymodels-repos.py yardstick recipes dials
15+
python3 clone-tidymodels-repos.py parsnip
16+
python3 clone-tidymodels-repos.py yardstick recipes dials parsnip
1617
python3 clone-tidymodels-repos.py all
1718
1819
Exit Codes:
@@ -37,6 +38,7 @@
3738
"yardstick": "https://github.com/tidymodels/yardstick.git",
3839
"recipes": "https://github.com/tidymodels/recipes.git",
3940
"dials": "https://github.com/tidymodels/dials.git",
41+
"parsnip": "https://github.com/tidymodels/parsnip.git",
4042
}
4143

4244
# ANSI color codes (fallback to no color on Windows without colorama)
@@ -220,15 +222,17 @@ def main():
220222
epilog="Examples:\n"
221223
" python3 clone-tidymodels-repos.py yardstick\n"
222224
" python3 clone-tidymodels-repos.py recipes\n"
223-
" python3 clone-tidymodels-repos.py yardstick recipes\n"
225+
" python3 clone-tidymodels-repos.py dials\n"
226+
" python3 clone-tidymodels-repos.py parsnip\n"
227+
" python3 clone-tidymodels-repos.py yardstick recipes dials parsnip\n"
224228
" python3 clone-tidymodels-repos.py all",
225229
formatter_class=argparse.RawDescriptionHelpFormatter
226230
)
227231
parser.add_argument(
228232
"packages",
229233
nargs="+",
230234
metavar="PACKAGE",
231-
help="Package(s) to clone: yardstick, recipes, or all"
235+
help="Package(s) to clone: yardstick, recipes, dials, parsnip, or all"
232236
)
233237

234238
args = parser.parse_args()
@@ -277,7 +281,7 @@ def main():
277281
if not packages_to_clone:
278282
print_error("No valid packages specified")
279283
print()
280-
print("Valid packages: yardstick, recipes, dials, all")
284+
print("Valid packages: yardstick, recipes, dials, parsnip, all")
281285
sys.exit(1)
282286

283287
# Clone each repository

developers/add-dials-parameter/references/scripts/clone-tidymodels-repos.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@
44
# Clone Tidymodels Repositories
55
#
66
# Description:
7-
# Clones tidymodels package repositories (yardstick, recipes, dials) for
8-
# development reference. Creates repos/ directory, clones with shallow clone
9-
# for speed, and updates .gitignore and .Rbuildignore to prevent committing
10-
# cloned code.
7+
# Clones tidymodels package repositories (yardstick, recipes, dials, parsnip)
8+
# for development reference. Creates repos/ directory, clones with shallow
9+
# clone for speed, and updates .gitignore and .Rbuildignore to prevent
10+
# committing cloned code.
1111
#
1212
# Usage:
1313
# ./clone-tidymodels-repos.sh yardstick
1414
# ./clone-tidymodels-repos.sh recipes
1515
# ./clone-tidymodels-repos.sh dials
16-
# ./clone-tidymodels-repos.sh yardstick recipes dials
16+
# ./clone-tidymodels-repos.sh parsnip
17+
# ./clone-tidymodels-repos.sh yardstick recipes dials parsnip
1718
# ./clone-tidymodels-repos.sh all
1819
#
1920
# Exit Codes:
@@ -41,6 +42,7 @@ REPOS=(
4142
"yardstick|https://github.com/tidymodels/yardstick.git"
4243
"recipes|https://github.com/tidymodels/recipes.git"
4344
"dials|https://github.com/tidymodels/dials.git"
45+
"parsnip|https://github.com/tidymodels/parsnip.git"
4446
)
4547

4648
# Function to print colored messages
@@ -181,13 +183,14 @@ main() {
181183
print_error "No packages specified."
182184
echo ""
183185
echo "Usage: $0 <package> [<package> ...]"
184-
echo " Packages: yardstick, recipes, dials, all"
186+
echo " Packages: yardstick, recipes, dials, parsnip, all"
185187
echo ""
186188
echo "Examples:"
187189
echo " $0 yardstick"
188190
echo " $0 recipes"
189191
echo " $0 dials"
190-
echo " $0 yardstick recipes dials"
192+
echo " $0 parsnip"
193+
echo " $0 yardstick recipes dials parsnip"
191194
echo " $0 all"
192195
exit 1
193196
fi

developers/add-dials-parameter/references/scripts/verify-setup.R

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ UUID_NO_REPOS <- "c8a7f1b5-7890"
2222
UUID_MISSING_YARDSTICK <- "d4e8b9c2-1111"
2323
UUID_MISSING_RECIPES <- "d4e8b9c2-2222"
2424
UUID_MISSING_DIALS <- "d4e8b9c2-7777"
25+
UUID_MISSING_PARSNIP <- "d4e8b9c2-9999"
2526
UUID_MISSING_RLANG <- "d4e8b9c2-3333"
2627
UUID_MISSING_CLI <- "d4e8b9c2-4444"
2728
UUID_MISSING_TIBBLE <- "d4e8b9c2-5555"
@@ -52,7 +53,7 @@ if (desc_exists) {
5253
package_name <- sub("^Package:\\s*", "", package_line[1])
5354
package_name <- trimws(package_name)
5455

55-
if (package_name %in% c("recipes", "yardstick", "dials")) {
56+
if (package_name %in% c("recipes", "yardstick", "dials", "parsnip")) {
5657
results$context <- "source"
5758
results$package_type <- package_name
5859
} else {
@@ -66,6 +67,8 @@ if (desc_exists) {
6667
results$package_type <- "yardstick"
6768
} else if (grepl("dials", imports_line[1])) {
6869
results$package_type <- "dials"
70+
} else if (grepl("parsnip", imports_line[1])) {
71+
results$package_type <- "parsnip"
6972
} else {
7073
results$package_type <- "unknown"
7174
}
@@ -113,21 +116,21 @@ if (results$context != "source") {
113116
# Check Repository Access (always check unless source development)
114117
# Check for repos even if package_type is unknown
115118
has_repos <- FALSE
116-
if (results$package_type %in% c("recipes", "yardstick", "dials")) {
119+
if (results$package_type %in% c("recipes", "yardstick", "dials", "parsnip")) {
117120
# Check for specific repo
118121
repo_path <- file.path("repos", results$package_type)
119122
has_repos <- dir.exists(repo_path)
120123
} else {
121124
# Unknown package type - check if ANY tidymodels repos exist
122-
has_repos <- dir.exists("repos/yardstick") || dir.exists("repos/recipes") || dir.exists("repos/dials")
125+
has_repos <- dir.exists("repos/yardstick") || dir.exists("repos/recipes") || dir.exists("repos/dials") || dir.exists("repos/parsnip")
123126
}
124127

125128
if (!has_repos) {
126129
add_warning(UUID_NO_REPOS)
127130
}
128131

129132
# Check Dependencies (only if DESCRIPTION exists and package type is known)
130-
if (desc_exists && results$package_type %in% c("recipes", "yardstick", "dials")) {
133+
if (desc_exists && results$package_type %in% c("recipes", "yardstick", "dials", "parsnip")) {
131134
# Get Imports field
132135
imports_start <- grep("^Imports:", desc_lines)
133136
if (length(imports_start) > 0) {
@@ -161,6 +164,10 @@ if (results$context != "source") {
161164
if (!grepl("rlang", imports_text)) add_warning(UUID_MISSING_RLANG)
162165
if (!grepl("cli", imports_text)) add_warning(UUID_MISSING_CLI)
163166
if (!grepl("scales", imports_text)) add_warning(UUID_MISSING_SCALES)
167+
} else if (results$package_type == "parsnip") {
168+
if (!grepl("parsnip", imports_text)) add_warning(UUID_MISSING_PARSNIP)
169+
if (!grepl("rlang", imports_text)) add_warning(UUID_MISSING_RLANG)
170+
if (!grepl("cli", imports_text)) add_warning(UUID_MISSING_CLI)
164171
}
165172
}
166173
}

developers/add-parsnip-engine/references/scripts/README.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Repository cloning scripts for tidymodels development reference.
44

55
## Purpose
66

7-
These scripts clone tidymodels package repositories (yardstick, recipes, dials) into a local `repos/` directory for development reference. Having local access to the source code helps Claude provide more accurate guidance with real implementation examples during skill execution.
7+
These scripts clone tidymodels package repositories (yardstick, recipes, dials, parsnip) into a local `repos/` directory for development reference. Having local access to the source code helps Claude provide more accurate guidance with real implementation examples during skill execution.
88

99
## Scripts
1010

@@ -32,8 +32,11 @@ We provide three platform-native scripts for the best user experience:
3232
# Clone dials
3333
./developers/shared-references/scripts/clone-tidymodels-repos.sh dials
3434

35+
# Clone parsnip
36+
./developers/shared-references/scripts/clone-tidymodels-repos.sh parsnip
37+
3538
# Clone multiple packages
36-
./developers/shared-references/scripts/clone-tidymodels-repos.sh yardstick recipes dials
39+
./developers/shared-references/scripts/clone-tidymodels-repos.sh yardstick recipes dials parsnip
3740

3841
# Clone all packages
3942
./developers/shared-references/scripts/clone-tidymodels-repos.sh all
@@ -51,8 +54,11 @@ We provide three platform-native scripts for the best user experience:
5154
# Clone dials
5255
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 dials
5356
57+
# Clone parsnip
58+
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 parsnip
59+
5460
# Clone multiple packages
55-
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 yardstick recipes dials
61+
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 yardstick recipes dials parsnip
5662
5763
# Clone all packages
5864
.\tidymodels\shared-references\scripts\clone-tidymodels-repos.ps1 all
@@ -104,7 +110,7 @@ All scripts use consistent exit codes:
104110
- macOS: Install Xcode Command Line Tools or download from https://git-scm.com/downloads
105111
- Linux: Install via package manager (`apt-get install git`, `yum install git`, etc.)
106112
- Windows: Download from https://git-scm.com/downloads
107-
- **Disk Space**: ~5-8 MB per repository (yardstick, recipes, dials - shallow clones)
113+
- **Disk Space**: ~5-8 MB per repository (yardstick, recipes, dials, parsnip - shallow clones)
108114
- **Python script only**: Python 3.6 or higher
109115

110116
## Directory Structure
@@ -125,7 +131,11 @@ my-package/
125131
│ │ ├── R/
126132
│ │ ├── tests/
127133
│ │ └── ...
128-
│ └── dials/ # Cloned repository
134+
│ ├── dials/ # Cloned repository
135+
│ │ ├── R/
136+
│ │ ├── tests/
137+
│ │ └── ...
138+
│ └── parsnip/ # Cloned repository
129139
│ ├── R/
130140
│ ├── tests/
131141
│ └── ...

0 commit comments

Comments
 (0)