Skip to content

Commit

Permalink
Merge branch 'dev' into feature/graph-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
voidest committed May 11, 2017
2 parents 5dbbd32 + de9992f commit c256a9e
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,41 @@
env:
- EMAIL="aleksandr_sidoruk@epam.com" PACKAGE_NAME="pipeline-builder"
language: node_js
node_js: "6"
os: linux
dist: trusty
before_install:
- |-
if [[ $TRAVIS_BRANCH == "dev" ]] || [[ $TRAVIS_BRANCH == "master" ]]; then
NPM_TAG="$(if [[ $TRAVIS_BRANCH == "dev" ]]; then echo "dev"; else echo "latest"; fi)"
LAST_PUBLISHED="$(npm view $PACKAGE_NAME@$NPM_TAG version)"
CURRENT_VERSION="$(npm version | grep -Po "(?<='$PACKAGE_NAME': ')[^']*")"
if [[ $LAST_PUBLISHED == $CURRENT_VERSION ]]; then
echo "Version change required"
exit 1;
fi
fi
install:
- yarn global add gulp-cli
- yarn install
script: gulp
after_script: gulp test:coveralls
deploy:
- provider: npm
skip_cleanup: true
email: $EMAIL
api_key: $NPM_AUTH_TOKEN
tag: dev
on:
branch: dev
- provider: npm
skip_cleanup: true
email: $EMAIL
api_key: $NPM_AUTH_TOKEN
tag: latest
on:
branch: master
after_deploy:
- "curl \"http://35.164.165.183:8080/job/pipeline-wdl-builder-$TRAVIS_BRANCH/build?token=$JENKINS_SECRET_TOKEN\""
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Pipeline Builder is a JavaScript library for visualizing and constructing bioinf

## Demo environment

Example of a **Pipeline Builder** usage is available at [http://pb.opensource.epam.com](http://pb.opensource.epam.com)
Example of a **Pipeline Builder** usage is available at [http://pb.opensource.epam.com](http://pb.opensource.epam.com) built on master branch and
[http://pb.opensource.epam.com:10000](http://pb.opensource.epam.com:10000) built on dev branch

This demo application demonstrates major capabilities of a **Pipeline Builder**

Expand Down
2 changes: 1 addition & 1 deletion src/generator/WDL/entities/WorkflowGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export default class WorkflowGenerator {

_.forEach(outputMappings, (val, key) => {
if (key.indexOf('.') >= 0) {
res += `${this.buildPortValue(val)}${EOL}`;
res += `${DOUBLE_SCOPE_INDENT}${key}${EOL}`;
} else {
res += `${DOUBLE_SCOPE_INDENT}${val.desc.type} ${key} ${constants.EQ} ${this.buildPortValue(val)}${EOL}`;
}
Expand Down
7 changes: 6 additions & 1 deletion src/parser/WDL/entities/WDLWorkflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ export default class WDLWorkflow {
}
} else if (declaration && nodeValue.str === 'identifier') {
const portName = nodeValue.source_string;
step.i[declaration].bind(WDLWorkflow.groupNameResolver(parentStep, portName).i[portName]);
const portStep = WDLWorkflow.groupNameResolver(parentStep, portName);
if (_.isUndefined(portStep)) {
step.i[declaration].bind(portName);
} else {
step.i[declaration].bind(portStep.i[portName]);
}
} else {
const expression = extractExpression(nodeValue);
step.i[declaration].bind(expression.string);
Expand Down
45 changes: 44 additions & 1 deletion test/parser/WDL/entities/WDLWorkflowTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { expect } from 'chai';

import WDLWorkflow from '../../../../src/parser/WDL/entities/WDLWorkflow';
import WDLParserError from '../../../../src/parser/WDL/utils/utils';
import Port from '../../../../src/model/Port';

describe('parser/WDL/entities/WDLWorkflow', () => {

Expand Down Expand Up @@ -237,7 +238,46 @@ describe('parser/WDL/entities/WDLWorkflow', () => {
col: 6,
},
alias: null,
body: null,
body: {
name: 'CallBody',
attributes: {
declarations: {
list: [],
},
io: {
list: [
{
name: 'Inputs',
attributes: {
map: {
list: [
{
name: 'IOMapping',
attributes: {
key: {
id: 14,
str: 'identifier',
source_string: 'currSample',
line: 8,
col: 9,
},
value: {
id: 14,
str: 'identifier',
source_string: 'i',
line: 8,
col: 20,
},
},
},
],
},
},
},
],
},
},
},
},
},
],
Expand All @@ -251,6 +291,9 @@ describe('parser/WDL/entities/WDLWorkflow', () => {
const context = {
actionMap: {
bar: {
i: {
currSample: new Port('currSample'),
},
},
},
};
Expand Down

0 comments on commit c256a9e

Please sign in to comment.