Skip to content

Commit

Permalink
Added messages if ThinLayers lack a specific dependencies
Browse files Browse the repository at this point in the history
Also added options for installation
  • Loading branch information
JR-1991 committed Feb 22, 2022
1 parent d1feb9c commit 5d52318
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
17 changes: 11 additions & 6 deletions pyenzyme/thinlayers/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import warnings

from .TL_Base import BaseThinLayer
from .TL_Strenda import ThinLayerStrendaML

try:
from .TL_Pysces import ThinLayerPysces
except ModuleNotFoundError:
except ModuleNotFoundError as e:
print(
"%s - ThinLayerCopasi now returns 'None', please provide the dependencies to use this module." % str(e)
)
ThinLayerPysces = None

try:
from .TL_Copasi import ThinLayerCopasi
except ModuleNotFoundError:
except ModuleNotFoundError as e:
print(
"%s - ThinLayerCopasi now returns 'None', please provide the dependencies to use this module." % str(e)
)
ThinLayerCopasi = None

try:
from .TL_Strenda import ThinLayerStrendaML
except ModuleNotFoundError:
ThinLayerStrendaML = None
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ pyDaRUS
openpyxl
numexpr
seaborn
plotly
plotly
pysces
lmfit
17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,23 @@
'openpyxl',
'numexpr',
'seaborn',
'plotly'
'plotly',
],
extras_require={
'test': [
'pytest-cov'
],
'examples': [
'xmltodict'
]
'copasi': [
'python-copasi'
],
'pysces': [
'pysces',
'lmfit'
],
'all': [
'python-copasi',
'pysces',
'lmfit'
]
},
)

0 comments on commit 5d52318

Please sign in to comment.