Skip to content

Upgrade to mizer 3.4 - #5

Open
gustavdelius wants to merge 3 commits into
baldrech:masterfrom
gustavdelius:upgrade-mizer-3.4
Open

Upgrade to mizer 3.4#5
gustavdelius wants to merge 3 commits into
baldrech:masterfrom
gustavdelius:upgrade-mizer-3.4

Conversation

@gustavdelius

Copy link
Copy Markdown
Contributor

Summary of Changes

This PR upgrades mizerEvolution to be fully compatible with mizer 3.4:

1. Package Configuration & Documentation

  • DESCRIPTION: Updated dependency to mizer (>= 3.4.0), added lifecycle to Imports:, removed methods, configured testthat (>= 3.0.0, edition 3), and added package URL and BugReports.
  • NEWS.md: Added release notes for version 0.1.0.
  • R/mizerEvolution-package.R: Migrated to _PACKAGE roxygen documentation, cleaned up imports, and registered global variables.
  • _pkgdown.yml: Added pkgdown website configuration organized by topic and generated the complete website under docs/.

2. Core Evolution Mechanics & Constructors

  • evoParams():
    • Renamed deprecated arguments min_w_inf / max_w_inf to min_w_max / max_w_max, and R_factor to reproduction_level (with lifecycle::deprecate_warn for backward compatibility).
    • Registered extension metadata via recordExtension().
    • Modernized parameter accessors to use S3 generics (species_params(), gear_params(), resource_params()).
    • Wrapped model construction in with_info_level().
  • evoProject() & finalTouch():
    • Fixed undefined variable references (mAmplitude, eta, z0pre, h, f0, resident_params).
    • Handled array dimensions safely to prevent dimension dropping when subsetting.
    • Fully supported mutation and alien invasion schedules using either numeric rates or dataframe events.
  • extinctionRDD():
    • Cleaned thresholding and recruitment calculation logic.

3. Plotting Functions

  • Updated all plotting functions to check for S3 MizerSim using inherits().
  • Replaced deprecated mizer functions with modern counterparts (getERepro(), getMort()).
  • Fixed matrix/dataframe subsetting and dimnames across all plotting functions (plotDynamics, plotSS, plotevoFeeding, plotevoGrowth, plotStarvation, plotevoMortality, plotSpawn, plotPredRate, plotPredMort, plotevoTrait).

4. Tests & Quality Assurance

  • Upgraded test assertions to testthat 3.x (expect_s3_class()).
  • Added comprehensive unit tests for evoParams(), extinctionRDD(), alien_synthesis(), nameGenerator(), tempFun(), evoProject(), and all plotting functions (42 passing tests).
  • Verified with devtools::check(): 0 errors, 0 warnings, 0 notes.

gustavdelius and others added 3 commits September 5, 2020 15:02
- Require mizer >= 3.4.0 in DESCRIPTION and add lifecycle to Imports
- Register extension using recordExtension() in evoParams() and addSpecies()
- Use S3 accessors and classes (MizerParams and MizerSim)
- Rename deprecated evoParams arguments min_w_inf/max_w_inf to min_w_max/max_w_max and R_factor to reproduction_level
- Update rate function calls (getMort(), getERepro())
- Fix matrix dimensions and species subsetting across evoProject() and plot functions
- Set up testthat 3.0 test suite with 42 passing tests
- Configure and build pkgdown documentation website
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