-
-
Notifications
You must be signed in to change notification settings - Fork 21
Add interactive reparametrization #463
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
base: master
Are you sure you want to change the base?
Conversation
This new function allows: - Selecting reparametrization from a pool of identifiable functions. - Specifying custom functions for reparametrization. - Assigning names to new variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds an interactive reparametrization function reparametrize_interactive that allows users to interactively select identifiable functions for reparametrizing ODE models through a REPL-based menu interface. The function provides a user-friendly way to choose new states and parameters with custom naming.
- Adds interactive menu-driven reparametrization with REPL integration
- Implements polynomial parsing utilities from user input
- Extends existing reparametrization functionality with custom variable naming
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/StructuralIdentifiability.jl | Exports new reparametrize_interactive function and imports REPL dependencies |
| src/parametrizations.jl | Implements interactive reparametrization with menu selection, custom variable naming, and helper functions |
| src/identifiable_functions.jl | Adds return_all parameter to support returning all identifiable functions |
| src/util.jl | Adds polynomial expression parser myeval for parsing user input |
| src/logging.jl | Extends logging configuration to support custom output streams |
| test/interactive.jl | Adds tests for interactive reparametrization with simulated REPL input |
| Project.toml | Adds REPL dependency |
| .gitignore | Adds .ipynb_checkpoints to ignored files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # The licence is MIT. | ||
| function simulate_input(keys...; kwargs...) | ||
| keydict = Dict(:up => "\e[A", :down => "\e[B", :enter => "\r", :newline => "\n") | ||
|
|
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation: line 7 uses tabs while the rest of the file uses spaces. This should be changed to spaces for consistency with Julia style guidelines.
| # (fixed indentation: replaced tab with spaces) |
| simplify = :strong, | ||
| prob_threshold = prob_threshold, | ||
| return_all = true, | ||
| loglevel = Logging.Warn, |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation: line 281 uses tabs while the rest of the file uses spaces. This should be changed to spaces for consistency.
| loglevel = Logging.Warn, | |
| loglevel = Logging.Warn, |
| simplify = :strong, | ||
| prob_threshold = prob_threshold, | ||
| return_all = true, | ||
| loglevel = Logging.Warn, |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation: line 288 uses tabs while the rest of the file uses spaces. This should be changed to spaces for consistency.
| catch e | ||
| printstyled( | ||
| output, | ||
| "\n ==> Selected functions is not enough to reparametrize. Please select more.\n", |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grammatical error in error message: 'Selected functions is' should be 'Selected functions are' (plural subject requires plural verb).
| "\n ==> Selected functions is not enough to reparametrize. Please select more.\n", | |
| "\n ==> Selected functions are not enough to reparametrize. Please select more.\n", |
Adds a function
reparametrize_interactive. See the picture below. This is probably not the final version. Needs pogudingleb/RationalFunctionFields.jl#16