Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme #25

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 34 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ a Docker image of this tool to Synapse Docker Registry. This image of this
example tool can be submitted as-is on [NLPSandbox.io] to benchmark its
performance -- just don't expect a high performance!

## Contents
## Table of contents

- [Specification](#Specification)
- [Requirements](#Requirements)
Expand All @@ -46,6 +46,7 @@ performance -- just don't expect a high performance!
- [Enabling version updates](#Enabling-version-updates)
- [Generating a new NLP Sandbox tool using
openapi-generator](#Generating-a-new-NLP-Sandbox-tool-using-openapi-generator)
- [Install the development dependencies](#Install-the-development-dependencies)
- [Keeping your tool up-to-date](#Keeping-your-tool-up-to-date)
- [Testing](#Testing)
- [Preventing an NLP Sandbox tool from connecting to remote
Expand All @@ -59,27 +60,35 @@ performance -- just don't expect a high performance!

## Specification

- Tool version: 1.2.1
- NLP Sandbox schemas version: 1.2.0
- NLP Sandbox tool version: 1.2.1
- Docker image: [docker.synapse.org/syn22277123/phi-annotator-example]


## Requirements

- [Docker Engine] >=19.03.0


## Usage

### Running with Docker

The command below starts this NLP Sandbox PHI annotator locally.
To download the tool image published and run it.

```console
docker compose pull
docker compose up
```

Alternatively, you can build the image and run it.

```console
docker compose up --build
```

You can stop the container run with `Ctrl+C`, followed by `docker compose down`.
Add the option `-d` or `--detach` to start the container in detached mode. If
`docker compose` in not available on your system, please install [docker
compose].

### Running with Python

Expand All @@ -93,21 +102,16 @@ conda activate phi-annotator
Install and start this NLP Sandbox PHI annotator.

```console
cd server && pip install -r requirements.txt
cd server
pip install -r requirements.txt
python -m openapi_server
```

### Accessing this NLP Sandbox tool User Interface

This NLP Sandbox tool provides a web interface that you can use to annotate
clinical notes. This web client has been automatically generated by
[openapi-generator]. To access the UI, open a new tab in your browser and
navigate to one of the following address depending on whether you are running
the tool using Docker (production) or Python (development).

- Using Docker: http://localhost/ui
- Using Python: http://localhost:8080/ui

clinical notes. To access the UI, open your browser and navigate to
http://localhost:8080/ui.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a sentence here to tell people that they can update the port by changing the docker_compose.yml file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!


## Development

Expand Down Expand Up @@ -207,6 +211,21 @@ The URL is composed of different elements:
can be replaced by a specific release version `x.y.z` of the [NLP Sandbox
schemas].

### Install the development dependencies

Install the Node.js dependencies required to run `npm run <script>`.

```console
npm ci
```

Install the Python dependencies required for tasks like linting and testing.

```console
cd server
pip install -r dev-requirements.txt -r test-requirements.txt
```

### Keeping your tool up-to-date

The NLP Sandbox schemas is updated after receiving contribution from the
Expand Down Expand Up @@ -284,7 +303,6 @@ that it works fine while it does not have access to the internet. Note that when
being evaluated on [NLPSandbox.io], additional measures are put in place to
prevent tools from connecting to remote servers.


## Versioning

### GitHub release tags
Expand Down Expand Up @@ -354,3 +372,4 @@ Thinking about contributing to this project? Get started by reading our
[Patient schema]: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/main/openapi/commons/components/schemas/Patient.yaml
[semantic versioning]: https://semver.org/
[NLP Sandbox schemas CHANGELOG]: .github/CHANGELOG.md
[docker compose]: https://docs.docker.com/compose/install/
1 change: 1 addition & 0 deletions server/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flake8==4.0.1