sys-bio / antimony

BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Re-implement CellML translation #86

Open harveymannering opened 1 year ago

harveymannering commented 1 year ago

I am having trouble using the CellML related functions in antimony in Python, specifically getCellMLString() doesn't seem to exist (see picture). I am used version 2.13.4 which I pip installed.

image

Looks like this is having downstream effects on Tellurium too. If I run the example given here in a notebook, I get the following error:

AttributeError                            Traceback (most recent call last)
Cell In[1], line 22
     19 print('...')
     21 # convert to CellML
---> 22 cellml_model = te.antimonyToCellML(ant_model)
     23 print('cellml_model (from Antimony)')
     24 print('*'*80)

File [...\Python\Python311\Lib\site-packages\tellurium\tellurium.py:627, in antimonyToCellML(ant)
    625 _checkAntimonyReturnCode(code)
    626 mid = antimony.getMainModuleName()
--> 627 return antimony.getCellMLString(mid)

AttributeError: module 'antimony' has no attribute 'getCellMLString'
luciansmith commented 1 year ago

Yes, all CellML-related functions have been disabled. They used the CellML API, and it eventually got too difficult to maintain, so the functionality was dropped. It is hoped that we'll be able to use libCellML soon, which is inching its way Zeno's-Paradox-style towards a 1.0 release, and might actually have enough functionality as it stands to replace the old code, but we haven't had the time to actually implement the change-over yet.