Skip to content

Commit 5378e9d

Browse files
committed
Remove the DISABLE_JULIA option.
This was only introduced very recently, so probably nobody is using it. After the changes on this branch, using it only causes an Exception anyway, so it's not a useful feature - it's one that just causes a crash! So I'm removing the feature. We now only load Julia if we really need it, so disabling it is not ever beneficial.
1 parent b2e5704 commit 5378e9d

5 files changed

Lines changed: 0 additions & 21 deletions

File tree

rmgpy/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,6 @@ def reset(self):
154154
# The global settings object
155155
settings = Settings(path=None)
156156

157-
# Global flag to disable Julia imports (useful for scripts that don't need RMS)
158-
DISABLE_JULIA = False
159-
160-
161157
################################################################################
162158

163159

rmgpy/pdep/sls.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,6 @@ class LazyMain:
5353
# If you modify this class, please consider making similar changes to
5454
# rmgpy/rmg/reactionmechanismsimulator_reactors.py, which has a similar LazyMain class
5555
def __getattr__(self, name):
56-
if getattr(rmgpy, 'DISABLE_JULIA', False):
57-
raise ImportError("Julia imports disabled via rmgpy.DISABLE_JULIA flag")
58-
elif len(os.environ.get('RMG_DISABLE_JULIA', '')) > 0:
59-
raise ImportError("Julia imports disabled via RMG_DISABLE_JULIA "
60-
"environment variable. Unset it to enable Julia imports.")
6156
try:
6257
from juliacall import Main as JuliaMain
6358
Main = JuliaMain

rmgpy/rmg/reactionmechanismsimulator_reactors.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,6 @@ class LazyMain:
6969
# If you modify this class, please consider making similar changes to
7070
# rmgpy/pdep/sls.py, which has a similar LazyMain class.
7171
def __getattr__(self, name):
72-
if getattr(rmgpy, 'DISABLE_JULIA', False):
73-
raise ImportError("Julia imports disabled via rmgpy.DISABLE_JULIA flag")
74-
elif len(os.environ.get('RMG_DISABLE_JULIA', '')) > 0:
75-
raise ImportError("Julia imports disabled via RMG_DISABLE_JULIA "
76-
"environment variable. Unset it to enable Julia imports.")
7772
try:
7873
from juliacall import Main as JuliaMain
7974
Main = JuliaMain

rmgpy/tools/regression.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
import os.path
3838
import sys
3939

40-
import rmgpy
41-
rmgpy.DISABLE_JULIA = True # disable Julia to save time and warnings
42-
4340
from rmgpy.molecule import Molecule
4441
from rmgpy.quantity import Quantity
4542
from rmgpy.species import Species

scripts/checkModels.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@
3232
import math
3333
import sys
3434

35-
# Disable Julia imports for checkModels.py since they're not needed
36-
import rmgpy
37-
rmgpy.DISABLE_JULIA = True
38-
3935
from rmgpy.tools.diffmodels import execute
4036

4137
logger = logging.getLogger('checkModels')

0 commit comments

Comments
 (0)