diff --git a/.github/workflows/test-install.yml b/.github/workflows/test-install.yml index 9b91e8441..7f141581e 100644 --- a/.github/workflows/test-install.yml +++ b/.github/workflows/test-install.yml @@ -11,6 +11,7 @@ env: INSTALLLPY: 0 INSTALLMATLAB: 0 INSTALLMPI: 1 + INSTALLODE: 1 INSTALLOMP: 1 INSTALLPYGMENTS: 1 INSTALLPYTORCH: 1 diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4d699538d..9db808760 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -57,7 +57,6 @@ requirements: - sysv_ipc # [not win] run: - GitPython - - antlr-python-runtime ==4.10 - chevron - deprecation - flask @@ -73,7 +72,6 @@ requirements: - requests - scipy - six - - sympy >=1.10 - sysv_ipc # [not win] - toml - unyt @@ -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 }} diff --git a/requirements.txt b/requirements.txt index f3af14266..de2da63e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ GitPython -antlr4-python3-runtime==4.10 # [pip] chevron deprecation flask @@ -13,7 +12,6 @@ pyzmq requests scipy six -sympy>=1.10 sysv_ipc; platform_system != 'Windows' toml unyt diff --git a/utils/requirements/requirements.json b/utils/requirements/requirements.json index 9e260b815..a7e6aa721 100644 --- a/utils/requirements/requirements.json +++ b/utils/requirements/requirements.json @@ -94,7 +94,6 @@ } }, "six", - "sympy>=1.10", "toml", "unyt", "GitPython", @@ -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": { @@ -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": [ diff --git a/utils/requirements/requirements.yaml b/utils/requirements/requirements.yaml index 8d617331d..85c629b2b 100644 --- a/utils/requirements/requirements.yaml +++ b/utils/requirements/requirements.yaml @@ -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: @@ -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: diff --git a/utils/requirements/requirements_extras.json b/utils/requirements/requirements_extras.json index 8339385e4..29ae158c2 100644 --- a/utils/requirements/requirements_extras.json +++ b/utils/requirements/requirements_extras.json @@ -23,6 +23,10 @@ "openpyxl", "pandas" ], + "ode": [ + "antlr4-python3-runtime==4.10", + "sympy>=1.10" + ], "testing": [ "coverage", "flake8", diff --git a/utils/requirements/requirements_optional.txt b/utils/requirements/requirements_optional.txt index 322cbb8ab..415a3cfaf 100644 --- a/utils/requirements/requirements_optional.txt +++ b/utils/requirements/requirements_optional.txt @@ -6,4 +6,5 @@ pandas # [excel] pika>=1.0.0 # [rmq] pillow # [images] pygments # [pygments] +sympy>=1.10 # [ode] trimesh # [trimesh] diff --git a/utils/requirements/requirements_piponly.txt b/utils/requirements/requirements_piponly.txt index 7fff6a37a..0f46c4078 100644 --- a/utils/requirements/requirements_piponly.txt +++ b/utils/requirements/requirements_piponly.txt @@ -1,3 +1,4 @@ +antlr4-python3-runtime==4.10 # [pip,ode] libroadrunner # [pip,sbml] pysam; platform_system != 'Windows' # [pip,seq] torch # [pip,pytorch] diff --git a/utils/setup_test_env.py b/utils/setup_test_env.py index f06d6fcfc..834653c96 100644 --- a/utils/setup_test_env.py +++ b/utils/setup_test_env.py @@ -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, @@ -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, @@ -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, @@ -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 @@ -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." diff --git a/utils/test-install-base.yml b/utils/test-install-base.yml index 3abd893d0..5ef63e1ed 100644 --- a/utils/test-install-base.yml +++ b/utils/test-install-base.yml @@ -26,6 +26,7 @@ env: INSTALLIMAGES: 1 INSTALLSEQ: 1 INSTALLEXCEL: 1 + INSTALLODE: 1 INSTALLOMP: 1 INSTALLMPI: 1 INSTALLMATLAB: 0