From 7b6f53b120761a2def6783460bc22a6d51b3cc18 Mon Sep 17 00:00:00 2001 From: "valentin.emiya" <valentin.emiya@lif.univ-mrs.fr> Date: Wed, 3 Jun 2020 18:04:15 +0200 Subject: [PATCH] update CI --- .gitlab-ci.yml | 4 ++-- python/doc/conf.py | 1 + python/tffpy/tf_tools.py | 19 +++++++++++++++---- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16d0daf..8a0924b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ tests: - pip3 install --no-deps . - python3 -c "from tffpy.utils import generate_config; generate_config()" - pwd - - python3 -c "from configparser import ConfigParser; from pathlib import Path; config.read('/root/.config/tffpy.conf'); config.set('DATA', 'data_path', '/builds/skmad-suite/tff2020/data'); config.write(open('/root/.config/tffpy.conf', 'w'))" + - python3 -c "from configparser import ConfigParser; from pathlib import Path; config = ConfigParser(); config.read('/root/.config/tffpy.conf'); config.set('DATA', 'data_path', '/builds/skmad-suite/tff2020/data'); config.write(open('/root/.config/tffpy.conf', 'w'))" - pytest-3 # generate the documentation @@ -25,7 +25,7 @@ pages: - pip3 install --no-deps . - python3 setup.py build_sphinx - python3 -c "from tffpy.utils import generate_config; generate_config()" - - python3 -c "from configparser import ConfigParser; from pathlib import Path; config.read('/root/.config/tffpy.conf'); config.set('DATA', 'data_path', '/builds/skmad-suite/tff2020/data'); config.write(open('/root/.config/tffpy.conf', 'w'))" + - python3 -c "from configparser import ConfigParser; from pathlib import Path; config = ConfigParser(); config.read('/root/.config/tffpy.conf'); config.set('DATA', 'data_path', '/builds/skmad-suite/tff2020/data'); config.write(open('/root/.config/tffpy.conf', 'w'))" - cp -r build/sphinx/html public artifacts: paths: diff --git a/python/doc/conf.py b/python/doc/conf.py index 1ec78b6..a606660 100755 --- a/python/doc/conf.py +++ b/python/doc/conf.py @@ -274,6 +274,7 @@ intersphinx_mapping = { 'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None), 'skpomade': ('http://valentin.emiya.pages.lis-lab.fr/skpomade/', None), 'yafe': ('http://skmad-suite.pages.lis-lab.fr/yafe/', None), + 'ltfatpy': ('http://dev.pages.lis-lab.fr/ltfatpy/', None), } # Allow errors in notebook diff --git a/python/tffpy/tf_tools.py b/python/tffpy/tf_tools.py index a3dd2d5..c7f71e2 100755 --- a/python/tffpy/tf_tools.py +++ b/python/tffpy/tf_tools.py @@ -18,24 +18,35 @@ def get_dgt_params(win_type, approx_win_len, hop, n_bins, """ Build dictionary of DGT parameter + The output dictionary `dgt_params` is composed of: + + * dgt_params['win'] : the window array (nd-array) + * dgt_params['hop'] : the hop size (int) + * dgt_params['n_bins'] : the number of frequency bins (int) + * dgt_params['input_win_len'] : the effective window length (input window + length rounded to the nearest power of two). + * dgt_params['phase_conv'] : the phase convention 'freqinv' or 'timeinv', + see `pt` argument in :py:func:`ltfatpy.gabor.dgtreal` + Parameters ---------- win_type : str - Window name, e.g. 'hann', 'gauss' + Window name, e.g. 'hann', 'gauss' (see :py:func:`ltfatpy.arg_firwin`) approx_win_len : int - Approximate window length for FIR windows and + Approximate window length hop : int Hop size n_bins : int Number of frequency bins - phase_conv : + phase_conv : 'freqinv' or 'timeinv' Phase convention sig_len : int Signal length Returns ------- - + dict + DGT parameters (see above) """ supported_wins = arg_firwin() | {'gauss'} msg = '{} not supported, try {}'.format(win_type, supported_wins) -- GitLab