Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor distribution names #685

Merged

Conversation

msupernaw
Copy link
Contributor

@msupernaw msupernaw commented Nov 18, 2024

What is the feature?

  • Rename the distributions removing TMB from their name

How have you implemented the solution?

  • Search and replaced 😄

Does the PR impact any other area of the project, maybe another repo?

  • A current PR for the R interface, which is why this a PR to that branch.

Copy link
Contributor

Instructions for code reviewer

Hello reviewer, thanks for taking the time to review this PR!

  • Please use this checklist during your review, checking off items that you have verified are complete!
  • For PRs that don't make changes to code (e.g., changes to README.md or Github actions workflows), feel free to skip over items on the checklist that are not relevant. Remember it is still important to do a thorough review.
  • Then, comment on the pull request with your review indicating where you have questions or changes need to be made before merging.
  • Remember to review every line of code you’ve been asked to review, look at the context, make sure you’re improving code health, and compliment developers on good things that they do.
  • PR reviews are a great way to learn, so feel free to share your tips and tricks. However, for optional changes (i.e., not required for merging), please include nit: (for nitpicking) before making the suggestion. For example, nit: I prefer using a data.frame() instead of a matrix because...
  • Engage with the developer when they respond to comments and check off additional boxes as they become complete so the PR can be merged in when all the tasks are fulfilled. Make it clear when this has been reached by commenting on the PR with something like This PR is now ready to be merged, no changes needed.

Checklist

  • The PR is requested to be merged into the appropriate branch (typically main)
  • The code is well-designed.
  • The functionality is good for the users of the code.
  • Any User Interface changes are sensible and look good.
  • The code isn’t more complex than it needs to be.
  • Code coverage remains high, indicating the new code is tested.
  • The developer used clear names for everything.
  • Comments are clear and useful, and mostly explain why instead of what.
  • Code is appropriately documented (doxygen and roxygen).

Copy link
Contributor

@kellijohnson-NOAA kellijohnson-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • devtools::document() needs to be ran
  • we follow a no-merge policy, this is not a big deal here because the commits will be squashed anyway ... but in the future please use git fetch -a git rebase --autostash origin/<branch name>

@msupernaw I know that you are off today so I might take a stab at some of these things.
@Bai-Li-NOAA this PR is to your dev branch because the changes impact the R interface, do you mind if after the changes are made to the PR that it be brought into your branch?

Copy link
Contributor

@kellijohnson-NOAA kellijohnson-NOAA Nov 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 8--9 should be changed to not have TMB in their name I believe.

#ifndef FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_TMB_DISTRIBUTION_HPP
#define FIMS_INTERFACE_RCPP_RCPP_OBJECTS_RCPP_TMB_DISTRIBUTION_HPP

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@msupernaw can you confirm that this change is correct?

inst/include/interface/rcpp/rcpp_interface.hpp Outdated Show resolved Hide resolved
tests/testthat/test-rcpp-tmb-distributions.R Outdated Show resolved Hide resolved
@Bai-Li-NOAA
Copy link
Contributor

@kellijohnson-NOAA, works for me! Thanks @msupernaw for the refactoring work!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This figure should not have been committed I do not think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This figure should not have been committed I do not think.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should not have been committed.

Removes TMB from Distribution names and files to clean up the code and
allow the downstream R interface to also remove these names. This is part
of ensuring that the code is portable. If we change from TMB in the future
we do not want to have to rename these things when a distribution is
just a distribution, it does not have to come from TMB. Thank you
@msupernaw for these changes.
@kellijohnson-NOAA kellijohnson-NOAA force-pushed the refactor_distribution_names branch from 7ac4f87 to 7f72769 Compare November 25, 2024 18:53
@kellijohnson-NOAA kellijohnson-NOAA merged commit f734d70 into dev-r-setup-wrapper-functions Nov 25, 2024
9 checks passed
@kellijohnson-NOAA kellijohnson-NOAA deleted the refactor_distribution_names branch November 25, 2024 19:56
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