Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GN-5193: template-export feature #87

Draft
wants to merge 7 commits into
base: fix/document-container-versions
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/light-wasps-yawn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-reglementaire-bijlage": patch
---

Enable `include-uri` feature for the `editor-document-folder`, `document-container` and `editor-document` models
5 changes: 5 additions & 0 deletions .changeset/wise-colts-reply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-reglementaire-bijlage": minor
---

Add support for results to tasks
2 changes: 2 additions & 0 deletions config/authorization/config.ex
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ defmodule Acl.UserGroups.Config do
"http://vocab.deri.ie/cogs#Job",
"http://open-services.net/ns/core#Error",
"http://redpencil.data.gift/vocabularies/tasks/Task",
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DataContainer",
"http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Archive",
] } } ] },

# // CLEANUP
Expand Down
24 changes: 24 additions & 0 deletions config/dispatcher/dispatcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ defmodule Dispatcher do
Proxy.forward conn, path, "http://cache/job-errors/"
end

get "/results/*path", %{ accept: %{json: true}, layer: :api} do
Proxy.forward conn, path, "http://cache/results/"
end


get "/data-containers/*path", %{ accept: %{json: true}, layer: :api} do
Proxy.forward conn, path, "http://cache/data-containers/"
end

get "/archives/*path", %{ accept: %{json: true}, layer: :api} do
Proxy.forward conn, path, "http://cache/archives/"
end

post "/publish-template/*path", %{ accept: %{json: true}, layer: :api} do
Proxy.forward conn, path, "http://publisher/publish-template/"
end
Expand Down Expand Up @@ -140,6 +153,17 @@ defmodule Dispatcher do
Proxy.forward conn, path, "http://file/files/"
end

#######################################################################
# Template Export Service #
#######################################################################
post "/export-templates" do
Proxy.forward conn, [], "http://template-export/export"
end

post "/import-templates" do
Proxy.forward conn, [], "http://template-export/import"
end

#######################################################################
# SPARQL #
#######################################################################
Expand Down
3 changes: 3 additions & 0 deletions config/resources/editor.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"inverse": true
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/editor-documents/"
},
"document-containers": {
Expand Down Expand Up @@ -90,6 +91,7 @@
"cardinality": "many"
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/document-containers/"
},
"editor-document-folders": {
Expand All @@ -101,6 +103,7 @@
"predicate": "ext:EditorDocumentFolderName"
}
},
"features": ["include-uri"],
"new-resource-base": "http://data.lblod.info/editor-document-folders/"
}
}
Expand Down
35 changes: 35 additions & 0 deletions config/resources/generic.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,45 @@
"target": "job",
"cardinality": "one",
"predicate": "dct:isPartOf"
},
"result": {
"target": "data-container",
"cardinality": "one",
"predicate": "task:resultsContainer"
}
},
"features": ["include-uri"],
"new-resource-base": "http://redpencil.data.gift/id/task/"
},
"data-containers": {
"name": "data-container",
"class": "nfo:DataContainer",
"attributes": {},
"relationships": {
"task": {
"target": "task",
"cardinality": "one",
"predicate": "task:resultsContainer",
"inverse": true
}
},
"features": ["include-uri"],
"new-resource-base": "http://redpencil.data.gift/id/data-container/"
},
"archives": {
"name": "archive",
"class": "nfo:Archive",
"super": ["data-container"],
"attributes": {},
"relationships": {
"file": {
"target": "file",
"cardinality": "one",
"predicate": "task:hasFile"
}
},
"features": ["include-uri"],
"new-resource-base": "http://redpencil.data.gift/id/archive/"
}
}
}
4 changes: 2 additions & 2 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.4'

services:
frontend:
restart: "no"
Expand Down Expand Up @@ -54,3 +52,5 @@ services:
- ./config/dev/tlsproxy/Caddyfile:/etc/caddy/Caddyfile
codex-proxy:
restart: "no"
template-export:
restart: "no"
37 changes: 37 additions & 0 deletions docker-compose.override.example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This file contains overrides that are useful for different development situations. These are
# intended to be used at the same time as the docker-compose.dev.yml file.

# services:
### Local dev setup: tweaks to .dev.yml to allow for running side-by-side with app-gn
# identifier:
# ports: !override
# - "180:80"
# virtuoso:
# ports: !override
# - "9890:8890"
# yasgui:
# image: erikap/yasgui
# ports: !override
# - "9891:80"
# environment:
# ENABLE_ENDPOINT_SELECTOR: "true"
# DEFAULT_SPARQL_ENDPOINT: "http://localhost:9890/sparql"
# tlsproxy:
# image: caddy:2
# command: "/bin/false"
# ports: !reset null
### END local dev setup

# Actually running template-export service before it's published to docker hub
# template-export:
# image: !reset null
# build: "https://github.com/lblod/template-export-service.git#feat/initial-version"
# volumes:
# - /path/to/template-export-service:/app
# # environment:
# # NODE_ENV: development
# # LOGGING_LEVEL: "debug"
# # LOG_SPARQL_ALL: false
# # DEBUG_AUTH_HEADERS: false
# # ports:
# # - "9229:9229"
9 changes: 7 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: '3.4'
x-logging: &default-logging
driver: "json-file"
options:
max-size: "10m"
max-file: "3"

services:
frontend:
image: lblod/frontend-reglementaire-bijlage:9.15.2
Expand Down Expand Up @@ -126,4 +126,9 @@ services:
image: lblod/codex-reverse-proxy-service
logging: *default-logging
restart: always

template-export:
image: lblod/template-export-service:0.0.1
logging: *default-logging
restart: always
volumes:
- ./data/files/:/share/