GithubHelp home page GithubHelp logo

acdh-oeaw / vicav-app Goto Github PK

View Code? Open in Web Editor NEW
3.0 8.0 1.0 301.66 MB

A map-based web application for VICAV project.

Home Page: https://vicav.acdh.oeaw.ac.at

License: MIT License

XSLT 55.01% CSS 4.13% JavaScript 20.23% HTML 2.78% XQuery 16.98% Shell 0.74% Batchfile 0.13%
basex xslt xquery javascript css html5 application

vicav-app's Introduction

VICAV Web Page

A map-based web application for the VICAV project.

Set up a local instance

Prerequisites

  • Java LTS (Oracle, Azul, or others) (17 at the moment)
  • Node LTS (18 at the moment)
  • git (for Windows, shipped with other OSes)
  • curl for downloading Saxon HE (10.3 at the moment, curl is included with git for windows)
  • This git repository needs to be cloned inside a BaseX ZIP-file distribution (please use 9.7.3 at the moment, version 10.x will be supported soon)

Setup

  • unzip BaseX*.zip (for example in your home folder) <basexhome> is the directory containing BaseX.jar and the bin, lib and webapp directory (basex after unpacking the BaseX*.zip file, but you should probably rename it)
  • in <basexhome>/webapp git clone this repository, please do not change the name vicav-app
  • start a bash in <basexhome>/webapp/vicav-app
  • run git submodule update --init --recursive
  • optionally set the CONTENT_REPOsitory and the CONTENT_BRANCH
    # default settings if unset
    export CONTENT_REPO=https://github.com/acdh-oeaw/vicav-content
    export CONTENT_BRANCH=master
  • run ./deployment/initial.sh

This will clone vicav-content into <basexhome>.

Update data and web page code

In <basexhome> execute ./redeploy.sh

Then if

Tests

3 types of tests:

  • XSPEC for unit testing the XSL transformations in ./xslt,
  • XUnit for testing basex API endpoint outputs
  • Cypress for end-to-end testing of the frontend features

Test data is located in ./fixtures. Before running tests locally, you have to setup your test environment with the fixtures.

Tests are automatically executed upon a git push on Gitlab. See https://gitlab.com/acdh-oeaw/vicav/vicav-app/-/pipelines.

To run tests locally you need to tell the scripts where to find BaseX using the CYPRESS_BASEX_ROOT environment variable. E.g.:

$env:CYPRESS_BASEX_ROOT="<basexhome>"
npm run test

XSpec

Installation: Download xspec from https://github.com/xspec/xspec Running a test file: 1a. Windows: <xspechome>/bin/xspec.sh FILENAME 1b. Linux, mac: run <xspechome>/bin/xspec.sh FILENAME

Run xUnit:

Running a test file: Run <basexhome>/bin/basex -t FILENAME

Run cypress

Installation:

  • install nodejs and npm
  • run npm install

Running tests: Either open the GUI with npm run cypress:open or run them on command line with npm run cypress:run.

vicav-app's People

Contributors

alexanderwatzinger avatar asilcetin avatar charlymo avatar dasch124 avatar dependabot[bot] avatar kisram avatar maupalantir avatar simar0at avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jakajoko0

vicav-app's Issues

Integrate data from NoSketch Engine (proof-of-concept)

We want to create a RestXQ based variant of the API used in voice-api.

  • implement to be consumed by the application frontend (based on the VOICE API, excluding its query parser)
  • document query API
  • implement an endpoint to get utterances
  • document the get API
  • implement communication between BaseX and NoSketch Engine

Improve textbook audio

Audio Working with caveats
Implement more functions to control the audio?

  • Use custom controls instead of relying on (very different) audio controls of the different browsers?
  • Automatically stop a recording if another is started? They play simultaneously right now

Integrate SHAWI dictionary

  • adapt VICAV deployment worfklow to include the SHAWI dictionary
  • [x ] if needed, adapt XSLT rendering to cater for new markup structures

replace static profile list with dynamic one

Currently the list of profiles are hard-coded in a static TEI document. This should be replaced by a dynamically generated list served by the dedicated endpoint developed for TUNOCENT.

TODO:

  • add grouping level by country (in case there's more than one country in all input profiles)
  • factor out the introduction text

API: Output info for data querying along with menu points

I order to link the menupoints to their corresponding data queries the menu items in the projectInfo endpoint should contain the info on the queries.
preferred format would be:

{
  "id": "navBiblGeoMarkers",
  "title": "All Bibl. Locations on Map",
  "type": "item"
  "query": {
       "endpoint": "bibl_markers_tei",
       "query": ".*",
       "scope": "geo",
   }
}

currently this information is matched to the menu points here:

$(document).on('mousedown', "#navBiblGeoMarkers,#subNavBiblGeoMarkers",

Check static texts rendering

[] The project team is tasked with providing the intro texts and other static texts for the project.
[] Lev is going to implement rendering of static texts.

Check that the static texts render correctly.

initial setup misses menu / project configuration

Following the setup steps in README.md, the resulting installation does not have a menu, because the project router file seems to be missing.

the XHR call to http://localhost:8984/vicav/project -H 'Accept: application/xml, text/xml, /; q=0.01'

returns

Stopped at /home/dschopper/bin/basex/webapp/vicav-app/api-problem.xqm, 207/10:
[basex:restxq] Unexpected node: message="http://basex.org/restxq: Unexpected node: message=""err:FODC0002: Resource '/home/user/bin/basex/webapp/vicav-app/vicav_projects/projects.xml' does not exist."".".

Set up customized VICAV instance for SHAWI

Data and project specific customizations are in a dedicated content repository. See vicav-content and tunocent-content as reference.
We try to add the necessary additional data to shawi-data.
Deploying the SHAWI data instance is part of this repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.