Skip to content

Add vcell_infix_to_python_infix API#13

Closed
Copilot wants to merge 1 commit intoAddedPythonInfixfrom
copilot/sub-pr-11
Closed

Add vcell_infix_to_python_infix API#13
Copilot wants to merge 1 commit intoAddedPythonInfixfrom
copilot/sub-pr-11

Conversation

Copy link

Copilot AI commented Mar 3, 2026

Exposes VCell's Expression.infix_Python() through the native GraalVM layer as a callable Python API, converting VCell expression syntax to Python-compatible infix (e.g. ^**, csc(x)1.0/math.sin(x)).

Changes

  • Python APIvcell_infix_to_python_infix(vcell_infix: str) -> tuple[bool, str, str] added to model_utils.py and exported from libvcell
  • Native entrypointvcellInfixToPythonInfix @CEntryPoint in Entrypoints.java wraps ModelUtils.get_python_infix() with buffer-size safety and exception handling
  • XmlHelper.cloneUsingXML = true – set consistently in all model/solver utility entry methods (was missing, causing cloning failures)
  • CI – macOS runners bumped to macos-15 / macos-15-intel

Usage

from libvcell import vcell_infix_to_python_infix

success, msg, python_expr = vcell_infix_to_python_infix("id_1 * csc(id_0 ^ 2.2)")
# python_expr == "(id_1 * (1.0/math.sin(((id_0)**(2.2)))))"

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add Python infix functionality Add vcell_infix_to_python_infix API Mar 3, 2026
@jcschaff
Copy link
Member

jcschaff commented Mar 3, 2026

copied description to the correct PR ... closing this one.

@jcschaff jcschaff closed this Mar 3, 2026
@jcschaff jcschaff deleted the copilot/sub-pr-11 branch March 3, 2026 18:09
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