Skip to content

Commit

Permalink
Added separate section for ODE in requirements and update setup to ac…
Browse files Browse the repository at this point in the history
…count for ODE
  • Loading branch information
langmm committed Sep 18, 2023
1 parent 25b76b0 commit d71747d
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 24 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ env:
INSTALLLPY: 0
INSTALLMATLAB: 0
INSTALLMPI: 1
INSTALLODE: 1
INSTALLOMP: 1
INSTALLPYGMENTS: 1
INSTALLPYTORCH: 1
Expand Down
14 changes: 12 additions & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ requirements:
- sysv_ipc # [not win]
run:
- GitPython
- antlr-python-runtime ==4.10
- chevron
- deprecation
- flask
Expand All @@ -73,7 +72,6 @@ requirements:
- requests
- scipy
- six
- sympy >=1.10
- sysv_ipc # [not win]
- toml
- unyt
Expand Down Expand Up @@ -238,6 +236,18 @@ outputs:
- {{ pin_subpackage('yggdrasil', exact=True) }}
- openpyxl
- pandas
- name: yggdrasil.ode
build:
string: py{{ PY_VER_MAJOR }}{{ PY_VER_MINOR }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
run_exports:
- {{ pin_subpackage('yggdrasil.ode') }}
requirements:
host:
- python
run:
- {{ pin_subpackage('yggdrasil', exact=True) }}
- antlr-python-runtime ==4.10
- sympy >=1.10
- name: yggdrasil.testing
build:
string: py{{ PY_VER_MAJOR }}{{ PY_VER_MINOR }}h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
GitPython
antlr4-python3-runtime==4.10 # [pip]
chevron
deprecation
flask
Expand All @@ -13,7 +12,6 @@ pyzmq
requests
scipy
six
sympy>=1.10
sysv_ipc; platform_system != 'Windows'
toml
unyt
31 changes: 18 additions & 13 deletions utils/requirements/requirements.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
}
},
"six",
"sympy>=1.10",
"toml",
"unyt",
"GitPython",
Expand All @@ -103,18 +102,6 @@
"os": "unix",
"host": true
}
},
{
"antlr": [
{
"name": "antlr4-python3-runtime==4.10",
"method": "pip"
},
{
"name": "antlr-python-runtime==4.10",
"method": "conda"
}
]
}
],
"extras": {
Expand Down Expand Up @@ -603,6 +590,24 @@
"openpyxl"
]
},
"ode": {
"description": "Dependencies required to run symbolic ODE models",
"requirements": [
{
"antlr": [
{
"name": "antlr4-python3-runtime==4.10",
"method": "pip"
},
{
"name": "antlr-python-runtime==4.10",
"method": "conda"
}
]
},
"sympy>=1.10"
]
},
"testing": {
"description": "Dependencies required to run yggdrasil tests",
"requirements": [
Expand Down
15 changes: 9 additions & 6 deletions utils/requirements/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,12 @@ general:
flags:
method_in_setup: conda
- six
- sympy>=1.10
- toml
- unyt
- GitPython
- sysv_ipc:
os: unix
host: True
- antlr:
- name: antlr4-python3-runtime==4.10
method: pip
- name: antlr-python-runtime==4.10
method: conda

extras:
c:
Expand Down Expand Up @@ -349,6 +343,15 @@ extras:
requirements:
- pandas
- openpyxl
ode:
description: Dependencies required to run symbolic ODE models
requirements:
- antlr:
- name: antlr4-python3-runtime==4.10
method: pip
- name: antlr-python-runtime==4.10
method: conda
- sympy>=1.10
testing:
description: Dependencies required to run yggdrasil tests
requirements:
Expand Down
4 changes: 4 additions & 0 deletions utils/requirements/requirements_extras.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"openpyxl",
"pandas"
],
"ode": [
"antlr4-python3-runtime==4.10",
"sympy>=1.10"
],
"testing": [
"coverage",
"flake8",
Expand Down
1 change: 1 addition & 0 deletions utils/requirements/requirements_optional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ pandas # [excel]
pika>=1.0.0 # [rmq]
pillow # [images]
pygments # [pygments]
sympy>=1.10 # [ode]
trimesh # [trimesh]
1 change: 1 addition & 0 deletions utils/requirements/requirements_piponly.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
antlr4-python3-runtime==4.10 # [pip,ode]
libroadrunner # [pip,sbml]
pysam; platform_system != 'Windows' # [pip,seq]
torch # [pip,pytorch]
Expand Down
7 changes: 6 additions & 1 deletion utils/setup_test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@ def get_install_opts(old=None, empty=False):
'images': False,
'seq': False,
'excel': False,
'ode': False,
'omp': False,
'docs': False,
'no_sudo': False,
Expand All @@ -868,6 +869,7 @@ def get_install_opts(old=None, empty=False):
'images': (os.environ.get('INSTALLIMAGES', '0') == '1'),
'seq': (os.environ.get('INSTALLSEQ', '0') == '1'),
'excel': (os.environ.get('INSTALLEXCEL', '0') == '1'),
'ode': (os.environ.get('INSTALLODE', '0') == '1'),
'omp': (os.environ.get('INSTALLOMP', '0') == '1'),
'docs': (os.environ.get('BUILDDOCS', '0') == '1'),
'no_sudo': False,
Expand All @@ -894,6 +896,7 @@ def get_install_opts(old=None, empty=False):
'images': True,
'seq': True,
'excel': True,
'ode': True,
'omp': False,
'docs': True,
'no_sudo': False,
Expand All @@ -920,6 +923,8 @@ def get_install_opts(old=None, empty=False):
out.update(fortran=False, zmq=False)
if out['docs']:
out['r'] = True # Allow roxygen
if sys.version_info[:2] < (3, 8):
out['ode'] = False # sympy dropped support for Python < 3.8
return out


Expand Down Expand Up @@ -1768,7 +1773,7 @@ def verify_pkg(install_opts=None):
sys.stdout.flush()
from yggdrasil.tools import is_lang_installed, is_comm_installed
errors = []
for name in ['c', 'r', 'fortran', 'sbml', 'lpy', 'julia']:
for name in ['c', 'r', 'fortran', 'sbml', 'lpy', 'julia', 'ode']:
flag = install_opts[name]
if flag and (not is_lang_installed(name)):
errors.append("Language '%s' should be installed, but is not."
Expand Down
1 change: 1 addition & 0 deletions utils/test-install-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ env:
INSTALLIMAGES: 1
INSTALLSEQ: 1
INSTALLEXCEL: 1
INSTALLODE: 1
INSTALLOMP: 1
INSTALLMPI: 1
INSTALLMATLAB: 0
Expand Down

0 comments on commit d71747d

Please sign in to comment.