Skip to content
Snippets Groups Projects
Select Git revision
  • 4486ae03f98b8ef8dfd4520af73e79d92c2a6f19
  • master default protected
  • develop protected
  • feat_remove_attr
  • python2.7
  • python3.8
6 results

CMakeLists.txt

Blame
  • ShellValier v2

    Running the development environment

    In order to run the development environment locally:

    1. Make sure you have Docker Desktop and Docker Compose installed.

    2. Set evn variable pointing to the path where yhe database will be located

      export DATABASE_DIR=

    3. Build and run the project by executing:

       ./docker/scripts/run-docker
    4. In order to fulfill database execute belove commands

       docker-compose stop backend
       docker-compose run backend bash 
           -> run ./reset_db.sh script in interactive bash
           -> exit interactive bash by typing ctrl-d
       docker-compose start backend

    By default the database is fulfilled by a small subset of the Polish Valence Dictionary. To load different dictionary file one have to run following tasks before executing ./reset_db.sh script:

    • download full Walenty dataset (TEI format can by downlowaded from http://zil.ipipan.waw.pl/Walenty)
    • unpack zip archive and place xml file in ./data/walenty
    • set environment variables WALENTY_FILE_NAME and PHRASE_TYPES_EXPAND_FILE_NAME to the name of files that will be loaded (e.g. export WALENTY_FILE_NAME=walenty_20210913.xml, export PHRASE_TYPES_EXPAND_FILE_NAME=phrase_types_expand_20210913.xml)

    In order to reinstall a database instance a folder specified by the DATABASE_DIR should be removed.

    Working in the development environment

    Whenever you need to establish an interactive bash session in the running application container, execute:

        ./docker/scripts/docker-bash

    Deploying to production

    In order to build the frontend Vue.js application for production execute the following command:

      docker-compose run frontend yarn build

    Compiled application files will be located in frontend/dist/.

    Default users

    ####Admin user

    • Login: shell
    • Password: valier

    ####Leksykograf user

    • Login: Leksykograf
    • Password: valier111

    ####Super leksykograf user

    • Login: Superleksykograf
    • Hasło: valier111

    Database manual migration

    export LOADING_THE_SLOWOSIEC_ONTOLOGY_HIERARCHY_DISABLED=true
    python manage.py makemigrations <module-name> (e.g. python manage.py makemigrations users)
    python manage.py migrate <module-name> (e.g. python manage.py migrate users)

    Database update

    export LOADING_THE_SLOWOSIEC_ONTOLOGY_HIERARCHY_DISABLED=true
    export WALENTY_FILE_NAME=<new walenty file>
    ./update_db.sh

    Run tests

    export LOADING_THE_SLOWOSIEC_ONTOLOGY_HIERARCHY_DISABLED=true
    python manage.py test --settings=shellvalier.settings-test