vsm-dictionary-bioportal
Advanced tools
Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "vsm-dictionary-bioportal", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Implementation of a VSM-dictionary that interfaces with the BioPortal REST API", | ||
@@ -29,9 +29,9 @@ "main": "src/DictionaryBioPortal.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.10.2", | ||
"@babel/preset-env": "^7.10.2", | ||
"@babel/core": "^7.11.6", | ||
"@babel/preset-env": "^7.11.5", | ||
"babel-loader": "^8.1.0", | ||
"chai": "^4.2.0", | ||
"clean-webpack-plugin": "^1.0.1", | ||
"codecov": "^3.7.0", | ||
"copy-webpack-plugin": "^5.1.1", | ||
"codecov": "^3.8.1", | ||
"copy-webpack-plugin": "^5.1.2", | ||
"eslint": "^5.16.0", | ||
@@ -42,12 +42,12 @@ "html-webpack-plugin": "^3.2.0", | ||
"nyc": "^15.1.0", | ||
"terser-webpack-plugin": "^2.3.7", | ||
"terser-webpack-plugin": "^2.3.8", | ||
"text-transform-loader": "^2.0.0", | ||
"webpack": "^4.43.0", | ||
"webpack-cli": "^3.3.11", | ||
"webpack": "^4.44.1", | ||
"webpack-cli": "^3.3.12", | ||
"webpack-dev-server": "^3.11.0" | ||
}, | ||
"dependencies": { | ||
"vsm-dictionary": "^2.6.4", | ||
"vsm-dictionary": "^2.6.6", | ||
"xmlhttprequest": "^1.8.0" | ||
} | ||
} |
# vsm-dictionary-bioportal | ||
<!-- badges: start --> | ||
[](https://travis-ci.com/UniBioDicts/vsm-dictionary-bioportal) | ||
[](https://github.com/UniBioDicts/vsm-dictionary-bioportal/actions) | ||
[](https://codecov.io/gh/UniBioDicts/vsm-dictionary-bioportal) | ||
@@ -15,3 +15,3 @@ [](https://www.npmjs.com/package/vsm-dictionary-bioportal) | ||
of the 'VsmDictionary' parent-class/interface (from the package | ||
[`vsm-dictionary`](https://github.com/vsmjs/vsm-dictionary)), that | ||
[`vsm-dictionary`](https://github.com/vsm/vsm-dictionary)), that | ||
communicates with [BioPortal's](https://bioportal.bioontology.org/) | ||
@@ -26,9 +26,12 @@ REST API and translates the provided terms+IDs into a VSM-specific format. | ||
You first need to have a BioPortal account to use this dictionary. Once you | ||
have an account, you will be given an API key to authorise your access to | ||
the provided REST API's resources. Then, you can create a `test.js` file and | ||
include this code for example: | ||
You first need to have a BioPortal account to use this dictionary. | ||
Once you have an account, you will be given an API key to authorise your access to the provided REST API's resources. | ||
### Node.js | ||
Create a directory `test-dir` and inside run `npm install vsm-dictionary-bioportal`. | ||
Then, create a `test.js` file and include this code for example: | ||
```javascript | ||
const DictionaryBioPortal = require('./DictionaryBioPortal'); | ||
const DictionaryBioPortal = require('vsm-dictionary-bioportal'); | ||
const apiKeyString = 'a-valid-API-key-string'; | ||
@@ -57,2 +60,9 @@ const dict = new DictionaryBioPortal({apiKey: apiKeyString}); | ||
### Browsers | ||
```html | ||
<script src="https://unpkg.com/vsm-dictionary-bioportal@^1.2.0/dist/vsm-dictionary-bioportal.min.js"></script> | ||
``` | ||
after which it is accessible as the global variable `VsmDictionaryBioPortal`. | ||
## Tests | ||
@@ -96,5 +106,3 @@ | ||
Therefore, we included `webpack.config.js` (note: the one in the root folder, | ||
_not_ the one in the 'demo' folder), which is a Webpack configuration file for | ||
generating such a browser-ready package. | ||
Therefore, we included [webpack.config.js](https://github.com/UniBioDicts/vsm-dictionary-bioportal/blob/master/webpack.config.js), which is a Webpack configuration file for generating such a browser-ready package. | ||
@@ -111,3 +119,3 @@ By running `npm build`, the built file will appear in a 'dist' subfolder. | ||
the parent class | ||
[specification](https://github.com/vsmjs/vsm-dictionary/blob/master/Dictionary.spec.md). | ||
[specification](https://github.com/vsm/vsm-dictionary/blob/master/Dictionary.spec.md). | ||
In the next sections we will explain the mapping between BioPortal's API | ||
@@ -213,3 +221,3 @@ terms (as specified in the [API documentation](http://data.bioontology.org/documentation)) | ||
Depending on the `options.filter.id` and `options.filter.dictID` properties and | ||
following the vsm-dictionary parent class [specification](https://github.com/vsmjs/vsm-dictionary/blob/master/Dictionary.spec.md), | ||
following the vsm-dictionary parent class [specification](https://github.com/vsm/vsm-dictionary/blob/master/Dictionary.spec.md), | ||
there can be only be 4 cases of queries that are send to BioPortal: | ||
@@ -317,3 +325,3 @@ | ||
values of `options.filter.dictID` and `options.sort.dictID` as well as the | ||
[specification](https://github.com/vsmjs/vsm-dictionary/blob/master/Dictionary.spec.md) | ||
[specification](https://github.com/vsm/vsm-dictionary/blob/master/Dictionary.spec.md) | ||
of the vsm-dictionary parent class. Note that there can be cases where 4 URLs | ||
@@ -320,0 +328,0 @@ are fired (simultaneously) during a string search to get results for preferred |
@@ -16,3 +16,3 @@ /* | ||
module.exports = (env = {}) => ({ | ||
module.exports = () => ({ | ||
@@ -19,0 +19,0 @@ mode: 'production', |
Sorry, the diff of this file is too big to display
324616
370
Updatedvsm-dictionary@^2.6.6