From 6823dc37ee7218882cd1f71f6fb3bf0ddadfd7ee Mon Sep 17 00:00:00 2001 From: "valentin.emiya" <valentin.emiya@lif.univ-mrs.fr> Date: Wed, 3 Jun 2020 16:55:28 +0200 Subject: [PATCH] update CI --- .gitlab-ci.yml | 6 ++---- python/tffpy/tf_tools.py | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d23c07b..16d0daf 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', str(Path(__file__.parent / 'data')); 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'))" - pytest-3 # generate the documentation @@ -25,9 +25,7 @@ pages: - pip3 install --no-deps . - python3 setup.py build_sphinx - 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', str(Path(__file__.parent / 'data')); config - - .write(open('/root/.config/tffpy.conf', 'w'))" + - 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'))" - cp -r build/sphinx/html public artifacts: paths: diff --git a/python/tffpy/tf_tools.py b/python/tffpy/tf_tools.py index 9baa89a..a3dd2d5 100755 --- a/python/tffpy/tf_tools.py +++ b/python/tffpy/tf_tools.py @@ -15,6 +15,28 @@ from tffpy.utils import plot_mask, plot_win def get_dgt_params(win_type, approx_win_len, hop, n_bins, phase_conv='freqinv', sig_len=None): + """ + Build dictionary of DGT parameter + + Parameters + ---------- + win_type : str + Window name, e.g. 'hann', 'gauss' + approx_win_len : int + Approximate window length for FIR windows and + hop : int + Hop size + n_bins : int + Number of frequency bins + phase_conv : + Phase convention + sig_len : int + Signal length + + Returns + ------- + + """ supported_wins = arg_firwin() | {'gauss'} msg = '{} not supported, try {}'.format(win_type, supported_wins) assert win_type in supported_wins, msg -- GitLab