File tree Expand file tree Collapse file tree 5 files changed +57
-47
lines changed Expand file tree Collapse file tree 5 files changed +57
-47
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
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
+
Original file line number Diff line number Diff line change 1
- # Spacy NLP Service
1
+ # CLAMS-spaCy wrapper
2
2
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 ) .
4
4
5
5
This requires Python 3.8 or higher. For local install of required Python modules see [ requirements.txt] ( requirements.txt ) .
6
6
Original file line number Diff line number Diff line change 1
1
import re
2
- from mmif import DocumentTypes , AnnotationTypes
3
2
4
3
from clams .appmetadata import AppMetadata
5
4
from lapps .discriminators import Uri
5
+ from mmif import DocumentTypes
6
6
7
7
8
8
# DO NOT CHANGE the function name
@@ -11,8 +11,8 @@ def appmetadata() -> AppMetadata:
11
11
name = "CLAMS wrapper for spaCy NLP" ,
12
12
description = "Apply spaCy NLP to all text documents in a MMIF file." ,
13
13
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 ' ,
16
16
analyzer_version = [l .strip ().rsplit ('==' )[- 1 ] for l in open ('requirements.txt' ).readlines () if re .match (r'^spacy==' , l )][0 ],
17
17
analyzer_license = 'MIT' ,
18
18
)
@@ -38,4 +38,4 @@ def appmetadata() -> AppMetadata:
38
38
# DO NOT CHANGE the main block
39
39
if __name__ == '__main__' :
40
40
import sys
41
- sys .stdout .write (appmetadata ().json ( indent = 2 ))
41
+ sys .stdout .write (appmetadata ().jsonify ( pretty = True ))
Original file line number Diff line number Diff line change 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
3
2
spacy == 3.1.2
4
3
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
You can’t perform that action at this time.
0 commit comments