SousLesensVocables is a set of tools developed to manage Thesaurus and Ontologies resources through SKOS , OWL and RDF standards and graph visualisation approaches.
It has functionalities to :
- read : visualize, navigate and export SKOS or OWL resources
- edit : create , modify, aggregate OWL resources
A key feature of SLSV is graph visualization and interaction performed using excellent visjs/vis-network open source solution
Annotate tool allows annotate textual corpus with several registered lexical resources and identify missing terms
In production, souslesensVocable is deployed using docker
and docker-compose
. Install docker
following this link.
Then, install docker-compose
with your package manager
sudo apt install docker-compose
Clone the souslesensVocables repository
git clone https://github.com/souslesens/souslesensVocables.git
cd souslesensVocables
Checkout the latest release
git checkout x.x.x # replace with release number (e.g. 1.15.0)
Create a .env
file from the template
cp env.template .env
Edit the .env
file:
The DATA_ROOT_DIR
is defined by default to /tmp
, change it for data persistance.
variable | description |
---|---|
TAG |
souslesensVocable release. Same as you checkout at the previous step |
VOCABLES_LISTEN_PORT |
Port of souslesensVocable that will be exposed outside |
VIRTUOSO_LISTEN_PORT |
Port of virtuoso that will be exposed outside |
JOWL_LISTEN_PORT |
Port of jowl that will be exposed outside |
JOWL_PATH |
Path of the jowl repository |
DATA_ROOT_DIR |
Where the data will be written |
USER_PASSWORD |
Password of the admin user automatically created at first start |
SA_PASSWORD |
Password of the sql server |
DBA_PASSWORD |
Password of the virtuoso server |
FORMAL_ONTOLOGY_SOURCE_LABEL |
All entries from SouslesensVocables mainConfig.json
can be overwritten with env variables.
For example VOCABLES__SQLserver__user=toto
will be converted into {"SQLserver": {"user": "toto"}}
.
Refer to the docker-virtuoso documentation.
Refer to the Elasticsearch documentation.
Refer to the SQLServer documentation.
We do not provide a docker image for SouslesensVocables. You have to build it yourself:
docker-compose build vocables
Elasticsearch and SqlServer needs directories with specific right. Use the following commands to create directories usable by ElasticSearch and SqlServer.
bash scripts/init_directories.sh
docker-compose up -d
SouslesensVocables will be available at localhost:3010.
TODO:
First, fetch the latest changes
git fetch
Then, checkout the desired release
git checkout x.x.x # replace with release number (e.g. 1.16.0)
Change the TAG
number in the .env
file
Rebuild the image
docker-compose build vocables
Finally, restart the docker stack
docker-compose up -d
In development, souslesensVocable needs a Virtuoso instance, an ElasticSearch instance and
a Sql and a Spacy server. We provide a docker-compose.test.yaml
to deploy this dependencies.
SouslesensVocables is deployed locally using node
and npm
.
Install docker following this link.
Then, install docker-compose
with your package manager
sudo apt install docker-compose
Install nodejs from the nodesource package repository (detailed instruction here).
# Add nodesource repository
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor > /usr/share/keyrings/nodesource.gpg
echo "deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x buster main" > /etc/apt/sources.list.d/nodesource.list
echo "deb-src [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_16.x buster main" >> /etc/apt/sources.list.d/nodesource.list
apt update
# Install node
apt install -y nodejs
# Check versions
node --version
npm --version
Run the config script to create a default configuration:
node scripts/init_configs.js
Then, edit the config/*.json
to your needs or run the following
script to copy the values from the docker-compose configuration
into the config/*.json
files.
node scripts/config_from_docker_compose.js
Start the servers with docker-compose
docker-compose -f docker-compose.dev.yaml up -d
Load some data into virtuoso
bash tests/load_data.sh dev
Create a user account in MariaDB (for database authentication)
bash scripts/create_user_in_db.sh dev <login> <password>
souslesensVocable is composed of a backend in node/express and a frontend in pure javascript and typescript/react.
# Install the server
npm ci
# Install the front
cd mainapp
npm ci
# Build Webpack files
npm run build
# Go back to root
cd ..
The following command will build and watch the react app and run and watch the node app.
npm run devserver
Certain version need migration of data. Run the script for the following version:
node scripts/sources_access_control_migration_treeview.js -c config -w
node scripts/controller-migration.js -c config -w
node scripts/remove_admin_profile_migration.js -c config -w
node scripts/migration_1.37_sources.js -c config -w
SouslesensVocables will be available at localhost:3010.
To contribute to souslesensVocable, fork the repo and submit Pull Requests.
We use Prettier for Javascript code formatting. Please run
npm run format
before each commit to format your code.
We provide a docker-compose.test.yaml
and a tests/load_data.sh
script to build a testing
environment.
docker-compose -f docker-compose.test.yaml -d
bash tests/load_data.sh
To create a new release:
npm run release:minor # or patch or major
Then, edit the generated CHANGELOG.md
if necessary and tag the release with
npm run release:tag
And push commits and tag to GitHub
git push --tags
GitHub releases and docker images are created on tags with GitHub Actions.
In root create a plugins folder
mkdir plugins
Each directory is named after the plugin we want to add.
plugins/
└── MyPlugin
└── public
└── MyPlugin.js
The plugin's directory must contain a public directory with the source code within it.
MyPlugin.js must export a single IIFE function.
const Toto = (function () {
return { name: "toto" };
})();
export default Toto;
Once it done, don't forget to add the plugin's name to mainConfig.tools_available
.
If you still don't see the plugin in the jsTree, check that your user's profile allows to see this plugin.