Skip to content

Commit ac98e16

Browse files
author
Thomas Hanke
committed
moved ontologies download to Dockerfile
1 parent bfd2b51 commit ac98e16

File tree

5 files changed

+22011
-6
lines changed

5 files changed

+22011
-6
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@ RUN apt-get -y upgrade
66
ADD . /src
77
RUN pip install --no-cache-dir -r /src/requirements.txt
88
WORKDIR /src
9+
# get ontologies
10+
RUN curl https://raw.githubusercontent.com/Mat-O-Lab/MSEO/main/MSEO_mid.ttl > ./ontologies/mseo.ttl
11+
RUN curl https://raw.githubusercontent.com/CommonCoreOntology/CommonCoreOntologies/master/cco-merged/MergedAllCoreOntology-v1.3-2021-03-01.ttl > ./ontologies/cco.ttl
912

1013
CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app", "--workers=3"]

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ services:
77
container_name: maptomethod
88
ports:
99
- ${APP_PORT}:5000
10-
# volumes:
11-
# - .:/src
10+
volumes:
11+
- .:/src
1212
restart: always
1313
networks:
1414
maptomethod_net:

maptomethod.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,20 @@ def dict_constructor(loader, node):
3434

3535
# MSEO_URL='https://purl.matolab.org/mseo/mid'
3636
OBO = Namespace('http://purl.obolibrary.org/obo/')
37-
MSEO_URL = 'https://raw.githubusercontent.com/Mat-O-Lab/MSEO/main/MSEO_mid.owl'
38-
CCO_URL = 'https://github.com/CommonCoreOntology/CommonCoreOntologies/raw/master/cco-merged/MergedAllCoreOntology-v1.3-2021-03-01.ttl'
39-
MSEO = Namespace(MSEO_URL)
37+
MSEO_NAMESPACE = 'https://raw.githubusercontent.com/Mat-O-Lab/MSEO/main/MSEO_mid.owl'
38+
#CCO_URL = 'https://github.com/CommonCoreOntology/CommonCoreOntologies/raw/master/cco-merged/MergedAllCoreOntology-v1.3-2021-03-01.ttl'
39+
MSEO_URL = './ontologies/mseo.ttl'
40+
CCO_URL = './ontologies/cco.ttl'
41+
42+
43+
MSEO = Namespace(MSEO_NAMESPACE)
4044
CCO = Namespace('http://www.ontologyrepository.com/CommonCoreOntologies/')
4145
CSVW = Namespace('http://www.w3.org/ns/csvw#')
4246
OA = Namespace('http://www.w3.org/ns/oa#')
4347

4448
mseo_graph = Graph()
4549
mseo_graph.parse(CCO_URL, format='turtle')
46-
mseo_graph.parse(str(MSEO), format='xml')
50+
mseo_graph.parse(MSEO_URL, format='turtle')
4751

4852
InformtionContentEntity = CCO.InformationContentEntity
4953
TemporalRegionClass = OBO.BFO_0000008

0 commit comments

Comments
 (0)