Skip to content

Update maptomethod.py #149

Update maptomethod.py

Update maptomethod.py #149

Workflow file for this run

name: TestExamples
on:
push:
branches:
- main
workflow_dispatch:
env:
WORKING_DIR: ./examples/
DATA_URL: 'https://raw.githubusercontent.com/Mat-O-Lab/CSVToCSVW/main/examples/example-metadata.json'
METHOD_URL: 'https://raw.githubusercontent.com/Mat-O-Lab/MSEO/main/methods/DIN_EN_ISO_527-3.ttl'
APP_PORT: 5005
jobs:
TestExamples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: run app
run: |
docker-compose up -d
sleep 10
docker ps -a
- name: list entities
working-directory: ${{env.WORKING_DIR}}
run: |
curl -X 'POST' \
'http://localhost:${{env.APP_PORT}}/api/entities' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://raw.githubusercontent.com/Mat-O-Lab/CSVToCSVW/main/examples/example-metadata.json",
"entity_classes": [
"http://www.w3.org/ns/csvw#Column",
"http://www.w3.org/ns/oa#Annotation"
]}' | jq . > bearingentities.json
curl -X 'POST' \
'http://localhost:${{env.APP_PORT}}/api/entities' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://github.com/Mat-O-Lab/MSEO/raw/main/methods/DIN_EN_ISO_527-3.drawio.ttl",
"entity_classes": [
"https://spec.industrialontologies.org/ontology/core/Core/InformationContentEntity",
"http://purl.obolibrary.org/obo/BFO_0000008"
]}'| jq . > contententities.json
- name: delete yaml files
working-directory: ${{env.WORKING_DIR}}
run: rm *.yaml
continue-on-error: true
- name: create YARRRML mapping
working-directory: ${{env.WORKING_DIR}}
run: |
curl -X POST "http://localhost:${{env.APP_PORT}}/api/mapping" -H "accept: application/json" -H "accept: application/json" -H "Content-Type: application/json" -d @request.json -v --connect-timeout 5 -O -J
- name: Commit files # commit the output folder
uses: EndBug/add-and-commit@v9
with:
message: 'updated example output'
add: '*.* --force'
cwd: './examples/'