Skip to content

Commit

Permalink
Version bump to 6.1.3. Merge branch 'develop'
Browse files Browse the repository at this point in the history
Conflicts:
	README.md
  • Loading branch information
ianwdunlop committed Aug 25, 2015
2 parents b4f233d + 792c3a3 commit 083ee3c
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 25 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM node:0.10-onbuild

# URI for API (without trailing /)
ENV app_url http://beta.openphacts.org/1.5
# Get your own key at https://dev.openphacts.org/admin/access_details
ENV app_id 1c22cbe7
ENV app_key 167a3a3d8539b5d85280e7178f4e62ab


CMD ["node_modules/.bin/jasmine-node", "--captureExceptions", "./test/spec/integration/"]
52 changes: 36 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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)
# 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)

## Open PHACTS API Version

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

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

>@misc{ian_dunlop_2015_27866,
> author = {Ian Dunlop and
> Egon Willighagen and
> Elblood and
> andrawaag and
> Stian Soiland-Reyes and
> PANDORINO},
> title = {ops.js: OPS.js 6.1.2 for Open PHACTS 1.5 API},
> month = aug,
> year = 2015,
> doi = {10.5281/zenodo.27866},
> url = {http://dx.doi.org/10.5281/zenodo.27866}
>}
```latex
@misc{ian_dunlop_2015_27866,
author = {Ian Dunlop and
Egon Willighagen and
Elblood and
andrawaag and
Stian Soiland-Reyes and
PANDORINO},
title = {ops.js: OPS.js 6.1.3 for Open PHACTS 1.5 API},
month = aug,
year = 2015,
doi = {10.5281/zenodo.27866},
url = {http://dx.doi.org/10.5281/zenodo.27866}
}
```

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

`new Version().information()`
```javascript
new Version().information()
```

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

[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:

```bash
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/
```

### Testing with Docker

If you use Docker, you can run the [openphacts/ops-api-test](https://hub.docker.com/r/openphacts/ops-api-test/) image
to run the tests, without needing to install NodeJS.

Run with the `-it` parameter to get colour output.
You might want to override environment variables like `app_url`, `app_id` and `app_key`.
Example:

```bash
docker run -it -e app_url=http://heater.cs.man.ac.uk:3002 openphacts/ops-api-test
```


## API call examples:

Expand Down
2 changes: 1 addition & 1 deletion citation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author = {Ian Dunlop and
andrawaag and
Stian Soiland-Reyes and
PANDORINO},
title = {ops.js: OPS.js 6.1.2 for Open PHACTS 1.5 API},
title = {ops.js: OPS.js 6.1.3 for Open PHACTS 1.5 API},
month = aug,
year = 2015,
doi = {10.5281/zenodo.27866},
Expand Down
4 changes: 2 additions & 2 deletions src/PathwaySearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,9 @@ PathwaySearch.prototype.parseByCompoundResponse = function(response) {
parts = item.hasPart;
about = parts[constants.ABOUT];
type = parts.type;
geneProductLabel = parts.exactMatch.prefLabel;
geneProductLabel = parts.exactMatch != null ? parts.exactMatch.prefLabel : null;
geneProductURI = parts[constants.ABOUT];
geneProductCWURI = parts.exactMatch[constants.ABOUT];
geneProductCWURI = parts.exactMatch != null ? parts.exactMatch[constants.ABOUT] : null;
organism = item.pathway_organism[constants.ABOUT];
organismLabel = item.pathway_organism.label;
description = item.description ? item.description : null;
Expand Down
2 changes: 1 addition & 1 deletion src/Version.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Version = function Version() {
*/
Version.prototype.information = function() {
return {
"version": "6.1.2",
"version": "6.1.3",
"author": "Ian Dunlop",
"ORCID": "http://orcid.org/0000-0001-7066-3350",
"title": "OPS.js",
Expand Down
6 changes: 3 additions & 3 deletions src/combined.js
Original file line number Diff line number Diff line change
Expand Up @@ -5264,9 +5264,9 @@ PathwaySearch.prototype.parseByCompoundResponse = function(response) {
parts = item.hasPart;
about = parts[constants.ABOUT];
type = parts.type;
geneProductLabel = parts.exactMatch.prefLabel;
geneProductLabel = parts.exactMatch != null ? parts.exactMatch.prefLabel : null;
geneProductURI = parts[constants.ABOUT];
geneProductCWURI = parts.exactMatch[constants.ABOUT];
geneProductCWURI = parts.exactMatch != null ? parts.exactMatch[constants.ABOUT] : null;
organism = item.pathway_organism[constants.ABOUT];
organismLabel = item.pathway_organism.label;
description = item.description ? item.description : null;
Expand Down Expand Up @@ -7425,7 +7425,7 @@ Version = function Version() {
*/
Version.prototype.information = function() {
return {
"version": "6.1.2",
"version": "6.1.3",
"author": "Ian Dunlop",
"ORCID": "http://orcid.org/0000-0001-7066-3350",
"title": "OPS.js",
Expand Down
5 changes: 3 additions & 2 deletions test/spec/integration/PathwayIntegrationSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,15 @@ describe("Pathways", function() {
expect(pathway_result.geneProductLabel).toBeDefined();
expect(pathway_result.geneProductURI).toBeDefined();
expect(pathway_result.geneProductCWURI).toBeDefined();

//mandatory
expect(pathway_result.title).not.toBeNull();
expect(pathway_result.organism).not.toBeNull();
expect(pathway_result.organismLabel).not.toBeNull();
expect(pathway_result.identifier).not.toBeNull();
expect(pathway_result.geneProductLabel).not.toBeNull();
//expect(pathway_result.geneProductLabel).not.toBeNull();
expect(pathway_result.geneProductURI).not.toBeNull();
expect(pathway_result.geneProductCWURI).not.toBeNull();
//expect(pathway_result.geneProductCWURI).not.toBeNull();
});
searcher.byCompound('http://www.conceptwiki.org/concept/83931753-9e3f-4e90-b104-e3bcd0b4d833', null, null, null, null, null, callback);
});
Expand Down

0 comments on commit 083ee3c

Please sign in to comment.