Skip to content

Commit

Permalink
Merge f59a08e into 8859bc1
Browse files Browse the repository at this point in the history
  • Loading branch information
mboudet committed Jan 26, 2022
2 parents 8859bc1 + f59a08e commit 8485d69
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint_test.yml
Expand Up @@ -50,7 +50,7 @@ jobs:
docker pull xgaia/corese:latest
docker pull xgaia/isql-api:2.1.1
docker pull xgaia/simple-ldap:latest
docker run -d --name virtuoso -p 8891:8890 -p 1112:1111 -e DBA_PASSWORD=dba -e SPARQL_UPDATE=true -e DEFAULT_GRAPH=http://localhost:8891/DAV -t askomics/virtuoso:7.2.5.1 /bin/sh -c "netstat -nr | grep '^0\.0\.0\.0' | grep -oE '((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])' | grep -v '^0\.0\.0\.0' | sed 's/$/ askomics-host/' >> /etc/hosts && /virtuoso/virtuoso.sh"
docker run -d --name virtuoso -p 8891:8890 -p 1112:1111 -e DBA_PASSWORD=dba -e DEFAULT_GRAPH=http://localhost:8891/DAV -t askomics/virtuoso:7.2.5.1 /bin/sh -c "netstat -nr | grep '^0\.0\.0\.0' | grep -oE '((1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9][0-9]?|2[0-4][0-9]|25[0-5])' | grep -v '^0\.0\.0\.0' | sed 's/$/ askomics-host/' >> /etc/hosts && /virtuoso/virtuoso.sh"
sleep 1m
docker run -d --name redis -p 6380:6379 -t redis:4.0
docker run -d --name galaxy -p 8081:80 -t bgruening/galaxy-stable:20.05
Expand Down
9 changes: 7 additions & 2 deletions askomics/libaskomics/SparqlQueryLauncher.py
Expand Up @@ -44,6 +44,7 @@ def __init__(self, app, session, get_result_query=False, federated=False, endpoi
except Exception:
pass

local = False
# Use the federated query engine
if federated:
self.federated = True
Expand All @@ -65,16 +66,20 @@ def __init__(self, app, session, get_result_query=False, federated=False, endpoi
self.triplestore = self.settings.get('triplestore', 'triplestore')
self.url_endpoint = self.settings.get('triplestore', 'endpoint')
self.url_updatepoint = self.settings.get('triplestore', 'updatepoint')
local = True

self.endpoint = SPARQLWrapper(self.url_endpoint, self.url_updatepoint)

if local:
try:
self.endpoint.setCredentials(
self.settings.get('triplestore', 'username'),
self.settings.get('triplestore', 'password')
)
self.endpoint.setHTTPAuth(self.settings.get('triplestore', 'http_auth', fallback="basic"))
except Exception:
pass

self.endpoint = SPARQLWrapper(self.url_endpoint, self.url_updatepoint)

def load_data(self, file_name, graph, host_url):
"""Load data in function of the triplestore
Expand Down
4 changes: 2 additions & 2 deletions askomics/react/src/routes/datasets/datasetstable.jsx
Expand Up @@ -118,7 +118,7 @@ export default class DatasetsTable extends Component {
return (
<FormGroup>
<div>
<CustomInput disabled={this.props.config.user.admin ? false : true} type="switch" id={row.id} onChange={this.togglePublicDataset} checked={cell} value={cell} />
<CustomInput disabled={this.props.config.user.admin === 1 ? false : true} type="switch" id={row.id} onChange={this.togglePublicDataset} checked={cell} value={cell} />
</div>
</FormGroup>
)
Expand Down Expand Up @@ -209,4 +209,4 @@ DatasetsTable.propTypes = {
waiting: PropTypes.bool,
datasets: PropTypes.object,
config: PropTypes.object
}
}
28 changes: 15 additions & 13 deletions config/askomics.ini.template
Expand Up @@ -12,9 +12,9 @@ debug = false
debug_ttl = false

# If Askomics is running under a sub path (like http://example.org/askomics, subpath is /askomics)
#reverse_proxy_path =
#reverse_proxy_path =

# subtitle =
# subtitle =
footer_message = Welcome to AskOmics!
#front_message=

Expand Down Expand Up @@ -61,12 +61,12 @@ instance_url = http://localhost:5000
# If set, host, port and sender are mandatory.
# user and password are optional
# connection: starttls or nothing
#smtp_host =
#smtp_port =
#smtp_sender =
#smtp_user =
#smtp_password =
#smtp_connection =
#smtp_host =
#smtp_port =
#smtp_sender =
#smtp_user =
#smtp_password =
#smtp_connection =

# LDAP
ldap_auth = false
Expand All @@ -80,16 +80,16 @@ ldap_username_attribute = uid
ldap_first_name_attribute = givenName
ldap_surname_attribute = sn
ldap_mail_attribute = mail
#ldap_password_reset_link =
#ldap_account_link =
#ldap_password_reset_link =
#ldap_account_link =

[triplestore]
# name of the triplestore, can be virtuoso or fuseki
triplestore = virtuoso
# Sparql endpoint
endpoint = http://localhost:8890/sparql
endpoint = http://localhost:8890/sparql-auth
# Sparql updatepoint
updatepoint = http://localhost:8890/sparql
updatepoint = http://localhost:8890/sparql-auth
# Isql API
# If triplestore is virtuoso, set the (optional) isql api for fastest graph deletion
#isqlapi = http://localhost:5050
Expand All @@ -98,8 +98,10 @@ updatepoint = http://localhost:8890/sparql
# Triplestore credentials
username = dba
password = dba
# Http auth method for sparqlwrapper: basic or digest (virtuoso require digest)
http_auth = digest
# If the triplesotre and askomics are on different network, the loadurl is askomics url accessible by the triplesotre
# load_url =
# load_url =
upload_method = load
# Number of triple to integrate in one request
chunk_size = 60000
Expand Down
28 changes: 15 additions & 13 deletions config/askomics.test.ini
Expand Up @@ -11,7 +11,7 @@ result_backend = redis://localhost:6380
debug = false
debug_ttl = false

# subtitle =
# subtitle =
footer_message = Test
#front_message=

Expand Down Expand Up @@ -55,12 +55,12 @@ instance_url = http://localhost:5000
# If set, host, port and sender are mandatory.
# user and password are optional
# connection: starttls or nothing
#smtp_host =
#smtp_port =
#smtp_sender =
#smtp_user =
#smtp_password =
#smtp_connection =
#smtp_host =
#smtp_port =
#smtp_sender =
#smtp_user =
#smtp_password =
#smtp_connection =

# LDAP
ldap_auth = false
Expand All @@ -74,16 +74,16 @@ ldap_username_attribute = uid
ldap_first_name_attribute = givenName
ldap_surname_attribute = sn
ldap_mail_attribute = mail
#ldap_password_reset_link =
#ldap_account_link =
#ldap_password_reset_link =
#ldap_account_link =

[triplestore]
# name of the triplestore, can be virtuoso or fuseki
triplestore = virtuoso
# Sparql endpoint
endpoint = http://localhost:8891/sparql
endpoint = http://localhost:8891/sparql-auth
# Sparql updatepoint
updatepoint = http://localhost:8891/sparql
updatepoint = http://localhost:8891/sparql-auth
# Isql API
# If triplestore is virtuoso, set the (optional) isql api for fastest graph deletion
isqlapi = http://localhost:5051
Expand All @@ -92,8 +92,10 @@ isqlapi = http://localhost:5051
# Triplestore credentials
username = dba
password = dba
# If the triplesotre and askomics are on different network, the loadurl is askomics url accessible by the triplesotre
# load_url =
# Http auth method for sparqlwrapper: basic or digest (virtuoso require digest)
http_auth = digest
# If the triplestore and askomics are on different network, the loadurl is askomics url accessible by the triplesotre
# load_url =
upload_method = insert
# Number of triple to integrate in one request
chunk_size = 60000
Expand Down
8 changes: 4 additions & 4 deletions tests/results/abstraction.json
Expand Up @@ -561,7 +561,7 @@
"entities": [
{
"endpoints": [
"http://localhost:8891/sparql"
"http://localhost:8891/sparql-auth"
],
"faldo": true,
"graphs": [
Expand All @@ -575,7 +575,7 @@
},
{
"endpoints": [
"http://localhost:8891/sparql"
"http://localhost:8891/sparql-auth"
],
"faldo": true,
"graphs": [
Expand All @@ -589,7 +589,7 @@
},
{
"endpoints": [
"http://localhost:8891/sparql"
"http://localhost:8891/sparql-auth"
],
"faldo": true,
"graphs": [
Expand All @@ -602,7 +602,7 @@
},
{
"endpoints": [
"http://localhost:8891/sparql"
"http://localhost:8891/sparql-auth"
],
"faldo": false,
"graphs": [
Expand Down
12 changes: 6 additions & 6 deletions tests/results/startpoints.json
Expand Up @@ -8,10 +8,10 @@
[{
"endpoints": [{
"name": "local",
"url": "http://localhost:8891/sparql"
"url": "http://localhost:8891/sparql-auth"
}, {
"name": "local",
"url": "http://localhost:8891/sparql"
"url": "http://localhost:8891/sparql-auth"
}],
"entity":
"http://askomics.org/test/data/transcript",
Expand All @@ -37,10 +37,10 @@
{
"endpoints": [{
"name": "local",
"url": "http://localhost:8891/sparql"
"url": "http://localhost:8891/sparql-auth"
}, {
"name": "local",
"url": "http://localhost:8891/sparql"
"url": "http://localhost:8891/sparql-auth"
}],
"entity":
"http://askomics.org/test/data/gene",
Expand Down Expand Up @@ -70,7 +70,7 @@
{
"endpoints": [{
"name": "local",
"url": "http://localhost:8891/sparql"
"url": "http://localhost:8891/sparql-auth"
}],
"entity":
"http://askomics.org/test/data/DifferentialExpression",
Expand All @@ -89,7 +89,7 @@
{
"endpoints": [{
"name": "local",
"url": "http://localhost:8891/sparql"
"url": "http://localhost:8891/sparql-auth"
}],
"entity":
"http://askomics.org/test/data/QTL",
Expand Down

0 comments on commit 8485d69

Please sign in to comment.