Skip to content

Commit

Permalink
Merge pull request #17 from martinRenou/fix_build
Browse files Browse the repository at this point in the history
Fix CI environment
  • Loading branch information
maartenbreddels committed Feb 6, 2019
2 parents 4d15267 + 0f2aede commit a303b52
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ before_install:
- conda info -a
- conda create -q -n test-environment python=$PYTHON_VERSION ipywidgets runipy
- source activate test-environment
- conda install -c conda-forge pytest pytest-cov nodejs
- conda install -c conda-forge pytest pytest-cov nodejs pscript
- pip install coveralls
install:
- pip install -e .
script:
- py.test --cov-report= --cov=ipysheet
- (cd js && npm install && ./node_modules/.bin/karma start --single-run)
after_success:
coveralls
coveralls
12 changes: 6 additions & 6 deletions ipysheet/easy.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ def sheet(key=None, rows=5, columns=5, column_width=None, row_headers=True, colu
>>> assert sheet2 is ipysheet.current()
>>> assert sheet1 is ipysheet.sheet('key1')
>>> assert sheet1 is ipysheet.current()
Parameters
----------
key : any
If not used before, register the sheet under this key. If used before, return the previous `Sheet` instance
If not used before, register the sheet under this key. If used before, return the previous `Sheet` instance
registered with this key.
Returns
Expand Down Expand Up @@ -278,12 +278,12 @@ def renderer(code, name):
----------
code : str or code or function objject
If a string object, it is assumed to be a JavaScript snippet, else it is assumed
to be a function or code object and will be transpiled to javascript using flexx.pyscript.
to be a function or code object and will be transpiled to javascript using flexxui/pscript.
name : name of the renderer
"""
if not isinstance(code, six.string_types):
import flexx.pyscript
code_transpiled = flexx.pyscript.py2js(code, new_name='the_renderer', indent=4)
from pscript import py2js
code_transpiled = py2js(code, new_name='the_renderer', indent=4)
code = '''
function() {
%s
Expand Down Expand Up @@ -321,7 +321,7 @@ def hold_cells():
"""Hold adding any cell widgets until leaving this context.
This may give a better performance when adding many cells.
Example
-------
Expand Down
6 changes: 4 additions & 2 deletions js/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Generated on Fri Apr 14 2017 18:21:49 GMT+0200 (CEST)
//var webpackConfig = require('./webpack.config')[1];
var webpack = require('webpack');
const process = require('process');
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function(config) {
config.set({
Expand Down Expand Up @@ -57,8 +59,8 @@ module.exports = function(config) {
browsers: ['HeadlessChrome'],
customLaunchers: {
HeadlessChrome: {
base: 'Chrome',
flags: ['--headless', '--disable-gpu', '--remote-debugging-port=9222']
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
// if true, Karma captures browsers, runs the tests and exits
Expand Down
7 changes: 4 additions & 3 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
"sinon-chai": "^2.11.0",
"style-loader": "^0.18.2",
"ts-loader": "~2.2.2",
"typescript": "~2.3.1",
"webpack": "^1.12.14"
"typescript": "^3.3.1",
"webpack": "^1.12.14",
"puppeteer": "^1.12.1"
},
"dependencies": {
"@jupyter-widgets/base": "^1.0.1",
Expand All @@ -56,4 +57,4 @@
"style-loader": "^0.18.2",
"underscore": "^1.8.3"
}
}
}

0 comments on commit a303b52

Please sign in to comment.