Giter Site home page Giter Site logo

cerndocumentserver / cds-videos Goto Github PK

View Code? Open in Web Editor NEW
15.0 16.0 32.0 77.27 MB

Access articles, reports and multimedia content in HEP

Home Page: https://videos.cern.ch

License: GNU General Public License v2.0

Python 63.15% JavaScript 9.81% CSS 2.61% HTML 18.52% Shell 0.67% XSLT 1.45% Dockerfile 0.16% RobotFramework 1.07% SCSS 2.56%
cds invenio python flask inveniosoftware digital-library digital-repository institutional-repository multimedia-repository multimedia-library

cds-videos's People

Contributors

costaflavio avatar ddaze avatar drjova avatar egabancho avatar greut avatar hachreak avatar ioandr avatar ioanungurean avatar jbenito3 avatar jeanyvescern avatar jirikuncar avatar jrcastro2 avatar kpsherva avatar lchrzaszcz avatar ludmilamarian avatar luizerko avatar nikofil avatar ntarocco avatar omelkonian avatar switowski avatar tiborsimko avatar topless avatar zzacharo avatar

Stargazers

 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

cds-videos's Issues

sprint: planning

  • infrastructure
    • puppet (#88)
    • fab.py (#89)
    • cds|cdslabs.cern
    • request EOS space (#90)
    • installation documentation (#70)
  • search
    • ES Schemas (#86)
    • Search (facets, sort) (#71)
    • Tests (#68)
  • files
    • files-rest enabled (#87) -> (PR #95)
    • previewer back-end (#92) -> (PR #93)
    • previewer front-end (#85)
    • list of files on detailed view (#84)
    • list of files on brief view (#84)
    • tests
  • interface
    • detailed view
    • home page
  • migration
    • migration files + metadata (#91)
    • EOS (#91)
    • tests

Installation problems on Ubuntu

$ npm install -g node-sass clean-css requirejs uglify-js

  • Must install npm (i.e. apt-get install npm), duh!
  • node-sass internally uses the node command instead of nodejs, which is an issue with NodeJS v4.2.6 at least, so a symlink is required (i.e. sudo ln -swhich nodejs/usr/bin/node)

$ mkvirtualenv cds3

  • Must install virtualenv (i.e. pip install virtualenv)
  • Must install virtualenvwrapper (i.e. pip install virtualenvwrapper)

(cds3) $ pip install -e .

  • When pip have missing precompiled .whl files for a package, it will compile its C component and try to find the required lib header files. Only debian linux distributions split lib-dev packages (for header files) from lib, therefore the following packages need to be individually installed.
    • libpg-dev
    • libjpeg-dev
    • libxml2-dev
    • libxslt-dev
    • libffi-dev

docker configuration problems

I tried to install cds from docker and I found some issues with ElasticSearch configuration:

  • The /tmp directory is not writable: JNA Warning: IOException removing temporary files: JNA temporary directory '/tmp' is not writable
  • (After previous problem is fixed) web and worker containers can't connect to ElasticSearch:
worker_1        | Test ES_PORT...tcp://172.17.0.148:9200...NO
web_1           | Test ES_PORT...tcp://172.17.0.148:9200...NO

sprint: planning

  • import 1.2 mil public records from CDS (Articles & Preprints, Books & Proc.) (#106) @egabancho
  • search results
    • preview of PDF (#133) @switowski
    • HB: fixed width, improved display of information, IIIF for thumbnails (#132, but without the access rights part, that probably we can drop anyway) @nikofil
    • enable MathJax @switowski
  • facets
  • error page (if time permits, maybe reuse the old one)
  • home page: replace chubicorn with CDS theme related image
  • OAuth @omelkonian

Prettify facets

Sometimes the text in the facet is too long and breaks the alignment, it would be nice to find a solution to that

We might also want to evaluate if include/exclude functionality should be added

python:3.5-slim fails to install lxml

After changing the basic image in docker from python:3.5 to python:3.5-slim, docker-compose build is failing because of:

gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Isrc/lxml/includes -I/usr/local/include/python3.5m -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-3.5/src/lxml/lxml.etree.o -w
    In file included from src/lxml/lxml.etree.c:320:0:
    src/lxml/includes/etree_defs.h:14:31: fatal error: libxml/xmlversion.h: No such file or directory
     #include "libxml/xmlversion.h"
                                   ^
    compilation terminated.
    Compile failed: command 'gcc' failed with exit status 1
    creating tmp
    cc -I/usr/include/libxml2 -c /tmp/xmlXPathInitmhwo1u2u.c -o tmp/xmlXPathInitmhwo1u2u.o
    /tmp/xmlXPathInitmhwo1u2u.c:1:26: fatal error: libxml/xpath.h: No such file or directory
     #include "libxml/xpath.h"
                              ^
    compilation terminated.
    *********************************************************************************
    Could not find function xmlCheckVersion in library libxml2. Is libxml2 installed?
    *********************************************************************************
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/local/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-9aj2a62m/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ud9ohti0-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-9aj2a62m/lxml/

After changing the image back to python:3.5 it works.
After manually checking the intermediate image, it seems that lxml is missing the libxml2-dev package.
@ddaze, did you have issues with that ?

Puppet and fabric additional improvements

  • Change the invenio log location (make sure that user cds has access to this path !)
  • Remove fabric tasks that are not used (like DB creation for MySQL)
  • Configure the deploy task to not delete log files (or other files we want to preserve)
  • Fabric: Fix deploy config task
  • Add supervisorctl config in puppet (otherwise, it's impossible to run supervisorctl command to manage services)
  • puppet - install flower
  • fix index create and index destroy tasks
  • Fix celery not receiving tasks

docker - custom aliases and packages per developer

I was wondering if there is an easy way to add a user-specific file with configuration for docker that would specify additional packages to be installed and some aliases/settings to be added to bashrc ?
For example, I would like to say that I want to have:
aliases: ll = ls -al and cd ..=..
packages: vim, less, etc. (vim should probably go the list of packages by default :)
and someone else would like to have his own aliases/packages, so this settings would stay outside of git.
The most convenient way I see this is to point docker to a location on my machine (for example to: ~/.aliases and ~/.docker_packages) and make docker process those two files if they exist.
If they don't exist, simply do nothing.
@ddaze any ideas ?

sprint: planning

front-end

  • Create field elements for (angular-schema-form)
    • Tabs
    • Progress Bar
    • Inherit button
    • Upload form for displaying the files
  • Schema for the form (0.5w) @drjova
  • Deposit with several records
  • Uploader (3w)
    • Upload files by url @nikofil #167
      • Support Dropbox @nikofil
      • Support CERNBox or (a text field for adding the url)
    • Upload by eos path
    • Upload by cds drop folder
  • Video submission progress (1w)
    • Overall Progress and status
      • Change the overall progress and action button depending on the videos status (i.e. Display Processing only if all videos have been uploaded)
      • Calculate the overall progress
    • Individual progress and status
      • Display the upload progress
      • Display the conversion progress by querying the conversion server
      • Display metadata validation
      • Display extra files uploading if needed

back-end

  • Publish records individually (ex. Publish only a specific video from the list)
  • Data model CERNDocumentServer/cds-dojson#19 (2w) @egabancho #179
  • Model validation (1w)
    • Flexible validation for each record individually
    • Only validate when the project record type is valid
  • DOI minting (0.2w)
  • Autocomplete for metadata fields (1.5w)
  • Read video headers to get any useful metadata (2w)
  • Download from url celery task (0.2w) @omelkonian
  • invenio-previewer preview videos with a configurable player (2w) @sourabhlal #186
  • report number generation inveniosoftware/invenio-pidstore#55 (2w) @omelkonian #187
  • record ID generation based on CDS record IDs (0.5w) @nikofil

conversion

  • Conversion server sub-format profiles (store the list)
  • Conversion server cli for cds (ex. cds conversion restart all)
  • Generate frames; ffmpeg (?) #191
  • Define API endpoints for the conversion server @switowski (current Sorenson challenges: CERNDocumentServer/cds-sorenson#1)
    • progress for each sub-format (2d)
    • error message by sub-format (i.e. High format has an error.) (2d)
    • Start process (2d)
      • start process for specific master file (2d)
      • start process for all master files (?) (2d)
    • Stop process (2d)
      • stop process for specific master file and each sub-formats (2d)
      • stop process for all master files and each sub-formats (2d)
    • Restart process (2d)
      • restart process for specific sub-format (2d)
      • restart process for all sub-formats of each master file (2d)
    • Get frames for the each video (1w)

`THEME_LOGO=None` breaks some templates

https://github.com/CERNDocumentServer/cds/blob/cdslabs/cds/config.py#L279

2016-06-07 11:24:10,216 ERROR: Exception on /login/ [GET] [in /opt/cds/lib/python2.7/site-packages/flask/app.py:1423]
Traceback (most recent call last):
  File "/opt/cds/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/cds/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/cds/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/cds/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/cds/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/cds/lib/python2.7/site-packages/flask_security/decorators.py", line 225, in wrapper
    return f(*args, **kwargs)
  File "/opt/cds/lib/python2.7/site-packages/flask_security/views.py", line 87, in login
    **_ctx('login'))
  File "/opt/cds/lib/python2.7/site-packages/flask_security/core.py", line 447, in render_template
    return render_template(*args, **kwargs)
  File "/opt/cds/lib/python2.7/site-packages/flask/templating.py", line 128, in render_template
    context, ctx.app)
  File "/opt/cds/lib/python2.7/site-packages/flask/templating.py", line 110, in _render
    rv = template.render(context)
  File "/opt/cds/lib/python2.7/site-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/opt/cds/lib/python2.7/site-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/cds/lib/python2.7/site-packages/invenio_oauthclient/views/../templates/invenio_oauthclient/login_user.html", line 27, in top-level template code
    {%- from "invenio_oauthclient/_macros.html" import oauth_button %}
  File "/opt/cds/lib/python2.7/site-packages/invenio_accounts/templates/invenio_accounts/login_user.html", line 27, in top-level template code
    {% from "invenio_accounts/_macros.html" import render_field, form_errors %}
  File "/opt/cds/lib/python2.7/site-packages/invenio_theme/templates/invenio_theme/page_cover.html", line 28, in top-level template code
    {%- set body_css_classes=['cover-page'] %}
  File "/opt/cds/src/cds/cds/modules/theme/templates/cds_theme/page.html", line 3, in top-level template code
    {%- set title = '%s | %s'|format(_(title), config.THEME_SITENAME) or 'CDS' -%}
  File "/opt/cds/lib/python2.7/site-packages/invenio_theme/templates/invenio_theme/page.html", line 73, in top-level template code
    {%- block body %}
  File "/opt/cds/lib/python2.7/site-packages/invenio_theme/templates/invenio_theme/page_cover.html", line 41, in block "body"
    {% block page_header %}
  File "/opt/cds/lib/python2.7/site-packages/invenio_theme/templates/invenio_theme/page_cover.html", line 45, in block "page_header"
    {%- block brand %}
  File "/opt/cds/lib/python2.7/site-packages/invenio_theme/templates/invenio_theme/page_cover.html", line 46, in block "brand"
    <a href="/"><img class="text-center masthead-brand" src="{{ url_for('static', filename=config.THEME_LOGO)}}" alt="{{_(config.THEME_SITENAME)}}" width="250px"/></a>
  File "/opt/cds/lib/python2.7/site-packages/flask/helpers.py", line 312, in url_for
    return appctx.app.handle_url_build_error(error, endpoint, values)
  File "/opt/cds/lib/python2.7/site-packages/flask/app.py", line 1641, in handle_url_build_error
    reraise(exc_type, exc_value, tb)
  File "/opt/cds/lib/python2.7/site-packages/flask/helpers.py", line 305, in url_for
    force_external=external)
  File "/opt/cds/lib/python2.7/site-packages/werkzeug/routing.py", line 1758, in build
    raise BuildError(endpoint, values, method, self)
BuildError: Could not build url for endpoint 'static'. Did you forget to specify values ['filename']?

Font missing

As adviced by CERN, you use PT Sans as a font on your frontend. But because it is not installed on most computers out there, it does not get loaded for most users. You should somehow load it as a webfont, e.g. by adding the following block to cds/base/tempates/page.html:

{%- block css %}
  {{ super() }}
  <link href=//fonts.googleapis.com/css?family=PT+Sans:400" rel="stylesheet" type="text/css">
{%- endblock css %}

Using Google fonts seems legit, because it is also used here: https://framework.web.cern.ch/framework/2.0/cern_toolbar/cern_toolbar-anonymous.html

mappings: new mapping for the Library

Our current library mapping is the default one too, it would be nice to have then separated so we can identify records that are not matching any of the mappings (cds-dojson needs to be updated accordingly)

Upload files by ` url`

Update the invenio-files-js and invenio-files-rest to upload videos from a URL. This will allow to use widgets from services like Dropbox on the uploader.

The tasks includes:

  • Handle the urls in the UI
  • Celery task with feedback for downloading the remote file
  • Integration with the existing file model in the invenio-files-js

sprint: planning

Migrator: migrate `bibdocfile.doctype`

We will need to override https://github.com/inveniosoftware/invenio-migrator/blob/master/invenio_migrator/records.py#L132 and maybe https://github.com/inveniosoftware/invenio-migrator/blob/master/invenio_migrator/records.py#L176 to port the document types https://github.com/inveniosoftware/invenio-migrator/blob/master/invenio_migrator/legacy/bibdocfile.py#L117

Probably we should also take a look at https://github.com/inveniosoftware/invenio-records-files/blob/master/invenio_records_files/api.py#L75

It might be a good opportunity to clean up a bit bibdoc.doctypes, so far we have 158 different types - select count(distinct doctype) from bibdoc;.

  • 37 of them have the suffix _FILES - select distinct doctype from bibdoc where doctype like '%_FILE';
  • 2089 don't have a type - select count(*) from bibdoc where doctype=''; - and 26501are NULL - select count(*) from bibdoc where doctype is NULL;
  • there are lowercase, uppercase, capitalized, with spaces, with _ ...
  • some of them are only used once - select distinct doctype, count(id) from bibdoc group by doctype order by count(id) desc;

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.