Skip to content

Commit 083ee3c

Browse files
committed
Version bump to 6.1.3. Merge branch 'develop'
Conflicts: README.md
2 parents b4f233d + 792c3a3 commit 083ee3c

File tree

7 files changed

+56
-25
lines changed

7 files changed

+56
-25
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:0.10-onbuild
2+
3+
# URI for API (without trailing /)
4+
ENV app_url http://beta.openphacts.org/1.5
5+
# Get your own key at https://dev.openphacts.org/admin/access_details
6+
ENV app_id 1c22cbe7
7+
ENV app_key 167a3a3d8539b5d85280e7178f4e62ab
8+
9+
10+
CMD ["node_modules/.bin/jasmine-node", "--captureExceptions", "./test/spec/integration/"]

README.md

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# OPS.js [![Build Status](https://travis-ci.org/openphacts/ops.js.svg?branch=develop)](https://travis-ci.org/openphacts/ops.js) [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.21396.svg)](http://dx.doi.org/10.5281/zenodo.21396)
1+
# OPS.js [![Build Status](https://travis-ci.org/openphacts/ops.js.svg?branch=develop)](https://travis-ci.org/openphacts/ops.js) [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.21396.svg)](http://dx.doi.org/10.5281/zenodo.27866)
22

33
## Open PHACTS API Version
44

