Skip to content

[codex] Add three-parameter double logistic selectivity#1436

Draft
jimianelli wants to merge 1 commit into
NOAA-FIMS:mainfrom
jimianelli:codex/double-logistic3-selectivity
Draft

[codex] Add three-parameter double logistic selectivity#1436
jimianelli wants to merge 1 commit into
NOAA-FIMS:mainfrom
jimianelli:codex/double-logistic3-selectivity

Conversation

@jimianelli

@jimianelli jimianelli commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a DoubleLogistic3Selectivity C++ functor implementing the 3-parameter double logistic form from jimianelli/selex.
  • Expose the new selectivity through the Rcpp module interface, R exports, and default parameter creation as DoubleLogistic3.
  • Add focused gtest and testthat coverage for the math helper, time-indexed evaluation, and R interface.

Validation

  • ./build/tests/gtest/fims_math_double_logistic3
  • ./build/tests/gtest/DoubleLogistic3_DoubleLogistic3Selectivity_Evaluate
  • R CMD INSTALL .
  • Rscript -e "library(FIMS); testthat::test_file('tests/testthat/test-rcpp-selectivity.R')"

Instructions for code reviewer

👋Hello reviewer👋, thank you for taking the time to review this PR!

  • Please use this checklist during your review, checking off items that you have verified are complete but feel free to skip over items that are not relevant!
  • See the GitHub documentation for how to comment on a PR to indicate where you have questions or changes are needed before approving the PR.
  • Please use standard conventional messages for both commit messages and comments
  • PR reviews are a great way to learn so feel free to share your tips and tricks. However, when suggesting changes to the PR that are optional please include nit: (for nitpicking) as the comment type. For example, nit: I prefer using a data.frame() instead of a matrix because ...
  • Engage with the developer. Make it clear when the PR is approved by selecting the approved status, and potentially commenting on the PR with something like This PR is now ready to be merged.

Checklist

  • The PR requests the appropriate base branch (dev for features and main for hot fixes)
  • The code is well-designed
  • The code is designed well for both users and developers
  • Code coverage remains high- [ ] Comments are clear, useful, and explain why instead of what
  • Code is appropriately documented (doxygen and roxygen)

@github-actions

Copy link
Copy Markdown
Contributor

🎨 Chore: code formatting workflow

Our automated workflows cannot run on forks because of permission issues, and thus, we ask that you run the following code locally and push any changes that are created to your feature branch. You will only be reminded of this once per PR. Thank you!

Format C++ code

  1. Install clang-format version 18.0.0
  2. Run the following command from the repository root:
    clang-format -i --style="{BasedOnStyle: Google, SortIncludes: false}" $(find ./inst/include ./src ./tests/gtest -name "*.hpp" -o -name "*.cpp")

Format R code

  1. Install {styler} and {roxygen2}
  2. Run the following commands in R from the repository root:
styler::style_pkg() # Style R code
roxygen2::roxygenise() # Update documentation
styler::style_pkg() # Style R code again
roxygen2::roxygenise() # Update documentation again
usethis::use_tidy_description() # Style DESCRIPTION file

Push changes

  1. Commit the formatting with a commit message of "Chore: format feature branch"
  2. Push to your fork

@codecov

codecov Bot commented Apr 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 41.29353% with 118 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.40%. Comparing base (b9d8f56) to head (d021fc7).

Files with missing lines Patch % Lines
...e/interface/rcpp/rcpp_objects/rcpp_selectivity.hpp 16.40% 107 Missing ⚠️
R/create_default_parameters.R 20.00% 8 Missing ⚠️
inst/include/common/fims_math.hpp 82.35% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1436      +/-   ##
==========================================
+ Coverage   82.97%   88.40%   +5.42%     
==========================================
  Files          54       85      +31     
  Lines        2214     8613    +6399     
  Branches      578      581       +3     
==========================================
+ Hits         1837     7614    +5777     
- Misses        277      965     +688     
+ Partials      100       34      -66     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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