diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 719718817004da45302c2648d30b6e8de08cc49c..716012127200dfec2a0c7ff0d8a8d66b42fb6bed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -24,3 +24,4 @@ browser_test: - apt-get install -y locales > /dev/null - echo "en_US UTF-8" > /etc/locale.gen - locale-gen en_US.UTF-8 + - rm -rf ${CI_PROJECT_DIR}/sphinx diff --git a/conda/meta.yaml b/conda/meta.yaml index d8d7edd939292419db07136a9192228a3e83a46b..f5bcae2ecaefeb09b086cf4915b61375290a9e6f 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,5 +1,4 @@ {% set name = 'beat.editor' %} -{% set project_dir = environ.get('RECIPE_DIR') + '/..' %} package: name: {{ name }} @@ -13,11 +12,15 @@ build: - cd {{ environ.get('RECIPE_DIR') }}/js - npm install - npm run build - - cd {{ project_dir }} + - cd {{ environ.get('RECIPE_DIR') + '/..' }} {% if environ.get('BUILD_EGG') %} - python setup.py sdist --formats=zip {% endif %} - python setup.py install --single-version-externally-managed --record record.txt + # installs the documentation source, readme to share/doc so it is available + # during test time + - install -d "${PREFIX}/share/doc/{{ name }}" + - cp -R README.rst requirements.txt doc "${PREFIX}/share/doc/{{ name }}/" requirements: host: @@ -59,12 +62,12 @@ test: - beat editor --help - beat editor serve --help - nosetests --with-coverage --cover-package={{ name }} -sv {{ name }} - - if [ -n "${BEAT_BROWSER_TESTS}" ]; then cd {{ project_dir }}/conda/js; fi - - if [ -n "${BEAT_BROWSER_TESTS}" ]; then npm install; fi - - if [ -n "${BEAT_BROWSER_TESTS}" ]; then CHROMIUM_BIN=chromium-browser npm test; fi - - if [ -n "${BEAT_BROWSER_TESTS}" ]; then cd -; fi - - sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx - - sphinx-build -aEb doctest {{ project_dir }}/doc sphinx + - export CHROMIUM_BIN=chromium-browser + - if [ -n "${BEAT_BROWSER_TESTS}" ]; then pushd {{ environ.get('RECIPE_DIR') }}/js; npm install; npm test; popd; fi + - unset CHROMIUM_BIN + - sphinx-build -aEW ${PREFIX}/share/doc/{{ name }}/doc sphinx + - if [ -n "${CI_PROJECT_DIR}" ]; then mv sphinx "${CI_PROJECT_DIR}/"; fi + - sphinx-build -aEb doctest ${PREFIX}/share/doc/{{ name }}/doc sphinx - conda inspect linkages -p $PREFIX {{ name }} # [not win] - conda inspect objects -p $PREFIX {{ name }} # [osx] @@ -73,3 +76,4 @@ about: license: AGPLv3 summary: Local editor for BEAT objects license_family: AGPL + license_file: ../LICENSE.AGPL diff --git a/doc/conf.py b/doc/conf.py index 506e096b6e24c1da10b3f267b83b48c53980df3e..8432d8492679c5d63fd333690fac387181c0bf11 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,12 +1,9 @@ #!/usr/bin/env python -# vim: set fileencoding=utf-8 : +# -*- coding: utf-8 -*- import os -import sys -import glob import pkg_resources - # -- General configuration ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. @@ -58,7 +55,7 @@ autosummary_generate = True numfig = True # If we are on OSX, the 'dvipng' path maybe different -dvipng_osx = '/opt/local/libexec/texlive/binaries/dvipng' +dvipng_osx = '/Library/TeX/texbin/dvipng' if os.path.exists(dvipng_osx): pngmath_dvipng = dvipng_osx # Add any paths that contain templates here, relative to this directory. @@ -229,20 +226,25 @@ autodoc_default_flags = [ 'show-inheritance', ] +if not 'BOB_DOCUMENTATION_SERVER' in os.environ: + # notice we need to overwrite this for BEAT projects - defaults from Bob are + # not OK + os.environ['BOB_DOCUMENTATION_SERVER'] = "https://www.idiap.ch/software/beat/docs/beat/%(name)s/%(version)s/|https://www.idiap.ch/software/beat/docs/beat/%(name)s/master/" + # For inter-documentation mapping: from bob.extension.utils import link_documentation, load_requirements sphinx_requirements = "extra-intersphinx.txt" if os.path.exists(sphinx_requirements): intersphinx_mapping = link_documentation( additional_packages=['python','numpy'] + \ - load_requirements(sphinx_requirements) - ) + load_requirements(sphinx_requirements)) else: intersphinx_mapping = link_documentation() -# Adds simplejson, pyzmq links +# Adds simplejson, flask links intersphinx_mapping['http://simplejson.readthedocs.io/en/stable/'] = None -intersphinx_mapping['http://pyzmq.readthedocs.io/en/stable/'] = None +intersphinx_mapping['http://flask.pocoo.org/docs/'] = None +intersphinx_mapping['http://jinja.pocoo.org/docs/'] = None # We want to remove all private (i.e. _. or __.__) members # that are not in the list of accepted functions @@ -253,7 +255,8 @@ def member_function_test(app, what, name, obj, skip, options): if len(name) > 1 and name[0] == '_': # test if this private function should be allowed if name not in accepted_private_functions: - # omit privat functions that are not in the list of accepted private functions + # omit private functions that are not in the list of accepted private + # functions return skip else: # test if the method is documented