Skip to content

Commit

Permalink
Version bump 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
filak committed Jan 24, 2025
1 parent 9be4840 commit 44d829a
Show file tree
Hide file tree
Showing 14 changed files with 211 additions and 68 deletions.
2 changes: 1 addition & 1 deletion flask-app/application/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def create_app(debug=False, logger=None, port=5900,
app.config.update(dict(
APPLICATION_ROOT = url_prefix,
APP_NAME = 'MTW',
APP_VER = '1.6.9',
APP_VER = '1.7.0',
API_VER = '1.0.0',
DBVERSION = 1.0,
CACHE_DIR = mtu.get_instance_dir(app, 'cache'),
Expand Down
3 changes: 2 additions & 1 deletion flask-app/dist/instance/_data/in/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
## Folder placeholder
# Folder placeholder

3 changes: 2 additions & 1 deletion flask-app/dist/instance/_data/out/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
## Folder placeholder
# Folder placeholder

3 changes: 2 additions & 1 deletion flask-app/dist/instance/cache/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
## Folder placeholder
# Folder placeholder

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@prefix meshv: <http://id.nlm.nih.gov/mesh/vocab#> .
@prefix mesht: <http://www.medvik.cz/schema/mesh/vocab/#> .

### Version 1.1.1
### Version 1.4.0 for Jena v4

## Initialize text query
[] ja:loadClass "org.apache.jena.query.text.TextQuery" .
Expand All @@ -29,15 +29,15 @@ text:TextIndexES rdfs:subClassOf text:TextIndex .
.

# A TDB dataset used for RDF storage
<#dataset>
<#dataset>
a tdb2:DatasetTDB2 ;
tdb2:location "d:/Data/jena5/databases/mesh" ;
tdb2:location "d:/Data/jena4/databases/mesh" ;
.

# Text index description
<#indexLucene>
<#indexLucene>
a text:TextIndexLucene ;
text:directory "d:/Data/jena5/indexes/mesh" ;
text:directory "d:/Data/jena4/indexes/mesh" ;
text:entityMap <#entMap> ;
text:storeValues false ;
## text:analyzer[ a text:StandardAnalyzer ] ;
Expand All @@ -54,53 +54,9 @@ text:TextIndexES rdfs:subClassOf text:TextIndex .
text:queryParser text:AnalyzingQueryParser ;
## text:defineAnalyzers [ . . . ] ;
text:multilingualSupport true ;
## https://jena.apache.org/documentation/query/text-query.html#lists-of-indexed-properties - available since Jena 5.0
text:propLists (
[ text:propListProp mesht:defQuery ;
text:props (
rdfs:label
meshv:identifier
meshv:prefLabel
meshv:altLabel
meshv:casn1_label
meshv:abbreviation
meshv:registryNumber
meshv:relatedRegistryNumber
mesht:identifier
mesht:prefLabel
mesht:altLabel
) ;
]
[ text:propListProp mesht:includeNotes ;
text:props (
rdfs:label
meshv:identifier
meshv:prefLabel
meshv:altLabel
meshv:casn1_label
meshv:abbreviation
meshv:registryNumber
meshv:relatedRegistryNumber
mesht:identifier
mesht:prefLabel
mesht:altLabel
mesht:translatorsNote
mesht:annotation
mesht:historyNote
mesht:scopeNote
meshv:annotation
meshv:historyNote
meshv:note
meshv:onlineNote
meshv:publicMeSHNote
meshv:scopeNote
meshv:source
) ;
]
) ;
.
.

<#entMap>
<#entMap>
a text:EntityMap ;
text:defaultField "ftext" ;
text:entityField "uri" ;
Expand All @@ -121,7 +77,7 @@ text:TextIndexES rdfs:subClassOf text:TextIndex .
[ text:field "ftext" ; text:predicate meshv:note ]
[ text:field "ftext" ; text:predicate meshv:onlineNote ]
[ text:field "ftext" ; text:predicate meshv:publicMeSHNote ]
[ text:field "ftext" ; text:predicate meshv:source ]
# [ text:field "ftext" ; text:predicate meshv:source ]
[ text:field "ftext" ; text:predicate meshv:scopeNote ]
[ text:field "ftext" ; text:predicate mesht:abbreviation ]
[ text:field "ftext" ; text:predicate mesht:annotation ]
Expand Down Expand Up @@ -153,7 +109,7 @@ text:TextIndexES rdfs:subClassOf text:TextIndex .
### Translation only:
## mesht:translatorsNote

<#service_text_tdb>
<#service_text_tdb>
a fuseki:Service ;
rdfs:label "MeSH-Translation-service" ;
fuseki:name "mesh" ;
Expand Down
183 changes: 183 additions & 0 deletions flask-app/dist/instance/conf/mesh_Jena5.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
@prefix : <http://localhost/jena_example/#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb2: <http://jena.apache.org/2016/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix text: <http://jena.apache.org/text#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix meshv: <http://id.nlm.nih.gov/mesh/vocab#> .
@prefix mesht: <http://www.medvik.cz/schema/mesh/vocab/#> .

### Version 1.5.0 for Jena v5

## Initialize text query
[] ja:loadClass "org.apache.jena.query.text.TextQuery" .
# A TextDataset is a regular dataset with a text index.
text:TextDataset rdfs:subClassOf ja:RDFDataset .
# Lucene index
text:TextIndexLucene rdfs:subClassOf text:TextIndex .
# Elasticsearch index
text:TextIndexES rdfs:subClassOf text:TextIndex .

## ---------------------------------------------------------------
## This URI must be fixed - it's used to assemble the text dataset.

:text_dataset
a text:TextDataset ;
text:dataset <#dataset> ;
text:index <#indexLucene> ;
.

# A TDB dataset used for RDF storage
<#dataset>
a tdb2:DatasetTDB2 ;
tdb2:location "d:/Data/jena5/databases/mesh" ;
.

# Text index description
<#indexLucene>
a text:TextIndexLucene ;
text:directory "d:/Data/jena5/indexes/mesh" ;
text:entityMap <#entMap> ;
text:storeValues false ;
## text:analyzer[ a text:StandardAnalyzer ] ;
text:analyzer [
a text:ConfigurableAnalyzer ;
text:tokenizer text:StandardTokenizer ;
text:filters (
text:ASCIIFoldingFilter
text:LowerCaseFilter
# text:PorterStemFilter
)
] ;
## text:queryAnalyzer [ a text:KeywordAnalyzer ] ;
text:queryParser text:AnalyzingQueryParser ;
## text:defineAnalyzers [ . . . ] ;
text:multilingualSupport true ;
## https://jena.apache.org/documentation/query/text-query.html#lists-of-indexed-properties - available since Jena 5.0
text:propLists (
[ text:propListProp mesht:queryDef ;
text:props (
rdfs:label
meshv:identifier
meshv:prefLabel
meshv:altLabel
meshv:casn1_label
meshv:abbreviation
meshv:registryNumber
meshv:relatedRegistryNumber
mesht:identifier
mesht:prefLabel
mesht:altLabel
) ;
]
[ text:propListProp mesht:queryAll ;
text:props (
rdfs:label
meshv:identifier
meshv:prefLabel
meshv:altLabel
meshv:casn1_label
meshv:abbreviation
meshv:registryNumber
meshv:relatedRegistryNumber
mesht:identifier
mesht:prefLabel
mesht:altLabel
mesht:translatorsNote
mesht:annotation
mesht:historyNote
mesht:scopeNote
meshv:annotation
meshv:historyNote
meshv:note
meshv:onlineNote
meshv:publicMeSHNote
meshv:scopeNote
# meshv:source
) ;
]
[ text:propListProp mesht:queryNotes ;
text:props (
mesht:translatorsNote
mesht:annotation
mesht:historyNote
mesht:scopeNote
meshv:annotation
meshv:historyNote
meshv:note
meshv:onlineNote
meshv:publicMeSHNote
meshv:scopeNote
# meshv:source
) ;
]
) ;
.

<#entMap>
a text:EntityMap ;
text:defaultField "label" ;
text:entityField "uri" ;
text:uidField "uid" ;
text:langField "lang" ;
text:graphField "graph" ;
text:map (
[ text:field "label" ; text:predicate rdfs:label ]
[ text:field "abbreviation" ; text:predicate meshv:abbreviation ]
[ text:field "annotation" ; text:predicate meshv:annotation ]
[ text:field "historyNote" ; text:predicate meshv:historyNote ]
[ text:field "identifier" ; text:predicate meshv:identifier ]
[ text:field "prefLabel" ; text:predicate meshv:prefLabel ]
[ text:field "altLabel" ; text:predicate meshv:altLabel ]
[ text:field "casn1_label" ; text:predicate meshv:casn1_label ]
[ text:field "registryNumber" ; text:predicate meshv:registryNumber ]
[ text:field "relatedRegistryNumber" ; text:predicate meshv:relatedRegistryNumber ]
[ text:field "note" ; text:predicate meshv:note ]
[ text:field "onlineNote" ; text:predicate meshv:onlineNote ]
[ text:field "publicMeSHNote" ; text:predicate meshv:publicMeSHNote ]
# [ text:field "source" ; text:predicate meshv:source ]
[ text:field "scopeNote" ; text:predicate meshv:scopeNote ]
[ text:field "abbreviation_t" ; text:predicate mesht:abbreviation ]
[ text:field "annotation_t" ; text:predicate mesht:annotation ]
[ text:field "historyNote_t" ; text:predicate mesht:historyNote ]
[ text:field "identifier_t" ; text:predicate mesht:identifier ]
[ text:field "prefLabel_t" ; text:predicate mesht:prefLabel ]
[ text:field "altLabel_t" ; text:predicate mesht:altLabel ]
[ text:field "scopeNote_t" ; text:predicate mesht:scopeNote ]
[ text:field "translatorsNote" ; text:predicate mesht:translatorsNote ]
) .

### MeSH common:
## abbreviation
## annotation
## historyNote
## identifier
## prefLabel
## altLabel
## scopeNote

### MeSH master only:
## rdfs:label
## meshv:casn1_label
## meshv:note
## meshv:onlineNote
## meshv:publicMeSHNote
## meshv:source

### Translation only:
## mesht:translatorsNote

<#service_text_tdb>
a fuseki:Service ;
rdfs:label "MeSH-Translation-service" ;
fuseki:name "mesh" ;
fuseki:serviceQuery "query" ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:dataset :text_dataset ;
.

5 changes: 2 additions & 3 deletions flask-app/dist/instance/conf/mtw-dist.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# *** Config version 1.6.9 ***
# *** Config version 1.7.0 ***
### Important values are marked with ! ###
### ! This file MUST BE UTF-8 encoded ! ###
### ! Restart the App after modifying ! ###
Expand Down Expand Up @@ -100,7 +100,7 @@ GCSP = {"script-src": "'self' ",
CHAR_NORM_FILE = norm_chars_table.tsv.txt

### Uncomment only if using Jena +5.0 - use text:propLists defined in mesh.ttl - default: False
#USE_PROP_LISTS = True
USE_PROP_LISTS = True

[worker]
### MTW Worker API settings - required !
Expand Down Expand Up @@ -156,4 +156,3 @@ TRX_NOTES = annotation,considerAlso,historyNote
DESC_NOTES = annotation,considerAlso,historyNote,onlineNote,publicMeSHNote,translatorsNote

ROLES = manager,editor,contributor,viewer,disabled,locked

3 changes: 2 additions & 1 deletion flask-app/dist/instance/logs/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
## Folder placeholder
# Folder placeholder

3 changes: 2 additions & 1 deletion flask-app/dist/instance/sessions/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
## Folder placeholder
# Folder placeholder

3 changes: 2 additions & 1 deletion flask-app/dist/instance/temp/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
## This is folder for temporary files
# This is folder for temporary files

3 changes: 1 addition & 2 deletions flask-app/instance/conf/mtw-dist.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# *** Config version 1.6.9 ***
# *** Config version 1.7.0 ***
### Important values are marked with ! ###
### ! This file MUST BE UTF-8 encoded ! ###
### ! Restart the App after modifying ! ###
Expand Down Expand Up @@ -156,4 +156,3 @@ TRX_NOTES = annotation,considerAlso,historyNote
DESC_NOTES = annotation,considerAlso,historyNote,onlineNote,publicMeSHNote,translatorsNote

ROLES = manager,editor,contributor,viewer,disabled,locked

2 changes: 1 addition & 1 deletion flask-app/instance/conf/mtw.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# *** Config version 1.6.9 ***
# *** Config version 1.7.0 ***
### Important values are marked with ! ###
### ! This file MUST BE UTF-8 encoded ! ###
### ! Restart the App after modifying ! ###
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 @@ -14,7 +14,7 @@
DEFAULT_PREFIX = 'mtw'

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

Expand Down
2 changes: 1 addition & 1 deletion flask-app/mtw_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Version 1.6.9
### Version 1.7.0
### Python 3.12 ###
arrow==1.3.0
bcrypt==4.2.1 ## NOT python-bcrypt !!!
Expand Down

0 comments on commit 44d829a

Please sign in to comment.