Skip to content

Conversation

@Gero1999
Copy link
Collaborator

Issue

Closes #826

Description

This pull request introduces a new utility function for generating settings code from a template and makes a small bug fix in the ratio calculation logic.

  • Added a default_mapping list and a new get_settings_code function in R/get_session_code.R to automate the generation of settings code from an RDS file, with an example invocation provided for demonstration.

  • Updated calculate_table_ratios_app in R/ratio_calculations.R to ensure ratio_table is always treated as a data frame, preventing errors with NULL objects.

Definition of Done

  • get_settings_code() works same way as get_session_code()

How to test

Use the function on a settings file and check that it works

Contributor checklist

  • Code passes lintr checks
  • Code passes all unit tests
  • New logic covered by unit tests
  • New logic is documented
  • App or package changes are reflected in NEWS
  • Package version is incremented

Notes to reviewer

Better to review/merge first #789

Gero1999 and others added 30 commits November 27, 2025 09:25
apply relevant copilot suggestions

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Mateusz Kołomański <63905560+m-kolomanski@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

Enhancement: create R script from settings file

2 participants