Skip to content

fix: restore LICENSE stub and install funz-fz in R-CMD-check CI#4

Merged
yannrichet-asnr merged 6 commits into
mainfrom
fix/ci-license-and-python-setup
Jul 12, 2026
Merged

fix: restore LICENSE stub and install funz-fz in R-CMD-check CI#4
yannrichet-asnr merged 6 commits into
mainfrom
fix/ci-license-and-python-setup

Conversation

@yannrichet-asnr

Copy link
Copy Markdown
Member

Summary

R-CMD-check has been failing on main since 653914f (2026-06-23), unrelated to any functional change:

  • DESCRIPTION declares License: BSD_3_clause + file LICENSE, but the LICENSE stub (the templated YEAR/ORGANIZATION/COPYRIGHT HOLDER file R's packaging convention expects) was deleted in 653914f, leaving only LICENSE.md (the full license text — a separate, optional file). Restored LICENSE with its original content.
  • The R-CMD-check workflow never installs the funz-fz Python package, unlike test-with-python.yaml (which passes): it relied solely on reticulate's automatic ephemeral-environment provisioning, which resolves to a Python fz module missing attributes like fzc in CI, breaking --run-donttest examples (AttributeError: module 'fz' has no attribute 'fzc'). Added the same explicit actions/setup-python + pip install funz-fz steps already used successfully in test-with-python.yaml.

Test plan

🤖 Generated with Claude Code

yannrichet and others added 6 commits July 12, 2026 15:15
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>
@yannrichet-asnr yannrichet-asnr merged commit a8d4ab1 into main Jul 12, 2026
5 checks passed
@yannrichet-asnr yannrichet-asnr deleted the fix/ci-license-and-python-setup branch July 12, 2026 14:52
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.

2 participants