Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixing merge conflicts
  • Loading branch information
Lee Kamentsky committed Sep 16, 2014
2 parents 844f832 + 6099f41 commit bf0c351
Show file tree
Hide file tree
Showing 69 changed files with 885 additions and 24,245 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -36,4 +36,4 @@ java/.settings
killjavabridge.egg-info
plugins
output
windows
windows/**
42 changes: 22 additions & 20 deletions CellProfiler.py
Expand Up @@ -72,11 +72,11 @@ def main(args):
args - command-line arguments, e.g. sys.argv
'''
import cellprofiler.preferences as cpprefs
if any([arg.startswith('--work-announce') for arg in args]):
#
# Go headless ASAP
#
import cellprofiler.preferences as cpprefs
cpprefs.set_headless()
for i, arg in enumerate(args):
if arg == "--ij-plugins-directory" and len(args) > i+1:
Expand Down Expand Up @@ -178,6 +178,21 @@ def main(args):
return
if options.omero_credentials is not None:
set_omero_credentials_from_string(options.omero_credentials)
if options.plugins_directory is not None:
cpprefs.set_plugin_directory(options.plugins_directory,
globally=False)
if options.ij_plugins_directory is not None:
cpprefs.set_ij_plugin_directory(options.ij_plugins_directory,
globally=False)
if options.temp_dir is not None:
if not os.path.exists(options.temp_dir):
os.makedirs(options.temp_dir)
cpprefs.set_temporary_directory(options.temp_dir, globally=False)
#
# After the crucial preferences are established, we can start the VM
#
from cellprofiler.utilities.cpjvm import cp_start_vm
cp_start_vm()
try:
if options.show_gui:
import wx
Expand Down Expand Up @@ -207,20 +222,7 @@ def main(args):
show_splashbox = show_splashbox,
workspace_path = workspace_path,
pipeline_path = pipeline_path)

# cellprofiler.preferences can't be imported before we have a chance
# to initialize the wx app.
#
import cellprofiler.preferences as cpprefs

if options.plugins_directory is not None:
cpprefs.set_plugin_directory(options.plugins_directory)
if options.ij_plugins_directory is not None:
cpprefs.set_ij_plugin_directory(options.ij_plugins_directory)
if options.temp_dir is not None:
if not os.path.exists(options.temp_dir):
os.makedirs(options.temp_dir)
cpprefs.set_temporary_directory(options.temp_dir)

if options.data_file is not None:
cpprefs.set_data_file(os.path.abspath(options.data_file))
if options.image_set_file is not None:
Expand Down Expand Up @@ -265,7 +267,7 @@ def main(args):
except:
logging.root.warn("Failed to stop zmq boundary")
try:
from cellprofiler.utilities.jutil import kill_vm
from javabridge import kill_vm
kill_vm()
except:
logging.root.warn("Failed to stop the JVM")
Expand Down Expand Up @@ -555,15 +557,15 @@ def set_omero_credentials_from_string(credentials_string):
K_OMERO_SESSION_ID: cpprefs.get_omero_session_id()
}
if k == OMERO_CK_HOST:
cpprefs.set_omero_server(v)
cpprefs.set_omero_server(v, globally=False)
credentials[K_OMERO_SERVER] = v
elif k == OMERO_CK_PORT:
cpprefs.set_omero_port(v)
cpprefs.set_omero_port(v, globally=False)
credentials[K_OMERO_PORT] = v
elif k == OMERO_CK_SESSION_ID:
credentials[K_OMERO_SESSION_ID] = v
elif k == OMERO_CK_USER:
cpprefs.set_omero_user(v)
cpprefs.set_omero_user(v, globally=False)
credentials[K_OMERO_USER] = v
elif k == OMERO_CK_PASSWORD:
credentials[K_OMERO_PASSWORD] = v
Expand Down Expand Up @@ -761,7 +763,7 @@ def run_pipeline_headless(options, args):
if sys.platform == 'darwin':
if options.start_awt:
import bioformats
from cellprofiler.utilities.jutil import activate_awt
from javabridge import activate_awt
activate_awt()

if not options.first_image_set is None:
Expand Down
158 changes: 0 additions & 158 deletions bioformats/__init__.py

This file was deleted.

0 comments on commit bf0c351

Please sign in to comment.