Skip to content

Commit

Permalink
Merge pull request #172 from nlpsandbox/release-1.0.0-v2
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
tschaffter authored Feb 14, 2021
2 parents 8598d98 + c7a4b49 commit b1d21ce
Show file tree
Hide file tree
Showing 18 changed files with 316 additions and 79 deletions.
77 changes: 77 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and
expression, level of experience, education, socio-economic status, nationality,
personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening,
offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the contacting the project lead or Sage Privacy Officer
([email protected]). The project team will review and investigate all
complaints, and will respond in a way that it deems appropriate to the
circumstances. The project team is obligated to maintain confidentiality with
regard to the reporter of an incident. Further details of specific enforcement
policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

<!-- Links -->

[homepage]: https://www.contributor-covenant.org
144 changes: 144 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
## Contributing

A big welcome and thank you for considering contributing to this project.

This project is a community effort and lives off your contributions, be it in
the form of bug reports, feature requests, discussions, or fixes and other
code changes.

Reading and following these guidelines will help us make the contribution
process easy and effective for everyone involved. It also communicates that you
agree to respect the time of the developers managing and developing these open
source projects. In return, we will reciprocate that respect by addressing your
issue, assessing changes, and helping you finalize your pull requests.

## Quicklinks

- [Code of Conduct](#code-of-conduct)
- [Getting Started](#getting-started)
- [Issues](#issues)
- [Pull Requests](#pull-requests)
- [Setup Development Environment](#setup-development-environment)
- [HTML Preview](#html-preview)
- [Testing](#testing)
- [Release Procedure](#release-procedure)
- [Getting Help](#getting-help)

## Code of Conduct

We take our open source community seriously and hold ourselves and other
contributors to high standards of communication. By participating and
contributing to this project, you agree to uphold our [Code of Conduct].

## Getting Started

Contributions are made to this repo via Issues and Pull Requests (PRs). A few
general guidelines that cover both:

- Search for existing Issues and PRs before creating your own.
- We work hard to makes sure issues are handled in a timely manner but,
depending on the impact, it could take a while to investigate the root cause.
A friendly ping in the comment thread to the submitter or a contributor can
help draw attention if your issue is blocking.

### Issues

Issues should be used to report problems with this project, request a new
feature, or to discuss potential changes before a PR is created. When you
create a new Issue, a template will be loaded that will guide you through
collecting and providing the information we need to investigate.

If you find an Issue that addresses the problem you're having, please add your
own reproduction information to the existing issue rather than creating a new
one. Adding a [reaction] can also help be indicating to our maintainers that a
particular problem is affecting more than just the reporter.

### Pull Requests

PRs to our repositories are always welcome and can be a quick way to get your
fix or improvement slated for the next release. In general, PRs should:

- Only fix/add the functionality in question **OR** address wide-spread
whitespace/style issues, not both.
- Add unit or integration tests for fixed or changed functionality
(if a test suite already exists).
- Address a single concern in the least number of changed lines as possible.
- Include documentation in the repo or on our [docs site].
- Be accompanied by a complete Pull Request template (loaded automatically
when a PR is created).

For changes that address core functionality or would require breaking changes
(e.g. a major release), it's best to open an Issue to discuss your proposal
first. This is not required but can save time creating and reviewing changes.

In general, we follow the [Forking Workflow]:

1. Fork the repository to your own Github account
2. Clone the project to your machine
3. Create a branch locally with a succinct but descriptive name
4. Commit changes to the branch
5. Following any formatting and testing guidelines specific to this repo
6. Push changes to your fork
7. Open a PR in our repository and follow the PR template so that we can
efficiently review the changes.

We recommend that you add this repository as an [upstream remote] to your local
git repository so that you can fetch the latest updates.

On your local machine make sure you have the latest version of the `develop`
branch from this upstream repository:

git checkout develop
git pull upstream develop

### Setup Development Environment

This project relies on Node tools and project-specific commands defined in
[package.json] to streamline the development and testing. The command below will
install the required development tools.

npm ci

### HTML Preview

The command below builds and serves a preview of the HTML documentation of one
of the APIs defined in this repository:

npm run start --api=<name>

where `<name>` is the name of one of the API folders included in
[openapi/](openapi/) for which you want to see the HTML documentation. The HTML
page will be available at http://localhost:8080.

### Testing

Before submitting a PR, please check that the content of the branch that you
plan to submit passes with the tests defined for this project:

npm run lint:all
npm run validate --api=<name>

where `<name>` is the name of the API folder in [openapi/](openapi/) that you
want to test.

## Release Procedure

Maintainers are required to follow the procedure below when creating a new
release.

TBA

## Getting Help

Join us on the [NLP Sandbox Discord server] and post your question to the
channel that best matches the topic of your request.

<!-- Links -->

[Code of Conduct]: https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md
[upstream remote]: https://help.github.com/en/articles/configuring-a-remote-for-a-fork
[reaction]: https://github.blog/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/
[docs site]: https://github.com/nlpsandbox/nlpsandbox-website-synapse
[Forking Workflow]: https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow
[package.json]: package.json
[NLP Sandbox Discord server]: https://discord.gg/Zb4ymtF
100 changes: 52 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,71 +5,75 @@
[![GitHub License](https://img.shields.io/github/license/nlpsandbox/nlpsandbox-schemas.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/nlpsandbox-schemas)
[![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")

## OpenAPI specifications
OpenAPI specifications of the NLP Sandbox services

List of APIs defined by the NLP Sandbox sorted by type and name in alphabetic
order.
## Overview

| API | Type | Version |
|---|---|---|
| [Data Node](/openapi/data-node) | | 1.0.0 |
| [Date Annotator](/openapi/date-annotator) | `nlpsandbox:date-annotator` | 1.0.0 |
| [Person Name Annotator](/openapi/person-name-annotator) | `nlpsandbox:person-name-annotator` | 1.0.0 |
| [Physical Address Annotator](/openapi/physical-address-annotator) | `nlpsandbox:physical-address-annotator` | 1.0.0 |
| [PHI Deidentifier](/openapi/phi-deidentifier) | `nlpsandbox:phi-deidentifier` | 1.0.0 |
This repository contains the OpenAPI specifications of the NLP tools and
services defined by the NLP Sandbox. The NLP Tools that implement these
specifications can have their performance benchmark on [nlpsandbox.io].

## Web services
## NLP Tools

You can find below example implementations of the APIs defined by the NLP Sandbox.
The OpenAPI specifications of the NLP Tools defined by the NLP Sandbox (and
counting) are listed below. The OpenAPI specification available in JSON and YAML
formats can be used to generate an NLP Tool "stub" using the [OpenAPI
Generator]. For more information on how to develop an NLP Tool, please refer to
the examples listed below. For more information on how to benchmark the
performance of your tool, please visit [nlpsandbox.io].

| GitHub repository | API |
|---|---|
| [nlpsandbox/data-node](https://github.com/nlpsandbox/data-node) | Data Node |
| [nlpsandbox/date-annotator-example](https://github.com/nlpsandbox/date-annotator-example) | Date Annotator |
| [nlpsandbox/person-name-annotator-example](https://github.com/nlpsandbox/person-name-annotator-example) | Person Name Annotator |
| [nlpsandbox/physical-address-annotator-example](https://github.com/nlpsandbox/physical-address-annotator-example) | Physical Address Annotator |
| [nlpsandbox/phi-deidentifier](https://github.com/nlpsandbox/phi-deidentifier) | PHI Deidentifier |
API Name | Type | Version
-----------------------------|-----------------------------------------|---
[Date Annotator] | `nlpsandbox:date-annotator` | 1.0.0
[Person Name Annotator] | `nlpsandbox:person-name-annotator` | 1.0.0
[Physical Address Annotator] | `nlpsandbox:physical-address-annotator` | 1.0.0
[PHI Deidentifier] | `nlpsandbox:phi-deidentifier` | 1.0.0

## Development
## Examples

### Install
These repositories provide the source code of examples for each NLP Tools
defined by the NLP Sandbox. These repositories have a CI/CD workflow that
automatically tests the tool, and build and publish a Docker image that can then
be submitted as-is to the [nlpsandbox.io], if you wish to benchmark its
performance -- just don't expect a high performance!

1. Install [Node JS](https://nodejs.org/).
2. Clone this repo and run `npm install` in the repo root.
GitHub repository | Language
------------------------------------------------|----------
[nlpsandbox/date-annotator-example] | Python
[nlpsandbox/date-annotator-example-java] | Java
[nlpsandbox/person-name-annotator-example] | Python
[nlpsandbox/physical-address-annotator-example] | Python
[nlpsandbox/phi-deidentifier] | Python

### Usage
## Docker images

Lint one OpenAPI specification, for example
You can pull the images published by the NLP Sandbox from [Docker Hub].

npm run lint:ibm --entrypoint=openapi/date-annotator/openapi.yaml
npm run lint:ibm --entrypoint=openapi/person-name-annotator/openapi.yaml
npm run lint:ibm --entrypoint=openapi/physical-address-annotator/openapi.yaml
npm run lint:ibm --entrypoint=openapi/data-node/openapi.yaml
npm run lint:ibm --entrypoint=openapi/phi-deidentifier/openapi.yaml
## Contributing

Build a bundled API file for one of the specifications:
Thinking about contributing to this project? Get started by reading our
[Contributor Guide](CONTRIBUTING.md).

npm run build openapi/date-annotator/openapi.yaml
npm run build openapi/person-name-annotator/openapi.yaml
npm run build openapi/physical-address-annotator/openapi.yaml
npm run build openapi/data-node/openapi.yaml
npm run build openapi/phi-deidentifier/openapi.yaml
## License

You can then preview the OpenAPI docs in your browser: http://localhost:8080
[Apache License 2.0]

## Contribution guidelines
<!-- Links -->

TBA
[nlpsandbox.io]: https://nlpsandbox.io
[Date Annotator]: https://nlpsandbox.github.io/nlpsandbox-schemas/date-annotator/latest/docs/
[Person Name Annotator]: https://nlpsandbox.github.io/nlpsandbox-schemas/person-name-annotator/latest/docs/
[Physical Address Annotator]: https://nlpsandbox.github.io/nlpsandbox-schemas/physical-address-annotator/latest/docs/
[PHI Deidentifier]: https://nlpsandbox.github.io/nlpsandbox-schemas/phi-deidentifier/latest/docs/

- List paths in alphanumerical order
- Add schemas and paths used in more than one API to `commons`
[OpenAPI Generator]: https://github.com/OpenAPITools/openapi-generator

## TODO
[nlpsandbox/date-annotator-example]: https://github.com/nlpsandbox/date-annotator-example
[nlpsandbox/date-annotator-example-java]: https://github.com/nlpsandbox/date-annotator-example-java
[nlpsandbox/person-name-annotator-example]: https://github.com/nlpsandbox/person-name-annotator-example
[nlpsandbox/physical-address-annotator-example]: https://github.com/nlpsandbox/physical-address-annotator-example
[nlpsandbox/phi-deidentifier]: https://github.com/nlpsandbox/phi-deidentifier

> "description": "Creates a new Annotation record. It is valid to create Annotation objects for the same source more than once since a unique ID is assigned to each record by this service.",
[Docker Hub]: https://hub.docker.com/u/nlpsandbox

<!-- Definitions -->

[data_node_yaml]: https://nlpsandbox.github.io//nlpsandbox-schemas/data-node/develop/openapi.yaml
[data_node_json]: https://nlpsandbox.github.io//nlpsandbox-schemas/data-node/develop/openapi.json
[data_node_html]: https://nlpsandbox.github.io//nlpsandbox-schemas/data-node/develop/docs/index.html
[Apache License 2.0]: https://github.com/nlpsandbox/date-annotator-example/blob/develop/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ properties:
type: string
format: uri
totalResults:
description: Total number of results in the result set
description: The total number of results in the result set
type: integer
required:
- links
Expand Down
16 changes: 8 additions & 8 deletions openapi/data-node/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ info:
url: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/develop/LICENSE
x-logo:
url: https://nlpsandbox.github.io/nlpsandbox-schemas/logo.png
description: >
description: |
# Overview
The NLP Sandbox Data Node is a repository of data used to benchmark NLP
Tools like the NLP Sandbox Date Annotator and Person Name Annotator. The
resources that can be stored in this Data Node and the operations supported
are listed below:
Tools like the NLP Sandbox Date Annotator and Person Name Annotator.
- Create and manage datasets
- Create and manage FHIR stores
- Store and retrieve FHIR patient profiles
- Store and retrieve clinical notes
The resources that can be stored in this Data Node and the operations
supported are listed below:
- Create and manage datasets - Create and manage FHIR stores
- Store and retrieve FHIR patient profiles - Store and retrieve clinical
notes
- Create and manage annotation stores
- Store and retrieve text annotations
tags:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
type: object
description: An annotation request
description: A request to annotate dates in a clinical note
properties:
note:
$ref: ../../../commons/components/schemas/Note.yaml
Expand Down
Loading

0 comments on commit b1d21ce

Please sign in to comment.