Skip to content

Commit

Permalink
moved ontologies download to Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Hanke committed Feb 2, 2023
1 parent bfd2b51 commit ac98e16
Show file tree
Hide file tree
Showing 5 changed files with 22,011 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ RUN apt-get -y upgrade
ADD . /src
RUN pip install --no-cache-dir -r /src/requirements.txt
WORKDIR /src
# get ontologies
RUN curl https://raw.githubusercontent.com/Mat-O-Lab/MSEO/main/MSEO_mid.ttl > ./ontologies/mseo.ttl
RUN curl https://raw.githubusercontent.com/CommonCoreOntology/CommonCoreOntologies/master/cco-merged/MergedAllCoreOntology-v1.3-2021-03-01.ttl > ./ontologies/cco.ttl

CMD ["gunicorn", "-b", "0.0.0.0:5000", "wsgi:app", "--workers=3"]
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ services:
container_name: maptomethod
ports:
- ${APP_PORT}:5000
# volumes:
# - .:/src
volumes:
- .:/src
restart: always
networks:
maptomethod_net:
Expand Down
12 changes: 8 additions & 4 deletions maptomethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,20 @@ def dict_constructor(loader, node):

# MSEO_URL='https://purl.matolab.org/mseo/mid'
OBO = Namespace('http://purl.obolibrary.org/obo/')
MSEO_URL = 'https://raw.githubusercontent.com/Mat-O-Lab/MSEO/main/MSEO_mid.owl'
CCO_URL = 'https://github.com/CommonCoreOntology/CommonCoreOntologies/raw/master/cco-merged/MergedAllCoreOntology-v1.3-2021-03-01.ttl'
MSEO = Namespace(MSEO_URL)
MSEO_NAMESPACE = 'https://raw.githubusercontent.com/Mat-O-Lab/MSEO/main/MSEO_mid.owl'
#CCO_URL = 'https://github.com/CommonCoreOntology/CommonCoreOntologies/raw/master/cco-merged/MergedAllCoreOntology-v1.3-2021-03-01.ttl'
MSEO_URL = './ontologies/mseo.ttl'
CCO_URL = './ontologies/cco.ttl'


MSEO = Namespace(MSEO_NAMESPACE)
CCO = Namespace('http://www.ontologyrepository.com/CommonCoreOntologies/')
CSVW = Namespace('http://www.w3.org/ns/csvw#')
OA = Namespace('http://www.w3.org/ns/oa#')

mseo_graph = Graph()
mseo_graph.parse(CCO_URL, format='turtle')
mseo_graph.parse(str(MSEO), format='xml')
mseo_graph.parse(MSEO_URL, format='turtle')

InformtionContentEntity = CCO.InformationContentEntity
TemporalRegionClass = OBO.BFO_0000008
Expand Down
Loading

0 comments on commit ac98e16

Please sign in to comment.