meta.yaml 3.05 KB
Newer Older
Samuel GAIST's avatar
Samuel GAIST committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
{% set name = 'beat.web' %}
{% set project_dir = environ.get('RECIPE_DIR') + '/..' %}
{% set beat_examples_src = 'src/beat.examples' %}

package:
  name: {{ name }}
  version: {{ environ.get('BOB_PACKAGE_VERSION', '0.0.1') }}

build:
  number: {{ environ.get('BOB_BUILD_NUMBER', 0) }}
  run_exports:
    - {{ pin_subpackage(name) }}
  script:
    - cd {{ project_dir }}
    - python -m pip install --no-deps --ignore-installed -r requirements.txt
    {% if environ.get('BUILD_EGG') %}
    - python setup.py sdist --formats=zip
    {% endif %}
    - python setup.py install --single-version-externally-managed --record record.txt

requirements:
  host:
    - python {{ python }}
    - setuptools {{ setuptools }}
    - pip
  run:
    - python
    - setuptools
    - beat.core
    - oset
    - docopt
    - docutils
    - Jinja2
    - psycopg2
    - pytz
    - psutil
    - simplejson
    - matplotlib
    - pillow

test:
  source:
    - url: https://gitlab.idiap.ch/beat/beat.examples/repository/master/archive.tar.bz2
      folder: src
  requires:
    - bob-devel {{ bob_devel }}.*
    - beat-devel {{ beat_devel }}.*
    - bob.extension
    - beat.cmdline
    - nose
    - coverage
    - sphinx
    - sphinxcontrib-programoutput

  imports:
    - {{ name }}

  commands:
    - worker --help
    - export BEAT_EXAMPLE_ROOT={{ project_dir }}/3rdparty/
    - export COVERAGE_FILE=coverage.django
    - export NOSE_COVER_PACKAGE=beat.web
    - pushd {{ project_dir }}

    - mkdir -p $BEAT_EXAMPLE_ROOT
    - pushd $BEAT_EXAMPLE_ROOT

    - curl --silent "https://gitlab.idiap.ch/beat/beat.examples/repository/archive.tar.bz2?ref=master" > beat.examples.tar.bz2
    - mkdir -p {{ beat_examples_src }}
    - tar --strip-components=1 -C {{ beat_examples_src }} -xvjf beat.examples.tar.bz2
    - popd

    - rm -rf test.sql3
    - rm -rf test_prefix
    {% if environ.get('BEAT_DOCKER_TESTS', False)  %}
    - coverage run --source={{ project_dir }} manage.py test --settings=beat.web.settings.ci -v 2
    {% else %}
    - coverage run --source={{ project_dir }} manage.py test --settings=beat.web.settings.ci -v 2 --exclude-tag ".*test_docker.*"
    {% endif %}
    - export BEAT_CMDLINE_TEST_PLATFORM=django://beat.web.settings.ci
    - export COVERAGE_FILE=coverage.cmdline
    - export NOSE_WITH_COVERAGE=1
    - rm -rf test.sql3
    {% if environ.get('BEAT_DOCKER_TESTS', False)  %}
    - nosetests -sv beat.cmdline
    {% else %}
    - nosetests -sv --exclude=".*test_docker.*" beat.cmdline
    {% endif %}
    - unset COVERAGE_FILE

    - rm -r $BEAT_EXAMPLE_ROOT
    - python -m pip install --no-deps --ignore-installed -r test_requirements.txt
    - sphinx-build -aEb doctest {{ project_dir }}/doc/admin sphinx
    - sphinx-build -aEb doctest {{ project_dir }}/doc/api sphinx
    - sphinx-build -aEb doctest {{ project_dir }}/doc/user sphinx
    - conda inspect linkages -p $PREFIX {{ name }}  # [not win]
    - conda inspect objects -p $PREFIX {{ name }}  # [osx]
    - popd

about:
  home: https://www.idiap.ch/software/beat/
  license: AGPLv3
  summary: Web application for the BEAT platform
  license_family: AGPL