Skip to content

Commit

Permalink
fix travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed Oct 22, 2019
1 parent 4ccf7c2 commit 288272c
Show file tree
Hide file tree
Showing 8 changed files with 124 additions and 10 deletions.
17 changes: 12 additions & 5 deletions .travis.yml
@@ -1,19 +1,26 @@
# sudo: false
# cache:
# directories:
# - "$HOME"
language: python
matrix:
include:
- python: 2.7.8
dist: precise
before_install: pip install --upgrade pip setuptools
# - python: 2.7.8
# dist: precise
# before_install: pip install --upgrade pip setuptools
- python: 2.7
- python: 3.7
allow_failures:
- python: 3.7
install:
# - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then travis_retry pip install -r requirements.txt ; fi
# - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then travis_retry pip install coveralls ; fi
- travis_retry pip install coveralls -r requirements.txt
script:
- flake8 .
- python setup.py test
- coverage run --source=src setup.py test
- flake8 *.py
- flake8 src/wpsremote
- flake8 test
after_success: coveralls
notifications:
email:
Expand Down
6 changes: 5 additions & 1 deletion requirements.txt
@@ -1,4 +1,5 @@
asn1crypto==0.24.0
astroid==1.4.4
autopep8==1.4.3
bcrypt==3.1.4
bleach==3.1.0
Expand All @@ -11,17 +12,20 @@ cryptography==2.3.1
docutils==0.15.2
enum34==1.1.6
flake8==3.7.8
functools32==3.2.3.post2
idna==2.7
ipaddress==1.0.22
jsonschema==2.5.1
lazy-object-proxy==1.2.1
mccabe<0.7.0,>=0.6.0
pep8==1.7.1
paramiko==2.4.2
pkginfo==1.5.0.1
psutil==5.4.7
pyasn1==0.4.4
pycodestyle<2.6.0,>=2.5.0
pycparser==2.18
pycrypto==2.6.1
pyflakes<2.2.0,>=2.1.0
Pygments==2.4.2
pylint==1.5.4
PyNaCl==1.2.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -55,7 +55,7 @@
try:
readme_text = file('README.md', 'rb').read()
except IOError as e:
readme_text = ''
readme_text = open('README.md', 'rb').read()

setup(
name="wps-remote",
Expand Down
1 change: 1 addition & 0 deletions src/wpsremote/resource_monitor.py
Expand Up @@ -4,6 +4,7 @@
# This code is licensed under the GPL 2.0 license, available at the root
# application directory.

# import time
import psutil
import logging
import threading
Expand Down
2 changes: 1 addition & 1 deletion src/wpsremote/xmpp_data/configs/myservice/code/test_xml.py
Expand Up @@ -22,7 +22,7 @@ def run(self):

ret = 0
self.logger.info("ProgressInfo:100%")
except:
except BaseException:
ret = -1
self.logger.critical("Error occurred during processing.")

Expand Down
Binary file not shown.
102 changes: 102 additions & 0 deletions src/wpsremote/xmpp_data/configs/myservice/service.config.test_xml
@@ -0,0 +1,102 @@
# (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 = Greetings
namespace = default
description = Greetings Remote Service
executable_path = ./xmpp_data/configs/myservice/code
executable_cmd = python %(executable_path)s/test_xml.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 = theName
title = theName
type = string
description = theName.
min = 1
max = 1
default = Giovanni

[Action1]
class = cmdline
input_ref = theName
alias = n
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 = text/xml;subtype=gml/3.1.1
output_mime_type = application/xml
description = WPS Resource XML File
title = greetings.xml
filepath = D:/work/code/python/remote-wps/RemoteWPS/src/wpsremote/%(workdir)s/greetings.xml
publish_as_layer = false

# ########################################### #
# 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]
4 changes: 2 additions & 2 deletions test_suite.sh
Expand Up @@ -2,8 +2,8 @@
set -e

echo "Running... test_computation_job_inputs"
python test/test_computation_job_inputs.py
coverage run --source=src test/test_computation_job_inputs.py

echo "Running... test_process_input_parameters"
python test/test_process_input_parameters.py
coverage run --source=src test/test_process_input_parameters.py

0 comments on commit 288272c

Please sign in to comment.