You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains GitHub-related files that help project management and the release process of CLAMS apps.
3
+
To use these workflows, your app must be part of `clamsproject` organization.
4
+
To create a new repository under the `clamsproject` organization, here's some naming convention to follow.
5
+
6
+
* App repositories in the `clamsproject` organization should be prefixed with `app-` (e.g., `app-myapp`).
7
+
* An app that wraps an extant tool or application should be suffixed with `-wrapper` (e.g., `app-their-app-wrapper`).
8
+
*`LICENSE` file should always contain licensing information of the terminal code. If the app is a wrapper, an additional file containing licensing information of the underlying tool must be placed next to the `LICENSE` file when the original license requires so.
9
+
10
+
(Your "app name" that you used in `clams develop` to create this scaffolding doesn't have to match the repository name.)
11
+
12
+
In the `workflows` directory, you'll find;
13
+
14
+
*`issue-apps-project.yml`: this workflow will add all new issues and PRs to our [`apps` project board](https://github.com/orgs/clamsproject/projects/12).
15
+
*`issue-assign.yml`: this workflow will assign an issue to the person who created a branch for the issue. A branch is for an issue when its name starts with the `issueNum-` prefix. (e.g., `3-fix` branch is for issue number 3)
16
+
*`issue-close.yml`: this workflow will remove all assignee from closed/merged issues and PRs.
17
+
*`publish.yml`: this workflow is the main driver for the app release process. A release process is set to be triggered by **any** tag push. To change the trigger edit `on:` part of the file. To change the trigger edit `on.push.tags` part of the file. ([reference](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-only-when-a-push-of-specific-tags-occurs)).
18
+
* The workflow will
19
+
1. build a container image for the app and push it to [the `clamsproject` ghcr](https://github.com/orgs/clamsproject/packages).
20
+
2. generate app directory entry files and create a PR to [the app directory repository](https://github.com/clamsproject/apps) for registration.
21
+
***NOTE**: Throughout the entire release process, the git tag that triggered the workflow will be used as the version of the app.
General user instructions for CLAMS apps is available at [CLAMS Apps documentation](https://apps.clams.ai/clamsapp).
3
+
The spaCy NLP tool wrapped as a CLAMS service, spaCy is distributed under the [MIT license](https://github.com/explosion/spaCy/blob/master/LICENSE).
4
4
5
+
This requires Python 3.8 or higher. For local install of required Python modules see [requirements.txt](requirements.txt).
6
+
7
+
## Using this service
8
+
9
+
Use `python app.py -t example-mmif.json out.json` just to test the wrapping code without using a server. To test this using a server you run the app as a service in one terminal:
10
+
11
+
```bash
12
+
$ python app.py
13
+
```
14
+
15
+
And poke at it from another:
16
+
17
+
```bash
18
+
$ curl http://0.0.0.0:5000/
19
+
$ curl -H "Accept: application/json" -X POST [email protected] http://0.0.0.0:5000/
20
+
```
21
+
22
+
In CLAMS you usually run this in a container. To create an image
$ docker run --rm -d -p 5000:5000 clams-spacy-wrapper
32
+
$ curl -H "Accept: application/json" -X POST [email protected] http://0.0.0.0:5000/
33
+
```
34
+
35
+
The spaCy code will run on each text document in the input MMIF file. The file `example-mmif.json` has one text document in the top level `documents` property and two text documents in one of the views. The text documents all look as follows:
"@value": "Hello, this is Jim Lehrer with the NewsHour on PBS...."
44
+
}
45
+
}
46
+
}
47
+
```
48
+
Instead of a `text:@value` property the text could in an external file, which would be given as a URI in the `location` property. See the readme file in [https://github.com/clamsproject/app-nlp-example](https://github.com/clamsproject/app-nlp-example) on how to do this.
0 commit comments