diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52e024a4478c103b413275d5487ff16e48892fcc..a1d727dce9c2d87992e2110aa716f8113b5028e0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,13 @@ # run the test suite - tests: image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04 tags: - docker script: - - pip3 install . --no-deps + - pip3 install --no-deps . - pytest-3 - # generate the documentation - pages: image: registry.gitlab.lis-lab.fr:5005/skmad-suite/madarrays/ubuntu:18.04 tags: @@ -18,7 +15,7 @@ pages: only: - master script: - - pip3 install . --no-deps + - pip3 install --no-deps . - python3 setup.py build_sphinx - cp -r build/sphinx/html public artifacts: diff --git a/doc/conf.py b/doc/conf.py index db08bb74a0b8b04aa235481c086f27abc40efd80..a1699d94d99a71e677a0263e5e04b9a54f86d0f1 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -25,7 +25,6 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', - 'sphinx_paramlinks', 'numpydoc', 'nbsphinx', 'IPython.sphinxext.ipython_console_highlighting', @@ -48,7 +47,7 @@ master_doc = 'index' # General information about the project. project = 'madarrays' -author = 'V. Emiya and R. Hamon' +author = 'V. Emiya, R. Hamon, F. Jaillet' copyright = '2017-{}, {}'.format(date.today().year, author) # The version info for the project you're documenting, acts as replacement for @@ -217,7 +216,7 @@ latex_elements = { # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'madarray.tex', 'madarray Documentation', - 'V. Emiya, R. Hamon.', 'manual'), + 'V. Emiya, R. Hamon., F. Jaillet', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/docker/Dockerfile_ubuntu_18.04 b/docker/Dockerfile_ubuntu_18.04 index dedc3fb2b7d6dae814944e8a9e82516e5942f33e..faab03fcf5b0476f7634bff4265fefa6b38f500d 100644 --- a/docker/Dockerfile_ubuntu_18.04 +++ b/docker/Dockerfile_ubuntu_18.04 @@ -4,7 +4,7 @@ WORKDIR / ENV DEBIAN_FRONTEND noninteractive # In the following "apt-get install ..." command, cmake, make, g++, # libfftw3-dev, and liblapack-dev are not needed for madarrays but are added -# to be able to install ltfatpy via pip +# to be able to install ltfatpy in the container via pip RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ @@ -25,7 +25,6 @@ RUN apt-get update && \ python3-pytest \ python3-pytest-cov \ python3-sphinx \ - python3-sphinx-paramlinks \ python3-numpydoc \ python3-nbsphinx \ jupyter-client \ diff --git a/madarrays/mad_array.py b/madarrays/mad_array.py index c18200cf58b53bb1401065aa571189efcc026234..d501dd24a72867852c5ec53004252acf0c463508 100644 --- a/madarrays/mad_array.py +++ b/madarrays/mad_array.py @@ -116,8 +116,8 @@ class MadArray(np.ndarray): whose entries are equal to True if the corresponding data entry is masked, or False otherwise. - This is the default mode and the mode selected when specifying - :paramref:`mask` during creation. + This is the default mode and the mode selected when specifying ``mask`` + during creation. * Complex entries can have only the magnitude or phase component masked, or both. The resulting mask has integers entries, equal to: @@ -129,13 +129,12 @@ class MadArray(np.ndarray): * *3* if the magnitude and the phase are masked (unknown magnitude and phase). - This mode is selected when specifying :paramref:`mask_magnitude` and/or - :paramref:`mask_phase` during creation. + This mode is selected when specifying ``mask_magnitude`` and/or + ``mask_phase`` during creation. Entries are converted to a complex type. - If entries are complex values and :paramref:`mask` is given during - creation, both the magnitude and phase are masked and the boolean mask - mode is used. + If entries are complex values and ``mask`` is given during creation, both + the magnitude and phase are masked and the boolean mask mode is used. .. _indexing_madarray: @@ -145,35 +144,34 @@ class MadArray(np.ndarray): * a :class:`MadArray` object with shape corresponding to the indices is returned, with both the data matrix and the mask properly indexed. This is the default mode; - * a :class:`MadArray` object with unchanged shape is returned, - where non-indexed entries are set as masked. This mode is selected by - setting the parameter :paramref:`masked_indexing` to True. + * a :class:`MadArray` object with unchanged shape is returned, where + non-indexed entries are set as masked. This mode is selected by setting + the parameter ``masked_indexing`` to True. .. _numpy_behaviour_madarray: **Numpy behaviour**: it is possible to use standard operations (+, -, /, //, \*, T) between two :class:`MadArray` objects, likewise operations - between numpy - arrays. The resulting object has a mask consisting of the union of the - operands. It is also possible to use pickle operations to jointly store the - data and the mask. + between numpy arrays. The resulting object has a mask consisting of the + union of the operands. It is also possible to use pickle operations to + jointly store the data and the mask. Parameters ---------- data : array_like Multidimensional array. See :ref:`Type of Entry<type_entry_madarray>`. mask : boolean array_like, optional - Mask for boolean masking mode. See - :ref:`Masking<masking_madarray>`. + Mask for boolean masking mode. + See :ref:`Masking<masking_madarray>`. mask_magnitude : boolean array_like or None, optional - Magnitude mask for masking with complex data. See - :ref:`Masking<masking_madarray>`. + Magnitude mask for masking with complex data. + See :ref:`Masking<masking_madarray>`. mask_phase : boolean or array_like or None, optional - Phase mask for masking with complex data. See - :ref:`Masking<masking_madarray>`. + Phase mask for masking with complex data. + See :ref:`Masking<masking_madarray>`. masked_indexing : bool or None, optional - Indicate how the indexing is performed. If None, set to False. See - :ref:`Indexing<indexing_madarray>`. + Indicate how the indexing is performed. If None, set to False. + See :ref:`Indexing<indexing_madarray>`. Warnings -------- @@ -189,7 +187,7 @@ class MadArray(np.ndarray): Notes ----- This class implements an alternative masked array different from - :class:`np.ma.MaskedArray`. The reason of this choice is that it is only + :class:`numpy.ma.MaskedArray`. The reason of this choice is that it is only used as a container of a ndarray and a mask. No masked operations are needed. """ @@ -385,8 +383,7 @@ class MadArray(np.ndarray): """Number of missing data (double or tuple). Number of masked coefficients if dtype is int or float. Number of - masked coefficients in phase and magnitude masks if dtype is - complex. + masked coefficients in phase and magnitude masks if dtype is complex. """ if self._complex_masking: return (np.sum(self.get_unknown_mask('magnitude')), @@ -399,8 +396,7 @@ class MadArray(np.ndarray): """Ratio of missing data (double or tuple). Ratio of masked coefficients if dtype is int or float. Ratio of - masked coefficients in phase and magnitude masks if dtype is - complex. + masked coefficients in phase and magnitude masks if dtype is complex. """ if self._complex_masking: return (np.average(self.get_unknown_mask('magnitude')), @@ -415,16 +411,16 @@ class MadArray(np.ndarray): def to_np_array(self, fill_value=None): """Return a numpy array. - If :paramref:`fill_value` is not None, masked elements are replaced - according to the type of entries: + If ``fill_value`` is not None, masked elements are replaced according + to the type of entries: - * :paramref:`fill_value` if the type of entries is *int* or *float*; + * ``fill_value`` if the type of entries is *int* or *float*; * If the type is *complex*, missing entries are replaced either by: * a complex number with the known magnitude value without the phase information if only the phase is masked; * a complex number of magnitude 1 with the known phase if only the magnitude is masked; - * by :paramref:`fill_value` if both magnitude and phase are masked. + * by ``fill_value`` if both magnitude and phase are masked. Parameters ---------- diff --git a/madarrays/waveform.py b/madarrays/waveform.py index 3bed1d6f3ec9f73682410998c80017ec0fc8dfd5..854baf05d0586b58a36d5e297c7bd6b9139b56a2 100644 --- a/madarrays/waveform.py +++ b/madarrays/waveform.py @@ -136,11 +136,11 @@ class Waveform(MadArray): [N, 2]-shape array for a stereo signal fs : int or float, optional Sampling frequency of the original signal, in Hz. If float, truncated. - If None and :paramref:`data` is a Waveform, use `data.fs`, otherwise it + If None and ``data`` is a Waveform, use ``data.fs``, otherwise it is set to 1. mask : nd-array, optional Boolean mask with True values for missing samples. Its shape must be - the same as :paramref:`data`. + the same as ``data``. indexing : See :class:`MadArray`. """ diff --git a/requirements/doc.txt b/requirements/doc.txt index 88f5dc8239412107b6242808b0dde514e2935324..97d1e46a0562693529e73ddaa62b935627b886bb 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -4,4 +4,3 @@ sphinx nbsphinx numpydoc jupyter -sphinx-paramlinks diff --git a/setup.py b/setup.py index 8cc0ef42600e71b75cab7aebfd551b555524eca2..4f604613cb0076f493e99bb6d9938acdb59473f3 100644 --- a/setup.py +++ b/setup.py @@ -73,7 +73,7 @@ CLASSIFIERS = [ PYTHON_REQUIRES = '>=3.5' EXTRAS_REQUIRE = { 'dev': ['coverage', 'pytest', 'pytest-cov', 'pytest-randomly', 'ipython'], - 'doc': ['sphinx', 'nbsphinx', 'numpydoc', 'sphinx-paramlinks']} + 'doc': ['sphinx', 'nbsphinx', 'numpydoc']} PROJECT_URLS = {'Bug Reports': URL + '/issues', 'Source': URL} KEYWORDS = 'audio, data structures, missing data'