Skip to content
Merged
13 changes: 8 additions & 5 deletions .woodpecker/.feature.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
pipeline:
steps:
build-and-push:
image: plugins/docker
image: woodpeckerci/plugin-docker-buildx
settings:
repo: "${CI_REPO_OWNER##mu-}/${CI_REPO_NAME}"
tags: "feature-${CI_COMMIT_BRANCH##feature/}"
secrets: [docker_username, docker_password]
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event: push
branch: feature/*
- event: push
branch: [feature/*]
13 changes: 8 additions & 5 deletions .woodpecker/.latest.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
pipeline:
steps:
build-and-push:
image: plugins/docker
image: woodpeckerci/plugin-docker-buildx
settings:
repo: "${CI_REPO_OWNER##mu-}/${CI_REPO_NAME}"
tags: latest
secrets: [docker_username, docker_password]
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event: push
branch: [master, main]
- event: push
branch: [master, main]
13 changes: 8 additions & 5 deletions .woodpecker/.release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
pipeline:
steps:
release:
image: plugins/docker
image: woodpeckerci/plugin-docker-buildx
settings:
repo: "${CI_REPO_OWNER##mu-}/${CI_REPO_NAME}"
tags: "${CI_COMMIT_TAG##v}"
secrets: [ docker_username, docker_password ]
username:
from_secret: docker_username
password:
from_secret: docker_password
when:
event: tag
tag: v*
- event: tag
ref: refs/tags/v*
2 changes: 1 addition & 1 deletion escape_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def sparql_escape_int(obj):

def sparql_escape_float(obj):
"""Converts the given float to a SPARQL-safe RDF object string with the right RDF-datatype. """
if not isinstance(obj, int):
if not isinstance(obj, float):
warn("You are escaping something that isn't a float with \
the 'sparql_escape_float'-method. Implicit casting will occurr.")
obj = str(float(obj))
Expand Down
12 changes: 10 additions & 2 deletions helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ def query(the_query):
sparqlQuery.setQuery(the_query)
if LOG_SPARQL_QUERIES:
log("Execute query: \n" + the_query)
return sparqlQuery.query().convert()
try:
return sparqlQuery.query().convert()
except Exception as e:
log("Failed Query: \n" + the_query)
raise e


def update(the_query):
Expand All @@ -153,7 +157,11 @@ def update(the_query):
if sparqlUpdate.isSparqlUpdateRequest():
if LOG_SPARQL_UPDATES:
log("Execute query: \n" + the_query)
sparqlUpdate.query()
try:
sparqlUpdate.query()
except Exception as e:
log("Failed Query: \n" + the_query)
raise e


def update_modified(subject, modified=datetime.datetime.now()):
Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /usr/bin/env bash
set -eu
if [ ${MODE:-""} == "development" ]; then
if [ "${MODE}" == "development" ]; then
if [ -f /app/requirements.txt ]; then pip install -r /app/requirements.txt; fi
exec python web.py
else
Expand Down