Skip to content

Update to mizer's new simpler S3 extension mechanism - #6

Open
gustavdelius wants to merge 1 commit into
masterfrom
s4-to-s3
Open

Update to mizer's new simpler S3 extension mechanism#6
gustavdelius wants to merge 1 commit into
masterfrom
s4-to-s3

Conversation

@gustavdelius

Copy link
Copy Markdown
Member

Summary of Changes

Updates mizerShelf to work with mizer's new simpler S3 extension mechanism:

  • Remove obsolete session registration:

    • Removed .onLoad() in R/mizerShelf-package.R (registerExtension() and makeActiveBinding() are no longer needed).
    • Removed unneeded methods dependency from DESCRIPTION and R/plots.R (is() -> inherits()).
  • Adopt S3 extension classes and tracking:

    • Updated newDetritusCarrionParams() in R/newDetritusCarrionParams.R to call recordExtension(params, "mizerShelf", version = ..., requirement = "sizespectrum/mizerShelf") and coerceToExtensionClass(params).
    • Updated documentation in R/mizerShelf-class.R and R/data.R to describe S3 extension classes (c("mizerShelf", "MizerParams") / c("mizerShelfSim", "MizerSim")) and standard lazy-loading.
  • Migrate bundled dataset:

    • Upgraded data/NWMed_params.rda to an S3 MizerParams object with extension metadata and class vector c("mizerShelf", "MizerParams").
  • Update tests and vignettes:

    • Replaced expect_s4_class() with expect_s3_class() across test files in tests/testthat/.
    • Updated vignettes/extension_mechanism.Rmd to explain S3 extension classes and coercion.
    • Updated vignettes/explore_scenarios.Rmd and NEWS.md.
    • All 147 tests pass and R CMD check runs cleanly.

- Remove obsolete .onLoad session registration (registerExtension, makeActiveBinding)
- Adopt S3 extension classes and coerceToExtensionClass / recordExtension workflow
- Upgrade bundled NWMed_params dataset to an S3 object
- Update tests to use expect_s3_class instead of expect_s4_class
- Update documentation and vignettes for S3 extension mechanism
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.

1 participant