From c980cbe3c34f5aa4a89269663f1607038c9f20cb Mon Sep 17 00:00:00 2001 From: tschaffter Date: Mon, 30 Nov 2020 11:05:40 -0800 Subject: [PATCH] Bump project to version 0.2.3 --- README.md | 3 ++- package.json | 2 +- server/openapi_server/__main__.py | 5 ++++- server/openapi_server/controllers/service_controller.py | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cd1a5b2..7dd4352 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # NLP Sandbox Person Name Annotator Example -[![Docker Pulls](https://img.shields.io/docker/pulls/nlpsandbox/person-name-annotator-example.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/nlpsandbox/person-name-annotator-example) [![GitHub Release](https://img.shields.io/github/release/nlpsandbox/person-name-annotator-example.svg?include_prereleases&color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/person-name-annotator-example/releases) [![GitHub CI](https://img.shields.io/github/workflow/status/nlpsandbox/person-name-annotator-example/ci.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/person-name-annotator-example) [![GitHub License](https://img.shields.io/github/license/nlpsandbox/person-name-annotator-example.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/person-name-annotator-example) +[![Docker Pulls](https://img.shields.io/docker/pulls/nlpsandbox/person-name-annotator-example.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/nlpsandbox/person-name-annotator-example) +[![Discord](https://img.shields.io/discord/770484164393828373.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://discord.gg/Zb4ymtF "Realtime support / chat with the community and the team") An example implementation of the [NLP Sandbox Person Name Annotator]. diff --git a/package.json b/package.json index bcb3d9e..3b83427 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "person-name-annotator-example", - "version": "0.2.2", + "version": "0.2.3", "license": "Apache-2.0", "devDependencies": { "@openapitools/openapi-generator-cli": "^1.0.18-4.3.1" diff --git a/server/openapi_server/__main__.py b/server/openapi_server/__main__.py index 22b70c2..0782be3 100644 --- a/server/openapi_server/__main__.py +++ b/server/openapi_server/__main__.py @@ -1,15 +1,18 @@ #!/usr/bin/env python3 import connexion +import flask from openapi_server import encoder app = connexion.App(__name__, specification_dir='./openapi/') app.app.json_encoder = encoder.JSONEncoder app.add_api('openapi.yaml', - arguments={'title': 'NLP Sandbox Person Name Annotator API'}, pythonic_params=True) +# Configuring / to return the service information (required by NLP Sandbox) +app.add_url_rule('/', 'root', lambda: flask.redirect('/api/v1/service')) + def main(): app.run(port=8080) diff --git a/server/openapi_server/controllers/service_controller.py b/server/openapi_server/controllers/service_controller.py index e4d9f3b..84e43fc 100644 --- a/server/openapi_server/controllers/service_controller.py +++ b/server/openapi_server/controllers/service_controller.py @@ -11,7 +11,7 @@ def service(): # noqa: E501 """ service = Service( name="person-name-annotator-example", - version="0.2.1", + version="0.2.3", license="Apache-2.0", repository="github:nlpsandbox/person-name-annotator-example", description="An example implementation of the NLP Sandbox " +