-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add scripts to package.json * Run npm run generate:server:edge * Finalize update
- Loading branch information
1 parent
3162c9b
commit c35c5ac
Showing
14 changed files
with
96 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
|
||
|
||
def main(): | ||
app.run(port=8080) | ||
app.run(port=8080, debug=False) | ||
|
||
|
||
if __name__ == '__main__': | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ def get_tool(): # noqa: E501 | |
""" | ||
tool = Tool( | ||
name="person-name-annotator-example", | ||
version="1.0.2", | ||
version="1.1.0", | ||
license=License.APACHE_2_0, | ||
repository="github:nlpsandbox/person-name-annotator-example", | ||
description="Example implementation of the NLP Sandbox Person " + | ||
|
@@ -22,7 +22,7 @@ def get_tool(): # noqa: E501 | |
author_email="[email protected]", | ||
url="https://github.com/nlpsandbox/person-name-annotator-example", | ||
type="nlpsandbox:person-name-annotator", | ||
api_version="1.0.2" | ||
api_version="1.1.0" | ||
) | ||
return tool, 200 | ||
|
||
|
@@ -35,4 +35,4 @@ def get_tool_dependencies(): # noqa: E501 | |
:rtype: ToolDependencies | ||
""" | ||
return ToolDependencies(tool_dependencies=[]), 200 | ||
return ToolDependencies(tools=[]), 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,33 @@ | ||
openapi: 3.0.3 | ||
info: | ||
contact: | ||
email: [email protected] | ||
name: The NLP Sandbox Team | ||
email: [email protected] | ||
name: NLP Sandbox Team | ||
url: https://nlpsandbox.io | ||
description: | | ||
# Introduction | ||
The Person Name Annotator is one of the first type of NLP Tools that can be benchmarked on [nlpsandbox.io](https://nlpsandbox.io). A Person Name Annotator takes as input a clinical note and outputs a list of predicted person name annotations found in the clinical note. This OpenAPI document describes the specification of a Person Name Annotator. This specification includes the schemas of the input and output data, and the conditions that this annotator must meet if you want to benchmark its performance on [nlpsandbox.io](https://nlpsandbox.io). | ||
A Person Name Annotator takes as input a clinical note and outputs a list of predicted person name annotations found in the clinical note. This OpenAPI document describes the specification of a Person Name Annotator. This specification includes the schemas of the input and output data, and the conditions that this annotator must meet if you want to benchmark its performance on [nlpsandbox.io](https://nlpsandbox.io). | ||
# Getting Started | ||
The GitHub repository [nlpsandbox/person-name-annotator-example](https://github.com/nlpsandbox/person-name-annotator-example) provides a simple example implementation of a Python-Flask Person Name Annotator. By the end of the tutorial available in this repository, you will have built a Docker image for a simple Person Name Annotator. You will then be able to submit this image to [nlpsandbox.io](https://nlpsandbox.io) to benchmark its performance. | ||
The GitHub repository [nlpsandbox/person-name-annotator-example](https://github.com/nlpsandbox/person-name-annotator-example) provides a simple example implementation of a Python-Flask Person Name Annotator. By the end of the tutorial available in the README, you will have built a Docker image for a simple Person Name Annotator. You will then be able to submit this image to [nlpsandbox.io](https://nlpsandbox.io) to benchmark its performance. | ||
# Benchmarking Requirements | ||
The following conditions must be met by your Person Name Annotator if you want to benchmark its performance on [nlpsandbox.io](https://nlpsandbox.io). | ||
Your NLP Sandbox tool must meet the following conditions before evaluating its performance on [nlpsandbox.io](https://nlpsandbox.io). | ||
- The endpoint `/` must redirect to `/api/v1/tool`. | ||
- The endpoint `/ui` must redirect to the web interface (UI). | ||
- The output of this tool must be reproducible: a given input should always | ||
generate the same output. | ||
- This tool must not attempt to connect to remote server for reproducibility, | ||
robustness, and security reasons. When benchmarked on [nlpsandbox.io](https://nlpsandbox.io), | ||
this tool will not be able to connect to remote servers. | ||
- To ensure the results are reproducible and robust, and the data are | ||
secured, this tool must not connect to any remote server. When benchmarked | ||
on [nlpsandbox.io](https://nlpsandbox.io), this tool will not be able to | ||
connect to remote servers. | ||
# Examples | ||
- [Person Name Annotator Example (Python)](https://github.com/nlpsandbox/person-name-annotator-example) | ||
license: | ||
name: Apache 2.0 | ||
url: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/develop/LICENSE | ||
title: NLP Sandbox Person Name Annotator API | ||
version: 1.0.2 | ||
version: 1.1.0 | ||
x-logo: | ||
url: https://nlpsandbox.github.io/nlpsandbox-schemas/logo.png | ||
servers: | ||
|
@@ -394,7 +395,7 @@ components: | |
authorEmail: [email protected] | ||
url: https://example.com | ||
type: nlpsandbox:date-annotator | ||
apiVersion: 1.0.2 | ||
apiVersion: 1.1.0 | ||
properties: | ||
name: | ||
description: The tool name | ||
|
@@ -454,7 +455,7 @@ components: | |
ToolDependencies: | ||
description: A list of tool dependencies | ||
example: | ||
toolDependencies: | ||
tools: | ||
- name: awesome-nlp-tool | ||
version: 1.0.6 | ||
license: apache-2.0 | ||
|
@@ -464,7 +465,7 @@ components: | |
authorEmail: [email protected] | ||
url: https://example.com | ||
type: nlpsandbox:date-annotator | ||
apiVersion: 1.0.2 | ||
apiVersion: 1.1.0 | ||
- name: awesome-nlp-tool | ||
version: 1.0.6 | ||
license: apache-2.0 | ||
|
@@ -474,13 +475,13 @@ components: | |
authorEmail: [email protected] | ||
url: https://example.com | ||
type: nlpsandbox:date-annotator | ||
apiVersion: 1.0.2 | ||
apiVersion: 1.1.0 | ||
properties: | ||
toolDependencies: | ||
tools: | ||
description: A list of tools | ||
items: | ||
$ref: '#/components/schemas/Tool' | ||
type: array | ||
required: | ||
- toolDependencies | ||
- tools | ||
type: object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import logging | ||
|
||
import connexion | ||
from flask_testing import TestCase | ||
|
||
from openapi_server.encoder import JSONEncoder | ||
|
||
|
||
class BaseTestCase(TestCase): | ||
|
||
def create_app(self): | ||
logging.getLogger('connexion.operation').setLevel('ERROR') | ||
app = connexion.App(__name__, specification_dir='../openapi/') | ||
app.app.json_encoder = JSONEncoder | ||
app.add_api('openapi.yaml', pythonic_params=True) | ||
return app.app |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters