import os

# path into which temporary files from each run are placed
temp_path = "{}/temp/".format(os.getcwd())

# Path to use for calling Python. If the environment is correctly set, simply the command
python_path = "python"

# Path to use for calling iPython. If the environment is correctly set, simply the command
ipython_path = "ipython"

# Path to use for calling Jupyter. If the environment is correctly set, simply the command
jupyter_path = "jupyter"

# Path to find the Karabo activate script at, set to an empty string if not running in a Karabo environemnt
karabo_activate_path = ""

# Path to use for calling ipcluster. If the environment is correctly set, simply the command
ipcluster_path = "ipcluster"

# Path to store reports in
report_path = "{}/calibration_reports/".format(os.getcwd())

# Also try to output the report to an out_folder defined by the notebook
try_report_to_output = True

# logo file for calibration report (located in cal_tools/cal_tools)
logo_path = "xfel.pdf"

# the command to run this concurrently. It is prepended to the actual call
sprof = os.environ.get("XFELCALSLURM", "exfel")
launcher_command = "sbatch -t 24:00:00 --mem 500G --requeue --output {temp_path}/slurm-%j.out"
free_nodes_cmd = "sinfo -p exfel -t idle -N --noheader | wc -l"
preempt_nodes_cmd = "squeue -p all,grid --noheader | grep max-exfl | egrep -v 'max-exfl18[3-8]|max-exfl100|max-exflg' | wc -l"
max_reserved = 8
reservation = "xcal"