# -*- coding: utf-8 -*-
#
# This is the configuration file for the Spyder Kernels Daemon
#
#
# Remember to restart the Spyder Kernels Deamon (sksd) after making changes to
# this file by doing the following fingerdance on the console:
#    $ sudo systemctl restart sksd
#
# Notes:
#
#   1. There **HAS** to be a `DEFAULT` section (all capitals), all other
#      sections are disregarded!
#
#   2. This file is considered to be encoded in UTF-8 with CRLF line-endings.
#

[DEFAULT]
##############################################################################
# The `enable` keyword will determine if the Spyder Kernels Daemon will start
#
# Notes:
#  * if `enable` is not supplied, it is presumed turned off!
#  * if `enable` can not be interpreted, it is presumed turned off!
#
enable = {{ config['enable'] }}

##############################################################################
# The `name` is the 'pretty print' (host)name that will be published.
# spaces, apostrops are allowed, it is a (UTF-8) string!
# if `service_name` is not provided here, the system's hostname (not so pretty)
# will be pasted in.
#
# Notes:
#  * if no service `name` is provided, the service will not start!
#
name = {{ config['name'] }}

##############################################################################
# The `guest_account` keyword determines as what guest `user` the sksd
# will spin up the Spyder Kernels.
#
# If there is no `guest_account`, this means that the user needs to provide
# valid credentials for this host system.
#
# Notes:
#  * if the guest account needs a password, the format is "user:password"
#  * if the guest account needs an empty string password, the format is "user:"
#  * if the guest account doesn't need a password, the format is "user"
#
guest_account = {{ config['guest_account'] }}

##############################################################################
# The `guest_can_manage_environments` keyword determines if a `guest`
# is allowed to create/modify (guest) environments.
#
# Notes:
#  * if no guest_account is provided, this option is disregarded.
#  * a `user` (guest or not) can in any case not create/modify environments
#    outside the scope of the user !
#
guest_can_manage_environments = {{ config['guest_can_manage_environments'] }}

##############################################################################
# The `max_kernels` keyword determines the maximum number of spyder-kernels
# `skd` can spinn up. This is a (posetive) integer value. If the value can't
# be interpreted, the fallback is '0'. '0' means automatic calculation, it
# takes the number of CPU cores, deducts 1 and that is set. There is in principle
# no upper limit ...
#
# Notes:
#  * `skd` will publish the value for `max_kernels` as well as the number of
#    kernels already spinned up.
#  * AUTO means # CPU cores - 1
#  * anything starting with 'auto' (regardless capitalization) is considered 'AUTO'
#  * CORES = the number of CPU cores
#  * simple calculations are possible the result will be casted to integer.
#    eg: (CORES/2)-1 ➜ (8/2)-1 ➜ 3 for a 8 core machine.
#
# Default value = AUTO
#
max_kernels = {{ config['max_kernels'] }}

##############################################################################
# The `exclude_environments` keyword determines what environments will **NOT**
# be published. (regardless if they exist or not)
#
# Notes:
#  * It **must** be a list
#  * One can use a wildcard '*' in the list.
#  * application environments (starting with '_') can also be excluded here.
#  * If nothing is provided, the default value is presumed.
#
# Default value = ["base", "_*"]
#
exclude_environments = {{ config['exclude_environments'] }}