@@ -27,27 +27,31 @@ We love receiving patches for bug fixes and new features. Please follow these si
2727
## Citations
2828
To cite OPS.js in publications please see [the zenodo record](https://zenodo.org/record/27866#.VcyPCPlVhBc "OPS.js zenodo record").
2929

30-
>Ian Dunlop et al.. (2015). ops.js: OPS.js 6.1.2 for Open PHACTS 1.5 API. Zenodo. 10.5281/zenodo.27866
30+
>Ian Dunlop et al.. (2015). ops.js: OPS.js 6.1.3 for Open PHACTS 1.5 API. Zenodo. 10.5281/zenodo.27866
3131
3232
For Bibtex use:
3333

34-
>@misc{ian_dunlop_2015_27866,
35-
> author = {Ian Dunlop and
36-
> Egon Willighagen and
37-
> Elblood and
38-
> andrawaag and
39-
> Stian Soiland-Reyes and
40-
> PANDORINO},
41-
> title = {ops.js: OPS.js 6.1.2 for Open PHACTS 1.5 API},
42-
> month = aug,
43-
> year = 2015,
44-
> doi = {10.5281/zenodo.27866},
45-
> url = {http://dx.doi.org/10.5281/zenodo.27866}
46-
>}
34+
```latex
35+
@misc{ian_dunlop_2015_27866,
36+
author = {Ian Dunlop and
37+
Egon Willighagen and
38+
Elblood and
39+
andrawaag and
40+
Stian Soiland-Reyes and
41+
PANDORINO},
42+
title = {ops.js: OPS.js 6.1.3 for Open PHACTS 1.5 API},
43+
month = aug,
44+
year = 2015,
45+
doi = {10.5281/zenodo.27866},
46+
url = {http://dx.doi.org/10.5281/zenodo.27866}
47+
}
48+
```
4749

4850
You can get version information by using an OPS.js method in a browser or Node:
4951

50-
`new Version().information()`
52+
```javascript
53+
new Version().information()
54+
```
5155

5256
## Using the library
5357
If running in a browser based application use `src/combined.js`. With NodeJS use `npm install ops.js`.
@@ -60,7 +64,23 @@ Look at https://dev.openphacts.org for more information about the source methods
6064

6165
[Jasmine](http://pivotal.github.io/jasmine/ "Jasmine javascript testing framework") is used to test the ops.js api. The specs for the tests are in the 'test/spec' directory. To run them use jasmine-node like this:
6266

67+
```bash
6368
jasmine-node --config app_id your_app_id --config app_key your_app_key --config app_url https://beta.openphacts.org/1.5 test/spec/integration/
69+
```
70+
71+
### Testing with Docker
72+
73+
If you use Docker, you can run the [openphacts/ops-api-test](https://hub.docker.com/r/openphacts/ops-api-test/) image
74+
to run the tests, without needing to install NodeJS.
75+
76+
Run with the `-it` parameter to get colour output.
77+
You might want to override environment variables like `app_url`, `app_id` and `app_key`.
78+
Example:
79+
80+
```bash
81+
docker run -it -e app_url=http://heater.cs.man.ac.uk:3002 openphacts/ops-api-test
82+
```
83+
6484

6585
## API call examples:
6686

citation.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author = {Ian Dunlop and
55
andrawaag and
66
Stian Soiland-Reyes and
77
PANDORINO},
8-
title = {ops.js: OPS.js 6.1.2 for Open PHACTS 1.5 API},
8+
title = {ops.js: OPS.js 6.1.3 for Open PHACTS 1.5 API},
99
month = aug,
1010
year = 2015,
1111
doi = {10.5281/zenodo.27866},

src/PathwaySearch.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ PathwaySearch.prototype.parseByCompoundResponse = function(response) {
442442
parts = item.hasPart;
443443
about = parts[constants.ABOUT];
444444
type = parts.type;
445-
geneProductLabel = parts.exactMatch.prefLabel;
445+
geneProductLabel = parts.exactMatch != null ? parts.exactMatch.prefLabel : null;
446446
geneProductURI = parts[constants.ABOUT];
447-
geneProductCWURI = parts.exactMatch[constants.ABOUT];
447+
geneProductCWURI = parts.exactMatch != null ? parts.exactMatch[constants.ABOUT] : null;
448448
organism = item.pathway_organism[constants.ABOUT];
449449
organismLabel = item.pathway_organism.label;
450450
description = item.description ? item.description : null;

src/Version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Version = function Version() {
1717
*/
1818
Version.prototype.information = function() {
1919
return {
20-
"version": "6.1.2",
20+
"version": "6.1.3",
2121
"author": "Ian Dunlop",
2222
"ORCID": "http://orcid.org/0000-0001-7066-3350",
2323
"title": "OPS.js",

src/combined.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5264,9 +5264,9 @@ PathwaySearch.prototype.parseByCompoundResponse = function(response) {
52645264
parts = item.hasPart;
52655265
about = parts[constants.ABOUT];
52665266
type = parts.type;
5267-
geneProductLabel = parts.exactMatch.prefLabel;
5267+
geneProductLabel = parts.exactMatch != null ? parts.exactMatch.prefLabel : null;
52685268
geneProductURI = parts[constants.ABOUT];
5269-
geneProductCWURI = parts.exactMatch[constants.ABOUT];
5269+
geneProductCWURI = parts.exactMatch != null ? parts.exactMatch[constants.ABOUT] : null;
52705270
organism = item.pathway_organism[constants.ABOUT];
52715271
organismLabel = item.pathway_organism.label;
52725272
description = item.description ? item.description : null;
@@ -7425,7 +7425,7 @@ Version = function Version() {
74257425
*/
74267426
Version.prototype.information = function() {
74277427
return {
7428-
"version": "6.1.2",
7428+
"version": "6.1.3",
74297429
"author": "Ian Dunlop",
74307430
"ORCID": "http://orcid.org/0000-0001-7066-3350",
74317431
"title": "OPS.js",

test/spec/integration/PathwayIntegrationSpec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,15 @@ describe("Pathways", function() {
9090
expect(pathway_result.geneProductLabel).toBeDefined();
9191
expect(pathway_result.geneProductURI).toBeDefined();
9292
expect(pathway_result.geneProductCWURI).toBeDefined();
93+
9394
//mandatory
9495
expect(pathway_result.title).not.toBeNull();
9596
expect(pathway_result.organism).not.toBeNull();
9697
expect(pathway_result.organismLabel).not.toBeNull();
9798
expect(pathway_result.identifier).not.toBeNull();
98-
expect(pathway_result.geneProductLabel).not.toBeNull();
99+
//expect(pathway_result.geneProductLabel).not.toBeNull();
99100
expect(pathway_result.geneProductURI).not.toBeNull();
100-
expect(pathway_result.geneProductCWURI).not.toBeNull();
101+
//expect(pathway_result.geneProductCWURI).not.toBeNull();
101102
});
102103
searcher.byCompound('http://www.conceptwiki.org/concept/83931753-9e3f-4e90-b104-e3bcd0b4d833', null, null, null, null, null, callback);
103104
});

0 commit comments

Comments
 (0)