Skip to content

Commit

Permalink
Release slybot 0.13.3
Browse files Browse the repository at this point in the history
Update slybot to work with python 3.7 and Scrapy 1.6
  • Loading branch information
ruairif committed Jun 18, 2019
1 parent 11e10d5 commit b3b4120
Show file tree
Hide file tree
Showing 21 changed files with 12,305 additions and 82 deletions.
7 changes: 3 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ script:
- echo "Portia is at:"`git show -s --pretty=%d HEAD`
- git restore-mtime
- shopt -s extglob
- nvm install 6.10.0
- nvm use 6.10.0
- nvm install 10.16.0
- nvm use 10.16.0
- sudo mkdir -p ~/.npm ~/.node-gyp ~/.cache
- sudo chown -R ubuntu ~/.npm ~/.node-gyp ~/.cache
- npm install -g bower ember-cli --cache-min 999999
- ember version
- npm install -g bower [email protected] --cache-min 999999
- docker/compile-assets.sh
- build_docker_image
- publish_to_dockerhub
Expand Down
47 changes: 17 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
language: python
python: 3.5
sudo: required
dist: xenial
python: 3.7
dist: bionic
services:
- docker
env:
- WHEELHOUSE=$HOME/.cache/wheelhouse PIP_FIND_LINKS=file://$WHEELHOUSE PIP_WHEEL_DIR=$WHEELHOUSE
cache:
Expand All @@ -11,42 +12,28 @@ cache:
- portiaui/node_modules
- portiaui/bower_components

before_install:
- docker build -t scrapinghub/portia .
- docker ps -a

install:
- source ${VIRTUAL_ENV}/bin/activate
- cd docker
- sudo -H ./provision.sh install_splash
- cd ..
- sudo -H pip install tox
- python3.5 -c 'import splash, qt5reactor' # Check it's in the python path
- cd portiaui
- nvm install 6.10.0
- nvm use 6.10.0
- npm install -g bower
- docker run scrapinghub/portia /app/docker/run-tests.sh
- pushd portiaui
- nvm install 10.16.0
- nvm use 10.16.0
- npm install -g bower [email protected]
- npm install
- bower install
- cd ..
- popd

before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- source ${VIRTUAL_ENV}/bin/activate
- export PYTHONPATH=`pwd`/slybot:`pwd`/slyd
- cd slyd
- python2.7 tests/testserver/server.py 2>&1 | grep -v 'HTTP/1.1" 200' &
- cd ..
- sleep 3 # give xvfb some time to start
script:
- cd ./slybot
- sudo -E tox
- cd ../portia_server
- ./manage.py test portia_orm.tests
- ./manage.py test portia_api.tests
- cd ../portiaui
- pushd portiaui
- npm rebuild node-sass
- npm test
- popd

before_deploy:
- cd ../slybot
- cd slybot
- pip install twine
- sudo chown -R $USER .
deploy:
Expand Down
4 changes: 3 additions & 1 deletion docker/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e

if [ "x$APP_ROOT" = x ]
then
for dir in "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" /app /vagrant
for dir in "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" /app /vagrant $(pwd)
do
if [ -d "$dir" ] && [ -d "$dir/slyd" ]
then
Expand Down Expand Up @@ -50,6 +50,8 @@ EOF
SPLASH_SIP_VERSION=${SPLASH_SIP_VERSION:-"4.19.3"}
SPLASH_PYQT_VERSION=${SPLASH_PYQT_VERSION:-"5.9"}
SPLASH_BUILD_PARALLEL_JOBS=${SPLASH_BUILD_PARALLEL_JOBS:-"2"}
QT_MIRROR=${QT_MIRROR:-"http://ftp.fau.de/qtproject/official_releases/qt/5.9/5.9.1/qt-opensource-linux-x64-5.9.1.run"}
export PATH=/opt/qt59/5.9.1/gcc_64/bin:$PATH

# '2' is not supported by this script; allowed values are "3" and "venv" (?).
SPLASH_PYTHON_VERSION=${SPLASH_PYTHON_VERSION:-"3"}
Expand Down
14 changes: 14 additions & 0 deletions docker/run-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

export PYTHONPATH=`pwd`/slybot:`pwd`/slyd
pip install tox

cd /app/slyd
python2.7 tests/testserver/server.py 2>&1 | grep -v 'HTTP/1.1" 200' &
sleep 3

cd /app/slybot
tox
cd /app/portia_server
./manage.py test portia_orm.tests
./manage.py test portia_api.tests
4 changes: 1 addition & 3 deletions portiaui/app/storages/cookies.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import StorageObject from 'ember-local-storage/local/object';

const Storage = StorageObject.extend();

export default Storage;
export default StorageObject.extend();
4 changes: 1 addition & 3 deletions portiaui/app/storages/page-loads.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import StorageObject from 'ember-local-storage/local/object';

const Storage = StorageObject.extend();

export default Storage;
export default StorageObject.extend();
4 changes: 1 addition & 3 deletions portiaui/app/storages/ui-state-collapsed-panels.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import StorageObject from 'ember-local-storage/local/object';

const Storage = StorageObject.extend();

export default Storage;
export default StorageObject.extend();
6 changes: 3 additions & 3 deletions portiaui/app/storages/ui-state-selected-tools.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import StorageObject from 'ember-local-storage/local/object';

const Storage = StorageObject.extend({
const ToolStorage = StorageObject.extend({
init() {
this._super(...arguments);

Expand All @@ -11,7 +11,7 @@ const Storage = StorageObject.extend({
}
});

Storage.reopenClass({
ToolStorage.reopenClass({
initialState() {
return {
magicToolActive: true,
Expand All @@ -20,4 +20,4 @@ Storage.reopenClass({
}
});

export default Storage;
export default ToolStorage;
Loading

0 comments on commit b3b4120

Please sign in to comment.