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.
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") | ||
|
|
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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