Skip to content

Commit

Permalink
minor formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Oct 18, 2019
1 parent 60c4ca2 commit beac9c0
Show file tree
Hide file tree
Showing 4 changed files with 197 additions and 4 deletions.
14 changes: 14 additions & 0 deletions requirements.txt
Expand Up @@ -2,9 +2,13 @@ asn1crypto==0.24.0
astroid==1.4.4
autopep8==1.4.3
bcrypt==3.1.4
bleach==3.1.0
certifi==2019.9.11
cffi==1.11.5
chardet==3.0.4
colorama==0.3.6
cryptography==2.3.1
docutils==0.15.2
enum34==1.1.6
flake8==2.5.4
functools32==3.2.3.post2
Expand All @@ -15,14 +19,24 @@ lazy-object-proxy==1.2.1
mccabe==0.4.0
paramiko==2.4.1
pep8==1.7.1
pkg-resources==0.0.0
pkginfo==1.5.0.1
psutil==5.4.7
pyasn1==0.4.4
pycodestyle==2.4.0
pycparser==2.18
pycrypto==2.6.1
pyflakes==1.0.0
Pygments==2.4.2
pylint==1.5.4
PyNaCl==1.2.1
readme-renderer==24.0
requests==2.22.0
requests-toolbelt==0.9.1
six==1.10.0
sleekxmpp==1.3.3
tqdm==4.36.1
twine==1.15.0
urllib3==1.25.6
webencodings==0.5.1
wrapt==1.10.10
19 changes: 16 additions & 3 deletions setup.py
Expand Up @@ -20,9 +20,22 @@
5. Deploy on pypi:
python setup.py sdist upload -r pypi
python setup.py bdist --format=gztar upload -r pypi
python setup.py bdist_wheel upload -r pypi
python setup.py sdist upload -r pypi; \
python setup.py bdist --format=gztar upload -r pypi; \
python setup.py bdist_wheel upload -r pypi;
python setup.py check -r -s
python setup.py sdist bdist_wheel upload -r pypi
pip install setuptools==39.1.0 twine==1.11.0
pip install setuptools --upgrade
pip install twine --upgrade
python setup.py sdist
python setup.py bdist --format=gztar
python setup.py bdist_wheel
twine check dist/*
twine upload dist/*
"""
try: # for pip >= 10
from pip._internal.req import parse_requirements
Expand Down
166 changes: 166 additions & 0 deletions src/wpsremote/xmpp_data/configs/myservice/service.config.sample
@@ -0,0 +1,166 @@
# (c) 2016 Open Source Geospatial Foundation - all rights reserved
# (c) 2014 - 2015 Centre for Maritime Research and Experimentation (CMRE)
# (c) 2013 - 2014 German Aerospace Center (DLR)
# This code is licensed under the GPL 2.0 license, available at the root
# application directory.

# This is a INI file to be read with python ConfigParser (https://docs.python.org/2/library/configparser.html)
# Is possible to reference another variable in the ini file using the format %(<variable name>)s (note the 's' at the end)

# ########################################### #
# Default Service Params #
# ########################################### #

[DEFAULT]
service = GdalContour
namespace = default
description = GDAL Contour Remote Service
executable_path = ./xmpp_data/configs/myservice/code
executable_cmd = python %(executable_path)s/test.py
output_dir = ./xmpp_data/output/
unique_execution_id = %(unique_exe_id)s
workdir = %(output_dir)s/%(unique_execution_id)s
active = True
max_running_time_seconds = 300

# . This option allows you to set the CPU and Memory average load scan time.
# . It is espressed in 'minutes' and if disabled here it will be set by default
# . to 15 minutes.
load_average_scan_minutes = 1

# . Use this option to completely avoid using this host (and prevent starting a new
# . 'processbot') whenever one of the following process names are running.
# . In other words, if one of the following processes are currently running on this machine,
# . GeoServer won't send any WPS execute request until they are finished.
process_blacklist = [{"cwd": "/mnt/d/work/code/python/geonode/geonode-master", "name": "celery", "cmdline": "-A geonode.celery_app:app worker -Q default,geonode,cleanup,update,email -B -E -l INFO"}]

# ########################################### #
# Inputs and Actions Declaration #
# ########################################### #

[Input1]
class = param
name = interval
title = Elevation Interval
type = application/json
input_mime_type = application/json
description = Elevation interval between contours.
min = 1
max = 1
default = 200

[Action1]
class = cmdline
input_ref = interval
alias = i
template = -name value

[Const1]
class = const
name = workdir
type = string
description = Remote process sandbox working directory
value = %(workdir)s

[Action2]
class = cmdline
input_ref = workdir
alias = w
template = -name value

[Const2]
class = const
name = execution_id
type = string
description = Remote process unique execution id
value = %(unique_execution_id)s

[Action2]
class = cmdline
input_ref = execution_id
alias = e
template = -name value

# ########################################### #
# Output Parameters Declaration #
# ########################################### #

#[Output1]
#name = result1
#type = application/zip
#output_mime_type = application/zip
#description = WPS Resource Binary File
#title = SRTM
#filepath = %(workdir)s/contour.zip
#publish_as_layer = true
#publish_default_style = polygon
#publish_target_workspace = it.geosolutions
#publish_layer_name = contour

# . Enable this option in order to perform a backup of this output
# . before sending it to GeoServer.
# . WARNING: This option works only along with 'wps_execution_shared_dir'
# . option on 'remote.config', and takes precedence on 'upload_data'
# backup_on_wps_execution_shared_dir = true

# . Enable this option if you want the output to be uploaded on remote host.
# . Notice that you must also configure uploader parameters on 'remote.config'
# upload_data = true

# . Optionally it is possible to specify a root folder if the uploader class supports it.
# upload_data_root = /remote-wps/default

#[Output2]
#name = result2
#type = application/x-netcdf
#output_mime_type = application/x-netcdf
#description = NetCDF Binary File
#title = flexpart
#filepath = %(output_dir)s/flexpart.nc
#publish_as_layer = true
#publish_default_style = raster
#publish_target_workspace = it.geosolutions
#publish_layer_name = flexpart

[Output2]
name = result2
type = application/zip
output_mime_type = application/zip
description = Test ShapeFile
title = watermask
filepath = d:/tmp/DE_USNG_UTM18.zip
publish_as_layer = true
publish_default_style = polygon
publish_target_workspace = it.geosolutions
publish_layer_name = DE_USNG_UTM18

# . Enable this option in order to perform a backup of this output
# . before sending it to GeoServer.
# . WARNING: This option works only along with 'wps_execution_shared_dir'
# . option on 'remote.config', and takes precedence on 'upload_data'
# backup_on_wps_execution_shared_dir = true

# . Enable this option if you want the output to be uploaded on remote host.
# . Notice that you must also configure uploader parameters on 'remote.config'
# upload_data = true

# . Optionally it is possible to specify a root folder if the uploader class supports it.
# upload_data_root = /remote-wps/default

#[Output3]
#name = result3
#type = application/owc
#output_mime_type = application/xml
#description = WPS OWC Json MapContext
#layers_to_publish = result2
#publish_as_layer = true
#publish_layer_name = owc_json_ctx
#publish_metadata = ./xmpp_data/resource_dir/owc_json_ctx.json

# ########################################### #
# Logging Options Declaration #
# ########################################### #

[Logging]
stdout_parser = [.*\[DEBUG\](.*), .*\[INFO\] ProgressInfo\:([-+]?[0-9]*\.?[0-9]*)\%, .*\[(INFO)\](.*), .*\[(WARN)\](.*), .*\[(ERROR)\](.*), .*\[(CRITICAL)\](.*)]
stdout_action = [ignore, progress, log, log, abort, abort]
2 changes: 1 addition & 1 deletion src/wpsremote/xmpp_data/configs/remote.config
Expand Up @@ -9,7 +9,7 @@
bus_class_name = xmppBus.XMPPBus

port = 5223
address = 127.0.0.1
address = 127.0.0.1
domain = geoserver.org

# . Those are the connection parameters to the XMPP Server.
Expand Down

0 comments on commit beac9c0

Please sign in to comment.