Git Product home page Git Product logo

dunya's Introduction

Dunya

Introduction

Dunya is a prototype being developed in the context of CompMusic, a research project that studies several world music traditions from the point of view of the information technologies, with the aim to facilitate the cataloging and discovery of music recordings within large repositories. For more information: http://compmusic.upf.edu

License

Dunya is Copyright 2013-2018 Music Technology Group - Universitat Pompeu Fabra

Dunya is released under the terms of the GNU Affero General Public License (v3 or later). See the COPYING file for more information.

If you would prefer to get a (non FOSS) commercial license, please contact us at [email protected]

Installation

First, create directories for pycompmusic (cloned from https://github.com/MTG/pycompmusic.git) and data (empty folder) somewhere outside the dunya folder.

Then, in the dunya directory, set the relevant environment variables to the absolute locations of these folders.

cp .env.in .env

Insert the actual absolute paths in .env

Using docker, run

docker-compose build

to build the relevant packages, and then run

docker-compose up

to start it.

Setup

Perform a database migration, and load fixture data

docker-compose run --rm web python3 manage.py migrate

docker-compose run --rm web python3 manage.py loaddata carnatic_form.json carnatic_raaga.json carnatic_instrument.json carnatic_taala.json data_initial_data.json docserver_groups.json docserver_sourcefiletype.json sites.json hindustani_form.json hindustani_laya.json hindustani_taal.json hindustani_instrument.json hindustani_raag.json makam_form.json makam_instrument.json makam_makam.json makam_usul.json jingju_roletype.json jingju_instrument.json jingju_shengqiangbanshi.json

Javascript

Install npm modules

docker-compose run --rm --user `id -u`:`id -g` -e HOME=/tmp web npm install

Build required js packages

docker-compose run --rm --user `id -u`:`id -g` web npm run build

Stylesheets

Compile less stylesheets

docker-compose run --rm --user `id -u`:`id -g` web sh build-less.sh

Updating Fixtures

Some data in Dunya should only rarely change (e.g., Raaga, Taala, Form, Location, Language lists). We store this data in fixtures, and it is automatically loaded when you create a new database. Fixure files are in fixtures/initial_data.json in the app (e.g., data and carnatic).

If you make a new fixture table, you can easily import data into it by creating a CSV file with the data in the first column and running

python tools/import_csv.py -t <fixturename> <csvfile>

You'll need to edit import_csv.py to tell it about your table. You should then dump the fixtures to file and commit them for other people to use (you'll need to edit the dumpfixture method in fabfile.py to tell it about the new fixture, too.

fab dumpfixture:carnatic

Development

To clear the database you can remove the postgres volume:

docker-compose down
docker volume rm dunya_dbvolume

Server configuration

Find an nginx configuration file in the admin/ directory.

Workers

Dunya must also be installed on worker machines to run remote processes. This machine will need access to the main database, configured in local_settings.py

Essentia should be installed into the virtual environment, /srv/dunya/env. The whole dunya directory should be owned by a user that has write permission to the directory. Celery should run as this user too.

You need to make sure that this user can connect to github via ssh. Either log in as the use and run ssh github.com, or use https.

The celery configuration should have a queue and hostname configured that are the same (-Q and -n). These settings are needed for remote control of a single worker. The machines must also listen on the standard celery queue for all other work.

[program:dunyacelery]
# We need to set the path to include the virtualenv so that e.g. essentia gets the right pythonpath
# Supervisor doesn't overwrite HOME or USER, so we need to add it so that os.path.expanduser works
# set LD_LIBRARY_PATH so the python module _essentia.so can find libessentia.so
environment=LANG='en_US.UTF-8',LC_ALL='en_US.UTF-8',PATH='/srv/dunya/env/bin:/usr/local/bin:/bin:/usr/bin',HOME='/home/dunya',USER='dunya',LD_LIBRARY_PATH='/srv/dunya/env/lib'
user=dunya
directory=/srv/dunya
command=/srv/dunya/env/bin/celery -A dunya -n kora worker -l info -Q kora,celery
redirect_stderr=true
stopasgroup=true
autorestart=true

One machine must listen on the import queue. This is used for processes that run from the dashboard.

dunya's People

Contributors

alastair avatar alia-morsi avatar andrebola avatar blazejkotowski avatar darad avatar dependabot[bot] avatar elcuban avatar giuband avatar hsercanatli avatar miguelgcasado avatar neomoha avatar oriolromani avatar robrib avatar sankalpg avatar sertansenturk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dunya's Issues

Make dunya open source

  • Audit code usage to make sure we have compatible licenses
  • Add any needed copyright information
  • Make repository public

Vertically align images in boxes

We should top-align artist images so that they're not chopped off, but we should center-align taala images because they're not very tall.

Also see if we can get higher-resolution taalaraaga images for the big box

Create log of who visits each page

We want to create a log of who visits each page in dunya. We should save user, date, page. We can use this information to see how people use dunya and also to make sure they're not doing anything bad with the data.
@arosado-mtg to confirm if we need to say that we save this data in a privacy disclaimer.

Do we store it in the django database or an external log server?

restrict signups

When people sign up, we want to ask them for their affiliation (i.e. their university). Do we want to verify all users manually? We could make new accounts inactive until we select a setting which lets them log in.

API to access collection information

Researchers need an API to access information about data in dunya. This information could include

  • Get raagas
  • Get taalas
  • Get instruments
  • Get works
  • Get recordings
  • Get concerts
  • Get artists
  • Concert detail (artists, recordings)
  • Raaga detail (artist, works, composers)
  • Taala detail (artist, works)
  • Work detail (composer, raaga, taala, recordings)
  • Artist detail (concerts, instruments, recordings [based on all relationships])
  • Instrument detail (artists)
  • Recording detail (artist [including rec rels, release rels, release artists, and the instrument], raaga, taala, work)

Recordings by raaga = raaga -> works -> recordings
Recordings by work = work -> recording list
Recordings by artist = artist -> recording list or artist -> concert list -> recording list
Works by artist = artist -> recording list -> work


  • Authentication (token)
  • Authorization ('researchers' can get api endpoints. staff can get audio). (or, any auth can get endpoints, researchers can get audio)

Gracefully fail if search server is down

If we can't access the solr server then we shouldn't show an error message. Instead, the parts of the page that don't work should have a small message saying to check back later.

Add navigation header

In the design we have a top header showing the navigation history from browse through each entity.

There are lots of questions about how this should work. Some ideas:

  • Plain breadcrumbs, based on a set structure
  • Navigation history based on where the user goes
  • What do we do if they open more than one tab?
  • What do we do if they go to an entity, then something else, then back to the same entity?
  • Where do we store history? (cookie, session data on server? local data storage)

Fix mini view (highlight, click to move)

  • Show a highlighted section on the mini view showing where the big view is
  • Show in a tooltip the point in time that the cursor is at over the mini view
  • Fix playback when you click to move/play
  • When you zoom then click, don't page through all the intermediate images until you get to the latest one

Make it easier to remove a filter

Currently you need to click the selected item. You should be able to click an [x] to completely remove a fitler.
Also, if you click the filter type in the left menu, this should do the same as the [x]

Currently, if you hide a filter, then show it again, the list of what's selected and what's visually selected is out of sync (e.g. it is selected in the datastructure but not visible - if you click again to 'select' it, it's remove from the datastructure)

Make taala boxes 2x wide

see #26
For longer taalas we should show them 2x as wide on the taala page, and in a box that can expand to 2x wide when you click (+) in other views. This lets us show more detail without shrinking the height.

Organise CSS better

Currently 1 file with 2500 lines. Split into interface and separate pages.

Write checkers for Andalusian music

Work out what things we need to check on andalusian music and what checkers we can reuse from carnatic.
Import into dashboard for people to check errors

New research elements on recording page

Placeholder for new research elements on recording page (not music culture specific).
Add to the list

  • Motifs and patterns (CM, HM, BO)
  • Sections (MMT, CM, HM, BO)
  • Lyrics (MMT, CM, AM)
  • Scores (MMT, CM Varnams, AM)

Write checkers for Makam music

Work out what things we need to check on makam music (usul, makam, etc) and what checkers we can reuse from carnatic.
Import into dashboard for people to check errors

On browse, only show some results until you ask for more

If a search for raaga (e.g.) shows more than 10 artists, only show some of them. We need a way to see the rest of the artists though. Maybe a [More-->] button like on Google+, or results paging, or when you click on the numbers between the query and results.

Tonic voting

We currently get some tonic values from @gopalkoduri's curated data and compute the rest. In order to improve tonic estimation we should implement the tonic voting system for all recordings where the tonic is computed.

This should be re-implemented as a pycompmusic module that we can run on the cluster. Some consideration will need to be given as to how we go from recording -> artist -> all recordings without redoing the same queries too many times.

Maybe use redis as a cache. Implement this as a generic service for modules. Make sure we use the api to get related data.

Filter browse lists by text

Add a text search box to all filters to more quickly find an item. The box should be either at the top of the list, or floating and always visible.

We can do the search in javascript for now - just do substring match. Show results still in alphabetical order.

In the future we could do longest subsequence, and fuzzy matching too.

Python library for accessing collection information

We need a python interface for getting the data in #40. It should abstract out all of the HTTP request access.

  • Get raagas
  • Get taalas
  • Get instruments
  • Get works
  • Get recordings
  • Get concerts
  • Get artists
  • Concert detail
  • Raaga detail
  • Taala detail
  • Artist detail
  • Work detail
  • Instrument detail
  • Recording detail
  • Do auth

The interface should also let us get derived data from the docserver (e.g., tonic, melody, beats, images...)

  • Get modules
  • Get modules for recording
  • Get module parts for rec/module
  • Get versions for rec/mod/part
  • Get data
  • Download mp3 with name
  • Download concert with names
  • Download all audio by artist with name

Searching forms (and similar attributes)

I tried to search a form (varnam) by simply writing it to the search bar, and it did not return any result. Can we make the search bar do a search on forms and similar attributes?

screenshot 2014-01-08 18 07 56

Gracefully handle missing or unloaded data

Handle situations where we are missing either the images or the pitch/rhythm data. If one of them is missing do we show the other, or an error message? If the data fails to load do we retry or show an error message?

Hindustani version of Dunya

Some of the major changes to Dunya for Hindustani release. Please add to the list and assign it to Hindustani Release milestone.

Entities

  • Concert -> Album/Release
  • Multiple raags/taals in each recording
  • Section Information from MusicBrainz

Password reset

Currently there's no way for a user to reset their password.

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.