Skip to content

Feature: Comprehensive Refactor for Tidyverse Alignment & Enhanced Functionality (v1.7.0) #108

Merged
auzaheta merged 39 commits into
mainfrom
develop
Jun 23, 2025
Merged

Feature: Comprehensive Refactor for Tidyverse Alignment & Enhanced Functionality (v1.7.0) #108
auzaheta merged 39 commits into
mainfrom
develop

Conversation

@auzaheta

Copy link
Copy Markdown
Collaborator

Description

This Pull Request introduces a significant set of enhancements and refactoring to the goldfish package, aiming to improve consistency, clarity, and extend the functionality of various effects. These changes are part of our continuous effort to align with modern R package development best practices and the stocnet ecosystem.

Here's a detailed summary of the key changes:

  • New history Argument for trans() and cycle() Effects:

    • Details: Introduces a new history argument to the trans() (transitivity) and cycle() effects. This argument allows users to specify how the temporal sequence or consecutiveness of events influences the calculation of these effects (e.g., "pooled", "sequential", "consecutive"). This provides greater flexibility for modelling nuanced dynamic network processes.
  • New make_data() Function for Data Preparation:

    • Details: A new make_data() function has been introduced to align with Stocnet style. This centralises data preprocessing logic and adapts the existing estimation functions (estimate_*) to utilise this new interface. This improves data flow.
  • Tidyverse-Style Renaming of Functions and Arguments:

    • Details: All public functions, as well as function arguments, have been systematically renamed to follow the snake_case convention. This enhances readability, consistency, and aligns the package with the widely adopted tidyverse style guide, making it more intuitive for R users.
    • Deprecation: Old function names have been deprecated and will issue warnings upon use, guiding users to the new names. Backwards compatibility is maintained for a transition period, with old names scheduled for removal in a future major release.
  • Dedicated Options Management for Estimation and Preprocessing:

    • Details: Introduced set_estimate_opt() and set_preprocessing_opt() functions. These provide a clear and centralised way for users to set and review internal algorithms' arguments related to the estimation and preprocessing phases, respectively. This improves transparency and user control over the model fitting pipeline.
  • Explicit Naming for Estimation Functions:

    • Details: The model argument from the main estimate() function has been removed. Instead, users now call specific functions directly to estimate different model types: estimate_dynam(), estimate_dynami(), and estimate_rem(). This makes the user interface more explicit and discoverable.

Closes Issue #105
Closes Issue #100

These changes collectively represent a significant step forward in the usability, maintainability, and extensibility of the goldfish package.

Checklist:

  • I have added tests that prove my fix is effective or that my feature works
  • The package builds on my OS without issues (please add workstation details)
  • My changes generate no new warnings
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (.R, NEWS.md)
  • I have bumped the version by the appropriate increment in the DESCRIPTION file (major, minor, patch)

WylieMabel and others added 30 commits April 22, 2025 15:56
…utside of the range of `startTime` and `endTime`
* Rename class diagnostics functions.
* WIP rename make data functions.
…e, now at 58%. Also implemented and tested different history options for trans.
…n to the same changes

Merge branch 'feature/history' of https://github.com/stocnet/goldfish into feature/history

# Conflicts:
#	R/functions_effects_DyNAM_choice.R
…s to the REM functions calling the updated choice functions
Merge branch 'feature/history' into refactor/rename-functions

# Conflicts:
#	R/functions_parsing.R
- ignoreRep to ignore_repetitions
- transformFun to transformer_fn
- aggregateFun to summarize_fn
- isTwoMode to is_two_mode
auzaheta added 9 commits June 8, 2025 01:58
Merge branch 'refactor/rename-functions' into develop

# Conflicts:
#	NEWS.md
Merge branch 'main' into develop

# Conflicts:
#	vignettes/dynami-example.R
#	vignettes/dynami-example.Rmd
#	vignettes/teaching/plot-teaching2-1.png
#	vignettes/teaching1.R
#	vignettes/teaching2.R
#	vignettes/teaching2.Rmd
@auzaheta auzaheta merged commit 67a99bb into main Jun 23, 2025
8 checks passed
@jhollway

Copy link
Copy Markdown
Collaborator

This is great @auzaheta . Let's maybe catch up today when you get in?

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.

3 participants