Skip to content

Commit

Permalink
Version 1.4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
filak committed Jan 17, 2023
1 parent a1b040b commit d0af15b
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 23 deletions.
2 changes: 1 addition & 1 deletion flask-app/application/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __call__(self, environ, start_response):

app.config.update(dict(
APP_NAME = 'MTW',
APP_VER = '1.4.8',
APP_VER = '1.4.9',
API_VER = '1.0.0',
DBVERSION = 1.0,
TEMP_DIR = mtu.get_instance_dir(app, 'temp'),
Expand Down
2 changes: 1 addition & 1 deletion flask-app/application/templates/snips/search-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<form action="{{ url_for('search', dui='') }}" method="get">
<div class="input-group mb-2">
<input type="text" class="form-control" placeholder="Your query... with * and ? support " maxlength="100" aria-label="Your query... with two button addons" aria-describedby="button-addon4"
name="q" value="{{ session.get('q','') }}" required>
name="q" value="{{ session.get('q','') }}" required autofocus>
<div class="input-group-append" id="button-addon4">
<span class="input-group-text">{{ hits_cnt }}</span>
<button class="btn btn-secondary" type="submit" title="Search" aria-label="Search"><i class="fas fa-search"></i></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% include 'sparql/_namespaces.sparql' %}

SELECT ?dui ?cui ?dtype ?den ?trx ?notrx ?active ?crt ?nlm ?rn ?cas
SELECT ?dui ?cui ?dtype ?den ?trx ?notrx ?active ?crt ?est ?nlm ?rn ?cas
(GROUP_CONCAT(DISTINCT ?trns ; separator='~') AS ?trn)
(GROUP_CONCAT(DISTINCT ?pac ; separator='~') AS ?pa)
(GROUP_CONCAT(DISTINCT ?bd ; separator='~') AS ?btd)
Expand All @@ -14,6 +14,7 @@ WHERE {
?d meshv:identifier ?dui .
?d meshv:active ?active .
?d meshv:dateCreated ?crt .
?d meshv:dateEstablished ?est .
OPTIONAL {
?d meshv:treeNumber ?tree .
?tree rdfs:label ?trns
Expand Down Expand Up @@ -47,5 +48,5 @@ WHERE {
OPTIONAL { ?c meshv:registryNumber ?rn }
OPTIONAL { ?c meshv:casn1_label ?cas }
}
GROUP BY ?dui ?cui ?dtype ?den ?trx ?notrx ?active ?crt ?nlm ?rn ?cas
GROUP BY ?dui ?cui ?dtype ?den ?trx ?notrx ?active ?crt ?est ?nlm ?rn ?cas
###LIMIT 100
4 changes: 4 additions & 0 deletions flask-app/application/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ def getLookupJson(lookups, export):
if crt:
d['crt'] = crt

est = item.get('est')
if est:
d['est'] = est

for t in terms:
if t:
d['xtr'].append( t.replace('[OBSOLETE]','').strip() )
Expand Down
2 changes: 1 addition & 1 deletion flask-app/mtw-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from waitress import serve

appname = 'mtw-server'
appdesc = 'MTW Server 1.4.8'
appdesc = 'MTW Server 1.4.9'
appusage = 'Help: ' + appname + ' -h \n'
appauthor = 'Filip Kriz'

Expand Down
32 changes: 17 additions & 15 deletions flask-app/mtw_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
### Version 1.4.8
### Version 1.4.9
### Python 3.8+ ###
arrow==1.2.2
arrow==1.2.3
bcrypt==3.2.0 # NOT python-bcrypt !!!
cachelib==0.6.0
cachelib==0.9.0
certifi==2022.12.7
cffi==1.15.0
cffi==1.15.1
diff_match_patch==20200713
Flask==2.0.3
Flask-Babel==2.0.0
Flask-Caching==1.10.1
Flask-Paranoid==0.2.0
Flask-SeaSurf==0.3.1
Flask==2.2.2
Flask-Babel==3.0.0
Flask-Caching==2.0.2
Flask-Paranoid==0.3.0
Flask-SeaSurf==1.1.1
Flask-Session==0.4.0
### (optional) For SameSite cookie attribute support use:
# https://github.com/filak/flask-session
# - copy the files to: application\custom\flask_session
flask-talisman==1.0.0
itsdangerous==2.1.1
Jinja2==3.0.3
itsdangerous==2.1.2
Jinja2==3.1.2
pyuca==1.2
requests==2.27.1
requests==2.28.2
requests_futures==1.0.0
setuptools==66.0.0
### (optional) If deploying with Waitress (https://github.com/Pylons/waitress):
waitress==2.1.2
Werkzeug==2.0.3
Werkzeug==2.2.2
wheel==0.38.4
### (optional) If building for Windows:
pyinstaller==4.10
pyinstaller==5.7.0
## Install pywin32
pywin32==304
pywin32==305
## and run AS Admin (!):
## python venv\Scripts\pywin32_postinstall.py -install
8 changes: 5 additions & 3 deletions sparql/exports/lookups_base.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PREFIX text: <http://jena.apache.org/text#>
PREFIX meshx: <http://mesh.medvik.cz/link/>
PREFIX mesht: <http://www.medvik.cz/schema/mesh/vocab/#>

SELECT ?dui ?cui ?dtype ?den ?trx ?notrx ?active ?crt ?nlm ?rn ?cas
SELECT ?dui ?cui ?dtype ?den ?trx ?notrx ?active ?crt ?est ?nlm ?rn ?cas
(GROUP_CONCAT(DISTINCT ?trns ; separator='~') AS ?trn)
(GROUP_CONCAT(DISTINCT ?pac ; separator='~') AS ?pa)
(GROUP_CONCAT(DISTINCT ?bd ; separator='~') AS ?btd)
Expand All @@ -21,12 +21,14 @@ WHERE {
#BIND(mesh:Q000009 as ?d)
#BIND(mesh:D002493 as ?d)
#BIND(mesh:D005123 as ?d)
BIND(mesh:D018806 as ?d)
#BIND(mesh:D018806 as ?d)
BIND(mesh:D023482 as ?d)
?d rdf:type ?dtype .
FILTER(?dtype IN(meshv:TopicalDescriptor,meshv:GeographicalDescriptor,meshv:PublicationType,meshv:CheckTag,meshv:Qualifier))
?d meshv:identifier ?dui .
?d meshv:active ?active .
?d meshv:dateCreated ?crt .
?d meshv:dateEstablished ?est .
OPTIONAL {
?d meshv:treeNumber ?tree .
?tree rdfs:label ?trns
Expand Down Expand Up @@ -60,5 +62,5 @@ WHERE {
OPTIONAL { ?c meshv:registryNumber ?rn }
OPTIONAL { ?c meshv:casn1_label ?cas }
}
GROUP BY ?dui ?cui ?dtype ?den ?trx ?notrx ?active ?crt ?nlm ?rn ?cas
GROUP BY ?dui ?cui ?dtype ?den ?trx ?notrx ?active ?crt ?est ?nlm ?rn ?cas
###LIMIT 100

0 comments on commit d0af15b

Please sign in to comment.