Skip to content

Remove cutoff package dependency (removed from CRAN) - #302

Draft
ShixiangWang with Copilot wants to merge 6 commits into
mainfrom
copilot/resolve-build-failure-jul-2026
Draft

Remove cutoff package dependency (removed from CRAN)#302
ShixiangWang with Copilot wants to merge 6 commits into
mainfrom
copilot/resolve-build-failure-jul-2026

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

The cutoff package was removed from CRAN, causing pak::lockfile_create to fail during CI dependency resolution.

The package was loaded in Hiplot/155-risk-plot.qmd but never actually called — the cutoff calculation uses median() from base R.

  • Removed cutoff from DESCRIPTION imports
  • Removed install guard, library(cutoff) call, and dependency list entry from Hiplot/155-risk-plot.qmd and its .zh.qmd counterpart

Copilot AI linked an issue Jul 29, 2026 that may be closed by this pull request
The `cutoff` package was removed from CRAN, causing the CI build to fail
when resolving dependencies. The package was loaded but never actually
used in the tutorial code (the cutoff calculation uses base R's median()).

Closes #301
Copilot AI changed the title [WIP] Fix build failure during website render and deploy Remove cutoff package dependency (removed from CRAN) Jul 29, 2026
Copilot AI requested a review from ShixiangWang July 29, 2026 02:25
@github-actions

Copy link
Copy Markdown
Contributor

✅ QMD Format Check

⚠️ Format Warnings (recommended)

Hiplot/155-risk-plot.qmd

  • Missing recommended section: ## Example
  • No demo image found (recommended: ![](../images/...))

Automated check by the PR Review workflow.
See contribution guidance for the expected tutorial format.

@ShixiangWang

ShixiangWang commented Jul 29, 2026

Copy link
Copy Markdown
Member

考虑该包使用github 的版本依赖 https://github.com/choisy/cutoff ,以尽量保持对现有文档教程的不变动和支持? @copilot

1 similar comment
@ShixiangWang

Copy link
Copy Markdown
Member

考虑该包使用github 的版本依赖 https://github.com/choisy/cutoff ,以尽量保持对现有文档教程的不变动和支持? @copilot

…s removed from CRAN

Instead of removing the cutoff dependency entirely, switch to installing
from GitHub to keep the tutorial unchanged.

Closes #301

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

考虑该包使用github 的版本依赖 https://github.com/choisy/cutoff ,以尽量保持对现有文档教程的不变动和支持? @copilot

Done — switched to remotes::install_github("choisy/cutoff") in both .qmd files and added choisy/cutoff to the Remotes: field in DESCRIPTION. The tutorial content remains unchanged. See commit e2a2e6a.

@github-actions

Copy link
Copy Markdown
Contributor

✅ QMD Format Check

⚠️ Format Warnings (recommended)

Hiplot/155-risk-plot.qmd

  • Missing recommended section: ## Example
  • No demo image found (recommended: ![](../images/...))

Automated check by the PR Review workflow.
See contribution guidance for the expected tutorial format.

@ShixiangWang

Copy link
Copy Markdown
Member

@copilot 为什么action失败,能解决不?

These packages were also removed from CRAN, causing pak to fail when
resolving the dependency chain: fastStat → set → do → tmcn.

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 为什么action失败,能解决不?

CI 失败的原因已经变了——不再是 cutoff 的问题,而是 yikeshu0611/fastStat 的传递依赖 setdotmcn 也被从 CRAN 移除了。pak 在解析依赖链 fastStat → set → do → tmcn 时找不到这些包。

已在 DESCRIPTIONRemotes: 中添加了 yikeshu0611/setyikeshu0611/docran/tmcn,应该可以解决了。

@github-actions

Copy link
Copy Markdown
Contributor

✅ QMD Format Check

⚠️ Format Warnings (recommended)

Hiplot/155-risk-plot.qmd

  • Missing recommended section: ## Example
  • No demo image found (recommended: ![](../images/...))

Automated check by the PR Review workflow.
See contribution guidance for the expected tutorial format.

@ShixiangWang

Copy link
Copy Markdown
Member

@copilot 还是失败了

…motes

pak only resolves Remotes for packages listed as direct dependencies.
Adding these as Imports ensures pak looks for them in our Remotes field
instead of failing to find them on CRAN.

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 还是失败了

问题是 pak 只为项目的直接依赖查找 Remotes: 中的 GitHub 源,不会为间接依赖(fastStatset/do/tmcn)自动匹配。

已将 setdotmcn 也加入 DESCRIPTIONImports 中,这样 pak 会从我们的 Remotes: 字段找到它们的 GitHub 源。

@github-actions

Copy link
Copy Markdown
Contributor

✅ QMD Format Check

⚠️ Format Warnings (recommended)

Hiplot/155-risk-plot.qmd

  • Missing recommended section: ## Example
  • No demo image found (recommended: ![](../images/...))

Automated check by the PR Review workflow.
See contribution guidance for the expected tutorial format.

@ShixiangWang

Copy link
Copy Markdown
Member

@copilot 还是有问题,彻底解决下?

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor Author

@copilot 还是有问题,彻底解决下?

CI 失败原因是 do 包(fastStat 的间接依赖,链路:fastStat → set → do)与当前版本的 data.table 不兼容——do 试图导出 .__T__[:base,但该符号已从 data.table 命名空间中移除,导致编译失败。

由于 fastStat 在教程中只是被 library() 加载,实际代码中从未调用(cutoff 计算用的是 base R 的 median()),已将 fastStat 及其整条依赖链(setdotmcn)从 DESCRIPTION 和两个 .qmd 文件中移除。cutoff 保持 GitHub 安装不变。

@github-actions

Copy link
Copy Markdown
Contributor

✅ QMD Format Check

⚠️ Format Warnings (recommended)

Hiplot/155-risk-plot.qmd

  • Missing recommended section: ## Example
  • No demo image found (recommended: ![](../images/...))

Automated check by the PR Review workflow.
See contribution guidance for the expected tutorial format.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Quarto Render Preview

The new or modified Quarto files have been rendered and are available as artifacts.

🔗 View and Download Rendered Files

Click the link above, scroll to the "Artifacts" section at the bottom of the page, and download quarto-rendered-files to preview the rendered HTML files.

Modified files:

Hiplot/155-risk-plot.qmd Hiplot/155-risk-plot.zh.qmd

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.

build failure JUL 2026

2 participants