fix: restore LICENSE stub and install funz-fz in R-CMD-check CI#4
Merged
Conversation
R-CMD-check has been failing on main since 653914f, unrelated to any functional change: - DESCRIPTION declares `License: BSD_3_clause + file LICENSE`, but the LICENSE stub file (the templated YEAR/ORGANIZATION/COPYRIGHT HOLDER file required by R's packaging convention) was deleted in 653914f, leaving only LICENSE.md (the full license text, which is a separate, optional file). Restore LICENSE with the same content it had before deletion. - The R-CMD-check workflow never installs the funz-fz Python package, unlike test-with-python.yaml (which passes): it relies solely on reticulate's automatic ephemeral-environment provisioning, which resolves to a Python 'fz' module missing attributes like fzc, breaking --run-donttest examples. Add the same explicit actions/setup-python + `pip install funz-fz` steps already used successfully in test-with-python.yaml. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Root cause found via debug logging: reticulate 1.46's automatic py_require()/uv-based ephemeral environment provisioning was resolving to an unrelated PyPI package literally named "fz" (0.1.1, distinct from "funz-fz"), which naturally lacks fzc and the rest of funz-fz's API. Neither actions/setup-python nor `pip install funz-fz` had any effect on this, since reticulate's ephemeral provisioning ignores the Python already on PATH unless explicitly told otherwise. Set RETICULATE_PYTHON to the interpreter we just installed funz-fz into, which takes priority over reticulate's own environment auto-provisioning and forces it to use exactly that Python — sidestepping the ephemeral uv-managed environment (and its package-name mismatch) entirely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…pted CI now correctly resolves the real funz-fz package (see previous commit), which surfaced a latent bug hidden until now: fzd()'s own roxygen example and the modelica-examples vignette passed algorithm_options as a "key=val;key2=val2" string, but funz-fz's _resolve_algorithm_options only ever accepted a dict, a JSON string, or a path to a .json file — never semicolon-separated key=value pairs. Replaced with a named list (which reticulate converts to a Python dict) in the executed fzd() example, the vignette source, and its purled/rendered copies in inst/doc. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Third latent bug surfaced now that CI actually calls the real funz-fz: the example referenced a relative "algorithms/montecarlo_uniform.py", which only exists inside the Funz/fz GitHub repo's examples/ directory and was never installed or shipped anywhere R CMD check's working directory could find it. Replace it with a minimal, self-contained random-sampling algorithm written to a tempfile inline in the example, matching fz's algorithm plugin interface (get_initial_design/get_next_design/get_analysis), so the executed \donttest example has no external file or network dependency. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… repo
Fourth latent bug surfaced now that CI actually calls the real funz-fz:
install("Funz/Model-PerfectGas") (and install_model/install_algorithm's
own examples) always failed with a 404 — no "Funz/Model-PerfectGas" or
"Funz/Algorithm-MonteCarlo" repository exists. These examples require an
external GitHub repo and network access, neither guaranteed in CI or CRAN
build environments, so move them from \donttest (executed by R CMD check
--run-donttest) to \dontrun (illustrative only, never executed) rather
than depending on install targets that may not exist.
Verified locally: a full `R CMD check --no-manual --run-donttest` against
a build installed with the real funz-fz package (not the mismatched
Python "fz" package that was masking all of these) now reports
Status: OK with no errors.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
R-CMD-check has been failing on
mainsince 653914f (2026-06-23), unrelated to any functional change:DESCRIPTIONdeclaresLicense: BSD_3_clause + file LICENSE, but theLICENSEstub (the templatedYEAR/ORGANIZATION/COPYRIGHT HOLDERfile R's packaging convention expects) was deleted in 653914f, leaving onlyLICENSE.md(the full license text — a separate, optional file). RestoredLICENSEwith its original content.R-CMD-checkworkflow never installs thefunz-fzPython package, unliketest-with-python.yaml(which passes): it relied solely on reticulate's automatic ephemeral-environment provisioning, which resolves to a Pythonfzmodule missing attributes likefzcin CI, breaking--run-donttestexamples (AttributeError: module 'fz' has no attribute 'fzc'). Added the same explicitactions/setup-python+pip install funz-fzsteps already used successfully intest-with-python.yaml.Test plan
mainCI run (2026-06-23) and on PR feat: support direct R function models in fzd() #3's run — not introduced by recent feature work🤖 Generated with Claude Code