Skip to content

Commit e5a6b5e

Browse files
committed
Release v0.2
2 parents 2c5d1ae + 4b6f5f3 commit e5a6b5e

File tree

116 files changed

+19872
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+19872
-0
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
**/.DS_Store
2+
**/EGG-INFO
3+
**/*.pyc
4+
**/.ipynb_checkpoints/
5+
.idea
6+
.tools
7+
.venv/**
8+
docs/_build
9+
build
10+
dist
11+
results
12+
wft4galaxy.egg-info
13+
wft4galaxy/wft4galaxy.properties

.travis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
sudo: required
2+
3+
language: python
4+
5+
python:
6+
- "2.7"
7+
- "3.6"
8+
9+
services:
10+
- docker
11+
12+
13+
env:
14+
global:
15+
- GALAXY_CONFIG_MASTER_API_KEY=HSNiugRFvgT574F43jZ7N9F3
16+
- GALAXY_NETWORK=galaxy
17+
- GALAXY_ADDRESS=172.18.0.22
18+
- GALAXY_PORT=80
19+
- GALAXY_DOCKER_HOST=127.0.0.1
20+
- GALAXY_URL=http://${GALAXY_DOCKER_HOST}:${GALAXY_PORT}
21+
- GALAXY_CONTAINER_NAME=galaxy-server
22+
- GALAXY_USERNAME=wft4galaxy
23+
- GALAXY_USER_PASSWORD=wft4galaxy-tester
24+
- GALAXY_USER_EMAIL=wft4galaxy@wft.it
25+
26+
27+
before_install:
28+
- pip install -r requirements.txt
29+
- docker network create --driver bridge --subnet=172.18.0.0/16 ${GALAXY_NETWORK}
30+
- utils/docker/start-galaxy.sh --debug --master-api-key ${GALAXY_CONFIG_MASTER_API_KEY} --network ${GALAXY_NETWORK} --ip ${GALAXY_ADDRESS} --port ${GALAXY_PORT} --docker-host ${GALAXY_DOCKER_HOST} --container-name ${GALAXY_CONTAINER_NAME}
31+
- utils/docker/create-galaxy-user.py --debug --server ${GALAXY_URL} --api-key ${GALAXY_CONFIG_MASTER_API_KEY} ${GALAXY_USERNAME} ${GALAXY_USER_PASSWORD} ${GALAXY_USER_EMAIL} --with-api-key
32+
33+
install:
34+
- python setup.py install
35+
36+
script:
37+
- GALAXY_API_KEY=$(cat "wft4galaxy.id")
38+
- tests/comparators/run_all
39+
- wft4galaxy -f examples/change_case/workflow-test.yml --server ${GALAXY_URL} --api-key ${GALAXY_API_KEY}
40+
- export GALAXY_URL=http://${GALAXY_ADDRESS} # use the address of the Galaxy container within the Docker network
41+
- branch=${TRAVIS_PULL_REQUEST_BRANCH:-${TRAVIS_BRANCH}}
42+
- tests/docker/run-all.sh --branch ${branch} --server ${GALAXY_URL} --api-key ${GALAXY_API_KEY} --network ${GALAXY_NETWORK}
43+
44+
45+
after_script:
46+
- docker rm -f ${GALAXY_CONTAINER_NAME}

LICENSE.txt

Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
Copyright (c) 2016-2017 CRS4
2+
3+
Licensed under the Academic Free License version 3.0
4+
5+
1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free,
6+
non-exclusive, sublicensable license, for the duration of the copyright, to
7+
do the following:
8+
9+
a) to reproduce the Original Work in copies, either alone or as part of a
10+
collective work;
11+
12+
b) to translate, adapt, alter, transform, modify, or arrange the Original
13+
Work, thereby creating derivative works ("Derivative Works") based upon
14+
the Original Work;
15+
16+
c) to distribute or communicate copies of the Original Work and Derivative
17+
Works to the public, under any license of your choice that does not
18+
contradict the terms and conditions, including Licensor's reserved
19+
rights and remedies, in this Academic Free License;
20+
21+
d) to perform the Original Work publicly; and
22+
23+
e) to display the Original Work publicly.
24+
25+
2) Grant of Patent License. Licensor grants You a worldwide, royalty-free,
26+
non-exclusive, sublicensable license, under patent claims owned or
27+
controlled by the Licensor that are embodied in the Original Work as
28+
furnished by the Licensor, for the duration of the patents, to make, use,
29+
sell, offer for sale, have made, and import the Original Work and
30+
Derivative Works.
31+
32+
3) Grant of Source Code License. The term "Source Code" means the preferred
33+
form of the Original Work for making modifications to it and all available
34+
documentation describing how to modify the Original Work. Licensor agrees
35+
to provide a machine-readable copy of the Source Code of the Original Work
36+
along with each copy of the Original Work that Licensor distributes.
37+
Licensor reserves the right to satisfy this obligation by placing a
38+
machine-readable copy of the Source Code in an information repository
39+
reasonably calculated to permit inexpensive and convenient access by You
40+
for as long as Licensor continues to distribute the Original Work.
41+
42+
4) Exclusions From License Grant. Neither the names of Licensor, nor the
43+
names of any contributors to the Original Work, nor any of their
44+
trademarks or service marks, may be used to endorse or promote products
45+
derived from this Original Work without express prior permission of the
46+
Licensor. Except as expressly stated herein, nothing in this License
47+
grants any license to Licensor's trademarks, copyrights, patents, trade
48+
secrets or any other intellectual property. No patent license is granted
49+
to make, use, sell, offer for sale, have made, or import embodiments of
50+
any patent claims other than the licensed claims defined in Section 2.
51+
No license is granted to the trademarks of Licensor even if such marks
52+
are included in the Original Work. Nothing in this License shall be
53+
interpreted to prohibit Licensor from licensing under terms different
54+
from this License any Original Work that Licensor otherwise would have a
55+
right to license.
56+
57+
5) External Deployment. The term "External Deployment" means the use,
58+
distribution, or communication of the Original Work or Derivative Works
59+
in any way such that the Original Work or Derivative Works may be used by
60+
anyone other than You, whether those works are distributed or
61+
communicated to those persons or made available as an application
62+
intended for use over a network. As an express condition for the grants
63+
of license hereunder, You must treat any External Deployment by You of
64+
the Original Work or a Derivative Work as a distribution under
65+
section 1(c).
66+
67+
6) Attribution Rights. You must retain, in the Source Code of any Derivative
68+
Works that You create, all copyright, patent, or trademark notices from
69+
the Source Code of the Original Work, as well as any notices of licensing
70+
and any descriptive text identified therein as an "Attribution Notice."
71+
You must cause the Source Code for any Derivative Works that You create
72+
to carry a prominent Attribution Notice reasonably calculated to inform
73+
recipients that You have modified the Original Work.
74+
75+
7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that
76+
the copyright in and to the Original Work and the patent rights granted
77+
herein by Licensor are owned by the Licensor or are sublicensed to You
78+
under the terms of this License with the permission of the contributor(s)
79+
of those copyrights and patent rights. Except as expressly stated in the
80+
immediately preceding sentence, the Original Work is provided under this
81+
License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or
82+
implied, including, without limitation, the warranties of
83+
non-infringement, merchantability or fitness for a particular purpose.
84+
THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This
85+
DISCLAIMER OF WARRANTY constitutes an essential part of this License.
86+
No license to the Original Work is granted by this License except under
87+
this disclaimer.
88+
89+
8) Limitation of Liability. Under no circumstances and under no legal
90+
theory, whether in tort (including negligence), contract, or otherwise,
91+
shall the Licensor be liable to anyone for any indirect, special,
92+
incidental, or consequential damages of any character arising as a result
93+
of this License or the use of the Original Work including, without
94+
limitation, damages for loss of goodwill, work stoppage, computer failure
95+
or malfunction, or any and all other commercial damages or losses. This
96+
limitation of liability shall not apply to the extent applicable law
97+
prohibits such limitation.
98+
99+
9) Acceptance and Termination. If, at any time, You expressly assented to
100+
this License, that assent indicates your clear and irrevocable acceptance
101+
of this License and all of its terms and conditions. If You distribute or
102+
communicate copies of the Original Work or a Derivative Work, You must
103+
make a reasonable effort under the circumstances to obtain the express
104+
assent of recipients to the terms of this License. This License
105+
conditions your rights to undertake the activities listed in Section 1,
106+
including your right to create Derivative Works based upon the Original
107+
Work, and doing so without honoring these terms and conditions is
108+
prohibited by copyright law and international treaty. Nothing in this
109+
License is intended to affect copyright exceptions and limitations
110+
(including "fair use" or "fair dealing"). This License shall terminate
111+
immediately and You may no longer exercise any of the rights granted to
112+
You by this License upon your failure to honor the conditions in
113+
Section 1(c).
114+
115+
10) Termination for Patent Action. This License shall terminate
116+
automatically and You may no longer exercise any of the rights granted
117+
to You by this License as of the date You commence an action, including
118+
a cross-claim or counterclaim, against Licensor or any licensee alleging
119+
that the Original Work infringes a patent. This termination provision
120+
shall not apply for an action alleging patent infringement by
121+
combinations of the Original Work with other software or hardware.
122+
123+
11) Jurisdiction, Venue and Governing Law. Any action or suit relating to
124+
this License may be brought only in the courts of a jurisdiction wherein
125+
the Licensor resides or in which Licensor conducts its primary business,
126+
and under the laws of that jurisdiction excluding its conflict-of-law
127+
provisions. The application of the United Nations Convention on
128+
Contracts for the International Sale of Goods is expressly excluded. Any
129+
use of the Original Work outside the scope of this License or after its
130+
termination shall be subject to the requirements and penalties of
131+
copyright or patent law in the appropriate jurisdiction. This section
132+
shall survive the termination of this License.
133+
134+
12) Attorneys' Fees. In any action to enforce the terms of this License or
135+
seeking damages relating thereto, the prevailing party shall be entitled
136+
to recover its costs and expenses, including, without limitation,
137+
reasonable attorneys' fees and costs incurred in connection with such
138+
action, including any appeal of such action. This section shall survive
139+
the termination of this License.
140+
141+
13) Miscellaneous. If any provision of this License is held to be
142+
unenforceable, such provision shall be reformed only to the extent
143+
necessary to make it enforceable.
144+
145+
14) Definition of "You" in This License. "You" throughout this License,
146+
whether in upper or lower case, means an individual or a legal entity
147+
exercising rights under, and complying with all of the terms of, this
148+
License. For legal entities, "You" includes any entity that controls, is
149+
controlled by, or is under common control with you. For purposes of this
150+
definition, "control" means (i) the power, direct or indirect, to cause
151+
the direction or management of such entity, whether by contract or
152+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
153+
outstanding shares, or (iii) beneficial ownership of such entity.
154+
155+
15) Right to Use. You may use the Original Work in all ways not otherwise
156+
restricted or conditioned by this License or by law, and Licensor
157+
promises not to interfere with or be responsible for such uses by You.
158+
159+
16) Modification of This License. This License is Copyright © 2005 Lawrence
160+
Rosen. Permission is granted to copy, distribute, or communicate this
161+
License without modification. Nothing in this License permits You to
162+
modify this License as applied to the Original Work or to Derivative
163+
Works. However, You may modify the text of this License and copy,
164+
distribute or communicate your modified version (the "Modified
165+
License") and apply it to other original works of authorship subject to
166+
the following conditions: (i) You may not indicate in any way that your
167+
Modified License is the "Academic Free License" or "AFL" and you may not
168+
use those names in the name of your Modified License; (ii) You must
169+
replace the notice specified in the first paragraph above with the
170+
notice "Licensed under <insert your license name here>" or with a notice
171+
of your own that is not confusingly similar to the notice in this
172+
License; and (iii) You may not claim that your original works are open
173+
source software unless your Modified License has been approved by Open
174+
Source Initiative (OSI) and You comply with its license review and
175+
certification process.

README.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# wft4galaxy: <br> Workflow Tester for Galaxy
2+
3+
[![Build Status](https://travis-ci.org/phnmnl/wft4galaxy.svg?branch=master)](https://travis-ci.org/phnmnl/wft4galaxy)
4+
5+
## Description
6+
**wft4galaxy** is a Python module which allows to automate the running of Galaxy workflow tests. It can be used either as local Python library or a Docker image running inside a Docker container.
7+
8+
## Installation
9+
10+
Basically, to install **wft4galaxy** as a local Python library, you need to follow the two speps below:
11+
12+
1. clone the github repository:
13+
14+
```bash
15+
git clone https://github.com/phnmnl/wft4galaxy
16+
```
17+
18+
2. install the module using the usual setup script:
19+
20+
```bash
21+
cd wft4galaxy
22+
python setup.py install
23+
```
24+
25+
> **Notice**. If you are using a Linux based system, like *Ubuntu*, you probably need to install the two libraries **`python-lxml`** and **`libyaml-dev`** as a further *prerequisite*.
26+
27+
28+
Alternatively, you can use **wft4galaxy** with Docker (see [Docker-based Installation](http://wft4galaxy.readthedocs.io/installation.html#id2)).
29+
30+
## Usage Instructions
31+
32+
If you have installed **wft4galaxy** as native Python library, you can launch it from your terminal:
33+
34+
``` bash
35+
wft4galaxy [options]
36+
```
37+
38+
The the main available options are:
39+
40+
```bash
41+
usage: wft4galaxy [-h] [--server GALAXY_URL] [--api-key GALAXY_API_KEY]
42+
[-f FILE] [--enable-logger] [--debug] [--disable-cleanup]
43+
[--output-format {text,xunit}] [--xunit-file FILE_PATH] [-o PATH]
44+
[test [test ...]]
45+
46+
positional arguments:
47+
test Workflow Test Name
48+
49+
optional arguments:
50+
-h, --help show this help message and exit
51+
--server GALAXY_URL Galaxy server URL
52+
--api-key GALAXY_API_KEY Galaxy server API KEY
53+
-f FILE, --file FILE YAML configuration file of workflow tests (default is workflow-test-suite.yml)
54+
--enable-logger Enable log messages
55+
--debug Enable debug mode
56+
--disable-cleanup Disable cleanup
57+
--output-format {text,xunit} Choose output type
58+
--xunit-file FILE_PATH Set the path of the xUnit report file (absolute or relative to the output folder)
59+
-o PATH, --output PATH Path of the output folder
60+
```
61+
62+
As an example, you can run tests defined in your ``workflow-test-suite.yml`` definition file by typing:
63+
64+
```bash
65+
wft4galaxy
66+
```
67+
68+
Alternatively, you can run one or more tests (e.g., ``change_case``) in your definition file specifying their names:
69+
70+
```bash
71+
wft4galaxy change_case
72+
```
73+
74+
See [documentation](http://wft4galaxy.readthedocs.io/) for more details.

0 commit comments

Comments
 (0)