diff --git a/python/README.rst b/python/README.rst index e82e6cac2cef2e9ebac746d84a7b372a63e07cf2..b17c8f86e7ec9708c6c6ee0133a283da25130832 100755 --- a/python/README.rst +++ b/python/README.rst @@ -1,11 +1,10 @@ tffpy ===== -tffpy: a Python package for time-frequency fading using Gabor multipliers - -See paper - *Time-frequency fading algorithms based on Gabor multipliers* - by A. Marina Krémé, Valentin Emiya, Caroline Chaux and Bruno Torré́sani, 2020. +:py:mod:tffpy: is a Python package for time-frequency fading using Gabor +multipliers based on the work in paper *Time-frequency fading algorithms +based on Gabor multipliers* by A. Marina Krémé, Valentin Emiya, Caroline +Chaux and Bruno Torré́sani, 2020. Install ------- @@ -14,6 +13,14 @@ Install the current release with ``pip``:: pip install tffpy +Download the data from `this link <https://gitlab.lis-lab +.fr/skmad-suite/tff2020/-/tree/master/data>`. + +Then run function :py:fun:tffpy.utils.generate_config(): in order to create +a configuration file and modify it to specify the path to your data folder. +The location of the configuration file is given by function +:py:fun:tffpy.utils.get_config_file():. + For additional details, see doc/install.rst. Usage @@ -51,7 +58,7 @@ Contributors ------------ * `Valentin Emiya <mailto:valentin.emiya@lis-lab.fr>`_ -* `Ama Marina Kreme <mailto:ama-marina.kreme@lis-lab.fr`_ +* `Ama Marina Krémé <mailto:ama-marina.kreme@lis-lab.fr>`_ License ------- diff --git a/python/doc/README.md b/python/doc/README.md index 9aeb610d485fb204bdc866384c8d16e5f7a3550f..de04427ccdb853e1b5aafc05ee4ccaccccc6949e 100755 --- a/python/doc/README.md +++ b/python/doc/README.md @@ -1,6 +1,6 @@ If you only want to get the documentation, note that a pre-built version for the latest release is available -[online](http://templates.pages.lis-lab.fr/tffpy/). +[online](http://skmad-suite.pages.lis-lab.fr/tffpy/). Sphinx is used to generate the API and reference documentation. diff --git a/python/doc/installation.rst b/python/doc/installation.rst index 3422e4dbee0a95fce9b7adaf90ead42b2184658f..ae8b1e5665b14e8ecb3b2a50ab9b83b516d84ba6 100755 --- a/python/doc/installation.rst +++ b/python/doc/installation.rst @@ -1,10 +1,19 @@ Installation ############ -``tffpy`` requires the following packages: +``tffpy`` requires the following packages, which will be automatically +installed with ``tffpy`` using ``pip``: -* `python >= 3.5 <https://wiki.python.org/moin/BeginnersGuide/Download>`_ +* `python >= 3.6 <https://wiki.python.org/moin/BeginnersGuide/Download>`_ * `numpy >= 1.13 <http://www.numpy.org>`_ +* `scipy <https://www.scipy.org/>`_ +* `matplotlib <https://matplotlib.org/>`_ +* `pandas <https://pandas.pydata.org/>`_ +* `xarray <https://xarray.pydata.org/>`_ +* `ltfatpy <http://dev.pages.lis-lab.fr/ltfatpy/>`_ +* `skpomade <http://valentin.emiya.pages.lis-lab.fr/skpomade/>`_ +* `yafe <http://skmad-suite.pages.lis-lab.fr/yafe/>`_ +* `madarrays <https://gitlab.lis-lab.fr/skmad-suite/madarrays>`_ Make sure your Python environment is properly configured. It is recommended to install ``tffpy`` in a virtual environment. @@ -30,13 +39,23 @@ into your user directory using the ``--user`` flag:: pip install --user tffpy Alternatively, you can manually download ``tffpy`` from its `GitLab project -<https://gitlab.lis-lab.fr/templates/python-package-template>`_ or `PyPI +<https://gitlab.lis-lab.fr/skmad-suite/tff2020>`_ or `PyPI <https://pypi.python.org/pypi/tffpy>`_. To install one of these versions, unpack it and run the following from the top-level source directory using the Terminal:: pip install . +Dataset installation +-------------------- +Download the data from `this link <https://gitlab.lis-lab +.fr/skmad-suite/tff2020/-/tree/master/data>`_. + +Then run function :py:func:`tffpy.utils.generate_config` in order to create +a configuration file and modify it to specify the path to your data folder. +The location of the configuration file is given by function +:py:func:`tffpy.utils.get_config_file`. + Development version ------------------- @@ -50,7 +69,7 @@ standard version of ``tffpy`` using ``pip``:: Clone the Git repository:: - git clone git@gitlab.lis-lab.fr:templates/python-package-template.git + git clone git@gitlab.lis-lab.fr:skmad-suite/tff2020.git cd tffpy You may also need to install required packages:: diff --git a/python/setup.py b/python/setup.py index 1cfbd5dff2cfe2c75a50a7574bbf14dd63914c14..0f212e9f5acff9323da070610a3c92abe11143a9 100755 --- a/python/setup.py +++ b/python/setup.py @@ -8,7 +8,7 @@ import sys NAME = 'tffpy' DESCRIPTION = 'Time-frequency fading using Gabor multipliers' LICENSE = 'GNU General Public License v3 (GPLv3)' -URL = 'https://gitlab.lis-lab.fr/templates/{}'.format(NAME) +URL = 'https://gitlab.lis-lab.fr/skmad-suite/{}'.format(NAME) AUTHOR = 'Valentin Emiya, Ama Marina Kreme' AUTHOR_EMAIL = ('valentin.emiya@lis-lab.fr, ' 'ama-marina.kreme@lis-lab.fr') diff --git a/python/tffpy/utils.py b/python/tffpy/utils.py index 7771632cd7410f3eebbeb46f6104abfb2bc310a9..82b06edd7ea0cb55e5afa7306ac6b053c9b06bc7 100755 --- a/python/tffpy/utils.py +++ b/python/tffpy/utils.py @@ -82,9 +82,11 @@ def generate_config(): config.add_section('DATA') config.set('DATA', '# path to data') config.set('DATA', 'data_path', '/to/be/completed/tffpy/data') - - with open(get_config_file(), 'w') as config_file: + config_file = get_config_file() + with open(config_file, 'w') as config_file: config.write(config_file) + print('Configuration file created: {}. Please update it with your data ' + 'path.'.foramt(config_file)) def get_data_path():