Skip to content

Commit 8129be9

Browse files
authored
Prepare release 1.1.0 (#33)
* Bump tool version to 1.1.0 * Replace daily build by weekly build * Set workflow to run every Thu instead of daily * Set workflow to run every Thu instead of daily * Add release-it config and doc
1 parent b6f324d commit 8129be9

File tree

8 files changed

+60
-49
lines changed

8 files changed

+60
-49
lines changed

.github/CONTRIBUTING.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,29 @@ plan to submit passes with the tests defined for this project:
115115
## Release Procedure
116116

117117
Maintainers are required to follow the procedure below when creating a new
118-
release.
119-
120-
TBA
118+
release. Releases are created with the npm package [release-it].
119+
120+
1. [Identify whether the release is a major, minor or patch release.]
121+
2. Bump the project version in the files listed below but not in `package.json`
122+
(updated automatically by `release-it`).
123+
- `README.md`
124+
- `docker-compose.yml`
125+
- `server/openapi_server/controllers/tool_controller.py`
126+
3. Obtain a [personal access token] (release-it only needs "repo" access; no
127+
"admin" or other scopes).
128+
4. Make sure the token is [available as an environment variable].
129+
5. Preview the release information using one of the commands listed below. These
130+
commands will not modify any local or remote files.
131+
- `npm run release -- major --ci --no-npm --dry-run`
132+
- `npm run release -- minor --ci --no-npm --dry-run`
133+
- `npm run release -- patch --ci --no-npm --dry-run`
134+
6. Create the release using one of the commands listed below.
135+
- `npm run release -- major --ci --no-npm`
136+
- `npm run release -- minor --ci --no-npm`
137+
- `npm run release -- patch --ci --no-npm`
138+
7. Check that the release has been successfully created on GitHub along with any
139+
release artifacts that may have been created (GitHub Pages, Docker image
140+
pushed to Docker registry, Python package published to PyPi, etc.).
121141

122142
## Getting Help
123143

@@ -133,3 +153,7 @@ channel that best matches the topic of your request.
133153
[Forking Workflow]: https://www.atlassian.com/git/tutorials/comparing-workflows/forking-workflow
134154
[package.json]: ../package.json
135155
[NLP Sandbox Discord server]: https://nlpsandbox.io/discord
156+
[release-it]: https://github.com/release-it/release-it
157+
[Identify whether the release is a major, minor or patch release.]: https://semver.org/#summary
158+
[personal access token]: https://github.com/settings/tokens/new?scopes=repo&description=release-it
159+
[available as an environment variable]: https://github.com/release-it/release-it/blob/master/docs/environment-variables.md

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
schedule:
5-
- cron: '0 10 * * *' # everyday at 10am
5+
- cron: '0 10 * * THU' # every Sunday at 10am
66
push:
77
branches:
88
- main

.github/workflows/lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Lock threads
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *'
5+
- cron: '0 0 * * THU'
66

77
jobs:
88
lock:

.github/workflows/update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Update to latest NLP Sandbox version
22

33
on:
44
schedule:
5-
- cron: '0 10 * * *' # everyday at 10am
5+
- cron: '0 10 * * THU' # everyday at 10am
66

77
jobs:
88
check-and-update:

.release-it.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"git": {
3+
"commitMessage": "Release ${version}",
4+
"tagAnnotation": "${version}"
5+
},
6+
"npm": {
7+
"publish": false
8+
},
9+
"github": {
10+
"release": true,
11+
"releaseName": "${version}"
12+
}
13+
}

