A web interface for the pySCIL toolset. For more information on pySCIL, view it's github repository.
gunicorn -b 127.0.0.1:8000 --log-level debug "scil:create_app()"
If running on a server and you don't want the process to end once disconnected, run the following before running gunicorn
screen -r
(if there is no screen running, type screen
to create a new virtual terminal)
Then run the above gunicorn command.
After which you can type ctrl+a
followed by d
to detach the screen. The above screen -r
command is for re-attaching.
After which, you can safely exit from the server.
export FLASK_APP=scilweb
export FLASK_ENV=development
flask run
set FLASK_APP=scil
set FLASK_ENV=development
flask run
- In
services.json
define a"service": { }
under services in the following format."<ServiceName>": { "subservices": { "<SubserviceName>": { "short": "<ShortName>" } } }
- see Adding Configuration Settings if you want to define settings for the service.
- Note that at no point should there be any spaces in any of the names.
- a
loc
can optionally be defined for the service in the form of"loc": 1,
which will put the service in the second column of checkboxes in the graphical interface. The default is 0. - a
requires
can optionally be defined for a service in the form of"requires": [<ServiceName>, <ServiceName>]
. The required services must be above the service that requires them in the json for it to work properly. The code will store the output of each service and feed that output into the service that requires it.
- In
site/routes.py
underdef callHelper(obj, service)
define the function calls for the service and subservice in the following formatFor examples of this, please view the'<ServiceName>': obj.<ServiceName>Functions, '<ServiceName>_<ShortName>': obj.<SubserviceName>
callHelper
function insite/routes.py
- In the
services.json
define a"settings": { }
under a service.- Ths doesn't need to have anything in it if you don't intend to add global config options but it is needed to display the button to open the settings panel.
- Add a
"settings": { }
under each subservice that you want to define settings for. - Add config option(s) in the following format
"settings": { "<SettingName>": { "default": <value>, "type": "<type>", "step": "<size>" } }
default
andtype
are required. Type can be set to any HTML input type and default gets assigned to thevalue
attribute for the input.step
is an optional setting and can be used for requiring anumber
input to have a certain step value. By default, the step value is 1.- Can optionally define a
min
ormax
value for anumber
in the format ofthough other numbers can of course be used besides 0 and 1. Just be sure that"min": 0, "max": 1
max
is greater thanmin
- Defining the
<SettingName>
to beweight
will put the setting under a specialWeight Settings
header but will not change the functionality in the backend. - Values of settings will automatically be used to call a function. Functions will be called using the
<SettingName>
and<value>
so make sure that the name chosen matches the name of the variable in the function you will be calling.