Skip to content

Commit 9bedc0a

Browse files
committed
minor update to meet clams 0.6.2, preparing re-release of v1
1 parent 1ea45ea commit 9bedc0a

File tree

5 files changed

+57
-47
lines changed

5 files changed

+57
-47
lines changed

.github/workflows/container.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "App Publisher: image>ghcr, metadata>appdir"
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
required: true
8+
type: string
9+
description: 'git tag to use to build an app image'
10+
push:
11+
tags:
12+
- '*'
13+
14+
jobs:
15+
set-version:
16+
runs-on: ubuntu-latest
17+
name: 📌 Set VERSION value
18+
outputs:
19+
version: ${{ steps.output_version.outputs.version }}
20+
steps:
21+
- name: set VERSION value from dispatch inputs
22+
id: get_version_dispatch
23+
if: ${{ github.event_name == 'workflow_dispatch' }}
24+
run: echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
25+
- name: set VERSION value from pushed tag
26+
id: get_version_tag
27+
if: ${{ github.event_name == 'push' }}
28+
run: echo "VERSION=$(echo "${{ github.ref }}" | cut -d/ -f3)" >> $GITHUB_ENV
29+
- name: output result into an env-var
30+
id: output_version
31+
run: |
32+
echo "version=${{ env.VERSION }}" >> $GITHUB_OUTPUT
33+
publish-image:
34+
needs: ['set-version']
35+
name: 🐳 Build and deploy to a container repository
36+
uses: clamsproject/.github/.github/workflows/app-container.yml@main
37+
secrets: inherit
38+
with:
39+
version: ${{ needs.set-version.outputs.version }}
40+
arm64: false
41+
register-appdir:
42+
needs: ['set-version', 'publish-image']
43+
name: 📝 Register to CLASM app directory
44+
uses: clamsproject/apps/.github/workflows/register.yml@main
45+
secrets: inherit
46+
with:
47+
repo: ${{ github.repository }}
48+
tag: ${{ needs.set-version.outputs.version }}
49+
container: 'ghcr.io/${{ github.repository }}:${{ needs.set-version.outputs.version }}'
50+

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Spacy NLP Service
1+
# CLAMS-spaCy wrapper
22

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).
3+
The spaCy NLP wrapped as a CLAMS service, spaCy is distributed under the [MIT license](https://github.com/explosion/spaCy/blob/master/LICENSE).
44

55
This requires Python 3.8 or higher. For local install of required Python modules see [requirements.txt](requirements.txt).
66

metadata.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import re
2-
from mmif import DocumentTypes, AnnotationTypes
32

43
from clams.appmetadata import AppMetadata
54
from lapps.discriminators import Uri
5+
from mmif import DocumentTypes
66

77

88
# DO NOT CHANGE the function name
@@ -11,8 +11,8 @@ def appmetadata() -> AppMetadata:
1111
name="CLAMS wrapper for spaCy NLP",
1212
description="Apply spaCy NLP to all text documents in a MMIF file.",
1313
app_license="Apache 2.0",
14-
identifier=f"spacy-wrapper",
15-
url='https://github.com/clamsproject/app-spacy-nlp',
14+
identifier=f"http://apps.clams.ai/spacy-wrapper",
15+
url='https://github.com/clamsproject/app-spacy-wrapper',
1616
analyzer_version=[l.strip().rsplit('==')[-1] for l in open('requirements.txt').readlines() if re.match(r'^spacy==', l)][0],
1717
analyzer_license='MIT',
1818
)
@@ -38,4 +38,4 @@ def appmetadata() -> AppMetadata:
3838
# DO NOT CHANGE the main block
3939
if __name__ == '__main__':
4040
import sys
41-
sys.stdout.write(appmetadata().json(indent=2))
41+
sys.stdout.write(appmetadata().jsonify(pretty=True))

requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Make sure clams-python version is explicitly specified, at least the lower bound
2-
clams-python==0.6.0
1+
clams-python==0.6.2
32
spacy==3.1.2
43
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.1.0/en_core_web_sm-3.1.0.tar.gz#egg=en_core_web_sm

0 commit comments

Comments
 (0)