Skip to content

Conversation

@sumiya11
Copy link
Collaborator

@sumiya11 sumiya11 commented Nov 6, 2025

Adds a function reparametrize_interactive. See the picture below. This is probably not the final version. Needs pogudingleb/RationalFunctionFields.jl#16

image

This new function allows:
- Selecting reparametrization from a pool of identifiable functions.
- Specifying custom functions for reparametrization.
- Assigning names to new variables.
@sumiya11 sumiya11 requested a review from Copilot November 11, 2025 16:51
Copilot finished reviewing on behalf of sumiya11 November 11, 2025 16:52
Copy link

Copilot AI left a 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")

Copy link

Copilot AI Nov 11, 2025

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.

Suggested change
# (fixed indentation: replaced tab with spaces)

Copilot uses AI. Check for mistakes.
simplify = :strong,
prob_threshold = prob_threshold,
return_all = true,
loglevel = Logging.Warn,
Copy link

Copilot AI Nov 11, 2025

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.

Suggested change
loglevel = Logging.Warn,
loglevel = Logging.Warn,

Copilot uses AI. Check for mistakes.
simplify = :strong,
prob_threshold = prob_threshold,
return_all = true,
loglevel = Logging.Warn,
Copy link

Copilot AI Nov 11, 2025

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.

Copilot uses AI. Check for mistakes.
catch e
printstyled(
output,
"\n ==> Selected functions is not enough to reparametrize. Please select more.\n",
Copy link

Copilot AI Nov 11, 2025

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).

Suggested change
"\n ==> Selected functions is not enough to reparametrize. Please select more.\n",
"\n ==> Selected functions are not enough to reparametrize. Please select more.\n",

Copilot uses AI. Check for mistakes.
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