README.md

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[![nlpsandbox.io](https://nlpsandbox.github.io/nlpsandbox-themes/banner/Banner@3x.png)](https://nlpsandbox.io)
22

3-
# NLP Sandbox PHI Annotator Example
3+
# Hugging Face-based NLP Sandbox PHI Annotators
44

5-
[![GitHub Release](https://img.shields.io/github/release/nlpsandbox/phi-annotator-huggingface-bert.svg?include_prereleases&color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/phi-annotator-huggingface-bert/releases)
6-
[![GitHub CI](https://img.shields.io/github/workflow/status/nlpsandbox/phi-annotator-huggingface-bert/CI.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/phi-annotator-huggingface-bert/actions)
7-
[![GitHub License](https://img.shields.io/github/license/nlpsandbox/phi-annotator-huggingface-bert.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/phi-annotator-huggingface-bert/blob/main/LICENSE)
8-
[![Docker](https://img.shields.io/badge/docker-blue.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=nlpsandbox&logo=data:image/svg%2bxml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMy4yIDcuOS0xLjctMXYxMS40bDkuOSA1LjdWMTIuNkw1LjYgOS4zIDMuMiA3Ljl6bTE3LjEtMS4zIDEuNS0uOUwxMiAwIDIuMiA1LjdsMi42IDEuNS4xLjEgMS43IDEgNS41IDMuMiA1LjEtMyAzLjEtMS45ek0xMiA5LjUgOS4zIDcuOSA3LjQgNi44bC0xLjctMS0uMS0uMWgtLjFMMTIgMS45bDYuNSAzLjhMMTYuMyA3IDEyIDkuNXptOC44LTEuNi0yLjQgMS40LS41LjItNS4zIDMuMVYyNGw5LjktNS43VjYuOWwtMS43IDF6IiBmaWxsPSIjZmZmIi8+PC9zdmc+)](https://www.synapse.org/#!Synapse:syn25892628 "Get the Docker image of this tool on NLPSandbox.io")
5+
[![GitHub Release](https://img.shields.io/github/release/nlpsandbox/phi-annotator-huggingface.svg?include_prereleases&color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/phi-annotator-huggingface/releases)
6+
[![GitHub CI](https://img.shields.io/github/workflow/status/nlpsandbox/phi-annotator-huggingface/CI.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/phi-annotator-huggingface/actions)
7+
[![GitHub License](https://img.shields.io/github/license/nlpsandbox/phi-annotator-huggingface.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/nlpsandbox/phi-annotator-huggingface/blob/main/LICENSE)
8+
[![Docker](https://img.shields.io/badge/docker-blue.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=nlpsandbox&logo=data:image/svg%2bxml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMy4yIDcuOS0xLjctMXYxMS40bDkuOSA1LjdWMTIuNkw1LjYgOS4zIDMuMiA3Ljl6bTE3LjEtMS4zIDEuNS0uOUwxMiAwIDIuMiA1LjdsMi42IDEuNS4xLjEgMS43IDEgNS41IDMuMiA1LjEtMyAzLjEtMS45ek0xMiA5LjUgOS4zIDcuOSA3LjQgNi44bC0xLjctMS0uMS0uMWgtLjFMMTIgMS45bDYuNSAzLjhMMTYuMyA3IDEyIDkuNXptOC44LTEuNi0yLjQgMS40LS41LjItNS4zIDMuMVYyNGw5LjktNS43VjYuOWwtMS43IDF6IiBmaWxsPSIjZmZmIi8+PC9zdmc+)](https://www.synapse.org/#!Synapse:syn22277123/docker/ "Get the Docker image of this tool on NLPSandbox.io")
99
[![Leaderboard](https://img.shields.io/badge/leaderboard-blue.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=nlpsandbox&logo=data:image/svg%2bxml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMy4yIDcuOS0xLjctMXYxMS40bDkuOSA1LjdWMTIuNkw1LjYgOS4zIDMuMiA3Ljl6bTE3LjEtMS4zIDEuNS0uOUwxMiAwIDIuMiA1LjdsMi42IDEuNS4xLjEgMS43IDEgNS41IDMuMiA1LjEtMyAzLjEtMS45ek0xMiA5LjUgOS4zIDcuOSA3LjQgNi44bC0xLjctMS0uMS0uMWgtLjFMMTIgMS45bDYuNSAzLjhMMTYuMyA3IDEyIDkuNXptOC44LTEuNi0yLjQgMS40LS41LjItNS4zIDMuMVYyNGw5LjktNS43VjYuOWwtMS43IDF6IiBmaWxsPSIjZmZmIi8+PC9zdmc+)](https://www.synapse.org/#!Synapse:syn22277123/wiki/608544 "View the performance of this tool on NLPSandbox.io")
1010
[![Discord](https://img.shields.io/discord/770484164393828373.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://nlpsandbox.io/discord "Realtime support / chat with the community and the team")
1111

@@ -30,7 +30,6 @@ ID | [TextIdAnnotation] | No
3030
Location | [TextLocationAnnotation] | Yes
3131
Person Name | [TextPersonNameAnnotation] | Yes
3232

33-
3433
## Contents
3534

3635
- [Specification](#Specification)
@@ -50,17 +49,17 @@ Person Name | [TextPersonNameAnnotation] | Yes
5049

5150
## Specification
5251

53-
- This NLP Sandbox tool version: TBA
5452
- NLP Sandbox schemas version: 1.2.0
55-
- NLP Sandbox tool version: 1.2.1
56-
- Docker image: [docker.synapse.org/syn22277123/phi-annotator-huggingface-XXX]
57-
53+
- Tool version: 1.1.0
54+
- Tool images:
55+
- [docker.synapse.org/syn22277123/phi-annotator-huggingface-bert-base-ner]
56+
- [docker.synapse.org/syn22277123/phi-annotator-huggingface-bert-base-ner-uncased]
57+
- [docker.synapse.org/syn22277123/phi-annotator-huggingface-bert-large-ner]
5858

5959
## Requirements
6060

6161
- [Docker Engine] >=19.03.0
6262

63-
6463
## Usage
6564

6665
### Running with Docker
@@ -104,14 +103,12 @@ the tool using Docker (production) or Python (development).
104103
- Using Docker: http://localhost/ui
105104
- Using Python: http://localhost:8080/ui
106105

107-
108106
## Development
109107

110108
Please refer to the section `Development` of the [NLP Sandbox PHI Annotator
111109
example] for information on how to develop an NLP Sandbox PHI annotator in
112110
Python-Flask and other programming languages-frameworks.
113111

114-
115112
## Versioning
116113

117114
### GitHub release tags
@@ -137,32 +134,6 @@ You should avoid using a moving tag like `latest` when deploying containers in
137134
production, because this makes it hard to track which version of the image is
138135
running and hard to roll back.
139136

140-
## Versioning
141-
142-
### GitHub release tags
143-
144-
This repository uses [semantic versioning] to track the releases of this tool.
145-
This repository uses "non-moving" GitHub tags, that is, a tag will always point
146-
to the same git commit once it has been created.
147-
148-
### Docker image tags
149-
150-
The artifact published by the [CI/CD workflow] of this GitHub repository is a
151-
Docker image pushed to the Synapse Docker Registry. This table lists the image
152-
tags pushed to the registry.
153-
154-
| Tag name | Moving | Description
155-
|-----------------------------|--------|------------
156-
| `latest` | Yes | Latest stable release.
157-
| `edge` | Yes | Latest commit made to the default branch.
158-
| `edge-<sha>` | No | Same as above with the reference to the git commit.
159-
| `<major>.<minor>.<patch>` | No | Stable release.
160-
161-
You should avoid using a moving tag like `latest` when deploying containers in
162-
production, because this makes it hard to track which version of the image is
163-
running and hard to roll back.
164-
165-
166137
## Benchmarking on NLPSandbox&#46;io
167138

168139
Visit [nlpsandbox.io] for instructions on how to submit your NLP Sandbox tool
@@ -190,7 +161,7 @@ Thinking about contributing to this project? Get started by reading our
190161
[Synapse.org]: https://synapse.org
191162
[openapi-generator]: https://github.com/OpenAPITools/openapi-generator
192163
[contribution guide]: .github/CONTRIBUTING.md
193-
[Apache License 2.0]: https://github.com/nlpsandbox/phi-annotator-huggingface-bert/blob/main/LICENSE
164+
[Apache License 2.0]: https://github.com/nlpsandbox/phi-annotator-huggingface/blob/main/LICENSE
194165
[Docker Engine]: https://docs.docker.com/engine/install/
195166
[CI/CD workflow]: .github/workflows/ci.yml
196167
[semantic versioning]: https://semver.org/
@@ -205,3 +176,6 @@ Thinking about contributing to this project? Get started by reading our
205176
[TextIdAnnotation]: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/main/openapi/commons/components/schemas/TextIdAnnotation.yaml
206177
[TextLocationAnnotation]: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/main/openapi/commons/components/schemas/TextLocationAnnotation.yaml
207178
[TextPersonNameAnnotation]: https://github.com/nlpsandbox/nlpsandbox-schemas/blob/main/openapi/commons/components/schemas/TextPersonNameAnnotation.yaml
179+
[docker.synapse.org/syn22277123/phi-annotator-huggingface-bert-base-ner]: https://www.synapse.org/#!Synapse:syn26276938
180+
[docker.synapse.org/syn22277123/phi-annotator-huggingface-bert-base-ner-uncased]: https://www.synapse.org/#!Synapse:syn26276939
181+
[docker.synapse.org/syn22277123/phi-annotator-huggingface-bert-large-ner]: https://www.synapse.org/#!Synapse:syn26276940

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: "3.8"
22

33
services:
44
phi-annotator:
5-
image: docker.synapse.org/syn22277123/phi-annotator-huggingface
5+
image: docker.synapse.org/syn22277123/phi-annotator-huggingface:1.1.0
66
build:
77
context: server
88
args:

server/openapi_server/controllers/tool_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ def get_tool(): # noqa: E501
1515
"""
1616
tool = Tool(
1717
name=f"phi-annotator-huggingface-{config.config_name}",
18-
version="1.0.0",
18+
version="1.1.0",
1919
license=License.APACHE_2_0,
2020
repository="github:nlpsandbox/phi-annotator-huggingface",
21-
description=f"Hugging Face PHI annotator ({config.model_name})",
21+
description=f"Hugging Face-based PHI annotator ({config.model_name})",
2222
author="NLP Sandbox Team",
2323
author_email="team@nlpsandbox.io",
2424
url="https://github.com/nlpsandbox/phi-annotator-huggingface",

0 commit comments

Comments
 (0)