Skip to content

Commit

Permalink
Merge branch 'release/0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
vnmabus committed Jul 23, 2020
2 parents 45227f2 + 4682552 commit f16ffb3
Show file tree
Hide file tree
Showing 158 changed files with 13,109 additions and 7,500 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,8 @@ ENV/

#IDE metadata
.idea/

pip-wheel-metadata/

# macOS DS_Store
.DS_Store
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ matrix:
- name: "Python 3.7.3 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install: choco install python
before_install:
- choco install python3 --version=3.7.3
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
- name: "Coverage and pep 8 tests on Python 3.7.1 on Xenial Linux"
python: 3.7 # this works for Linux but is ignored on macOS or Windows
Expand Down
39 changes: 20 additions & 19 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
scikit-fda: Functional Data Analysis in Python
===================================================

|python|_ |build-status| |docs| |Codecov|_ |PyPIBadge|_ |license|_
|python|_ |build-status| |docs| |Codecov|_ |PyPIBadge|_ |license|_ |doi|

Functional Data Analysis, or FDA, is the field of Statistics that analyses
data that depend on a continuous parameter.
Expand Down Expand Up @@ -44,37 +44,35 @@ Installation from source
It is possible to install the latest version of the package, available in the
develop branch, by cloning this repository and doing a manual installation.

.. code::
.. code:: bash
git clone https://github.com/GAA-UAM/scikit-fda.git
cd scikit-fda/
pip install -r requirements.txt # Install dependencies
python setup.py install
pip install ./scikit-fda
Make sure that your default Python version is currently supported, or change
the python and pip commands by specifying a version, such as ``python3.6``:

.. code::
.. code:: bash
git clone https://github.com/GAA-UAM/scikit-fda.git
cd scikit-fda/
python3.6 -m pip install -r requirements.txt # Install dependencies
python3.6 setup.py install
python3.6 -m pip install ./scikit-fda
Requirements
------------
*scikit-fda* depends on the following packages:

* `setuptools <https://github.com/pypa/setuptools>`_ - Python Packaging
* `cython <https://github.com/cython/cython>`_ - Python to C compiler
* `numpy <https://github.com/numpy/numpy>`_ - The fundamental package for scientific computing with Python
* `pandas <https://github.com/pandas-dev/pandas>`_ - Powerful Python data analysis toolkit
* `scipy <https://github.com/scipy/scipy>`_ - Scientific computation in Python
* `scikit-learn <https://github.com/scikit-learn/scikit-learn>`_ - Machine learning in Python
* `findiff <https://github.com/maroba/findiff>`_ - Finite differences
* `matplotlib <https://github.com/matplotlib/matplotlib>`_ - Plotting with Python
* `mpldatacursor <https://github.com/joferkington/mpldatacursor/>`_ - Interactive data cursors for matplotlib
* `multimethod <https://github.com/coady/multimethod>`_ - Multiple dispatch
* `numpy <https://github.com/numpy/numpy>`_ - The fundamental package for scientific computing with Python
* `pandas <https://github.com/pandas-dev/pandas>`_ - Powerful Python data analysis toolkit
* `rdata <https://github.com/vnmabus/rdata>`_ - Reader of R datasets in .rda format in Python
* `scikit-datasets <https://github.com/daviddiazvico/scikit-datasets>`_ - Scikit-learn compatible datasets
* `scikit-learn <https://github.com/scikit-learn/scikit-learn>`_ - Machine learning in Python
* `scipy <https://github.com/scipy/scipy>`_ - Scientific computation in Python
* `setuptools <https://github.com/pypa/setuptools>`_ - Python Packaging

The dependencies are automatically installed.

Expand All @@ -88,11 +86,11 @@ The people involved at some point in the development of the package can be
found in the `contributors
file <https://github.com/GAA-UAM/scikit-fda/blob/develop/THANKS.txt>`_.

Citation
========
If you find this project useful, please cite:
.. Citation
========
If you find this project useful, please cite:
.. todo:: Include citation to scikit-fda paper.
.. todo:: Include citation to scikit-fda paper.
License
=======
Expand All @@ -109,7 +107,7 @@ license_ can be found along with the code.
.. |build-status| image:: https://travis-ci.org/GAA-UAM/scikit-fda.svg?branch=develop
:alt: build status
:scale: 100%
:target: https://travis-ci.org/GAA-UAM/scikit-fda
:target: https://travis-ci.com/GAA-UAM/scikit-fda

.. |docs| image:: https://readthedocs.org/projects/fda/badge/?version=latest
:alt: Documentation Status
Expand All @@ -124,3 +122,6 @@ license_ can be found along with the code.

.. |license| image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
.. _license: https://github.com/GAA-UAM/scikit-fda/blob/master/LICENSE.txt

.. |doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3468127.svg
:target: https://doi.org/10.5281/zenodo.3468127
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3
0.4
2 changes: 1 addition & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
except TypeError:
pass

collect_ignore = ['setup.py']
collect_ignore = ['setup.py', 'docs/conf.py']

pytest.register_assert_rewrite("skfda")
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ clean:
rm -rf modules/misc/autosummary
rm -rf modules/ml/autosummary
rm -rf modules/ml/clustering/autosummary
rm -rf modules/inference/autosummary
rm -rf backreferences

.PHONY: html
Expand Down
2 changes: 1 addition & 1 deletion docs/_templates/autosummary/base.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ fullname | escape | underline}}
{{ objname | escape | underline}}

.. currentmodule:: {{ module }}

Expand Down
6 changes: 3 additions & 3 deletions docs/_templates/autosummary/class.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{{ fullname | escape | underline}}
{{ objname | escape | underline}}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}

{% block methods %}
.. automethod:: __init__

{% if methods %}
.. rubric:: Methods

Expand All @@ -15,6 +13,8 @@
~{{ name }}.{{ item }}
{%- endfor %}
{% endif %}

.. automethod:: __init__
{% endblock %}

{% block attributes %}
Expand Down
1 change: 1 addition & 0 deletions docs/apilist.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ API Reference
modules/datasets
modules/misc
modules/ml
modules/inference
53 changes: 48 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, '/home/miguel/Desktop/fda/fda')

import os
import sys
Expand Down Expand Up @@ -55,7 +52,8 @@
'sphinx_rtd_theme',
'sphinx_gallery.gen_gallery',
'sphinx.ext.intersphinx',
'sphinx.ext.doctest']
'sphinx.ext.doctest',
'jupyter_sphinx']

autodoc_default_flags = ['members', 'inherited-members']

Expand All @@ -79,7 +77,8 @@

# General information about the project.
project = 'scikit-fda'
copyright = '2017, Author'
copyright = ('2019, Grupo de Aprendizaje Automático - ' +
'Universidad Autónoma de Madrid')
author = 'Author'

# The language for content autogenerated by Sphinx. Refer to documentation
Expand Down Expand Up @@ -238,3 +237,47 @@
}

autosummary_generate = True


# Napoleon fix for attributes
# Taken from
# https://michaelgoerz.net/notes/extending-sphinx-napoleon-docstring-sections.html

# -- Extensions to the Napoleon GoogleDocstring class ---------------------
from sphinx.ext.napoleon.docstring import GoogleDocstring

# first, we define new methods for any new sections and add them to the class


def parse_keys_section(self, section):
return self._format_fields('Keys', self._consume_fields())


GoogleDocstring._parse_keys_section = parse_keys_section


def parse_attributes_section(self, section):
return self._format_fields('Attributes', self._consume_fields())


GoogleDocstring._parse_attributes_section = parse_attributes_section


def parse_class_attributes_section(self, section):
return self._format_fields('Class Attributes', self._consume_fields())


GoogleDocstring._parse_class_attributes_section = parse_class_attributes_section

# we now patch the parse method to guarantee that the the above methods are
# assigned to the _section dict


def patched_parse(self):
self._sections['keys'] = self._parse_keys_section
self._sections['class attributes'] = self._parse_class_attributes_section
self._unpatched_parse()


GoogleDocstring._unpatched_parse = GoogleDocstring._parse
GoogleDocstring._parse = patched_parse
74 changes: 67 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,78 @@
Welcome to scikit-fda's documentation!
======================================

This package offers classes, methods and functions to give support to
Functional Data Analysis in Python. Includes a wide range of utils to work with
functional data, and its representation, exploratory analysis, or
preprocessing, among other tasks such as inference, classification, regression
or clustering of functional data.

In the `project page <https://github.com/GAA-UAM/scikit-fda>`_ hosted by
Github you can find more information related to the development of the package.


.. toctree::
:includehidden:
:maxdepth: 4
:maxdepth: 2
:caption: Contents:
:titlesonly:

apilist


.. toctree::
:maxdepth: 1
:titlesonly:

auto_examples/index

Indices and tables
==================
An exhaustive list of all the contents of the package can be found in the
:ref:`genindex`.

Installation
------------

Currently, scikit-fda is available in Python 3.6 and 3.7, regardless of the
platform. The stable version can be installed via
`PyPI <https://pypi.org/project/scikit-fda/>`_:

.. code-block:: bash
pip install scikit-fda
It is possible to install the latest version of the package, available in
the develop branch, by cloning this repository and doing a manual installation.

.. code-block:: bash
git clone https://github.com/GAA-UAM/scikit-fda.git
pip install ./scikit-fda
In this type of installation make sure that your default Python version is
currently supported, or change the python and pip commands by specifying a
version, such as python3.6.


Contributions
-------------

All contributions are welcome. You can help this project grow in multiple ways,
from creating an issue, reporting an improvement or a bug, to doing a
repository fork and creating a pull request to the development branch.
The people involved at some point in the development of the package can be
found in the `contributors file
<https://github.com/GAA-UAM/scikit-fda/blob/develop/THANKS.txt>`_.

.. Citation
--------
If you find this project useful, please cite:
.. todo:: Include citation to scikit-fda paper.
License
-------

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
The package is licensed under the BSD 3-Clause License. A copy of the
`license <https://github.com/GAA-UAM/scikit-fda/blob/develop/LICENSE.txt>`_
can be found along with the code or in the project page.
4 changes: 2 additions & 2 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ REM Command file for Sphinx documentation
pushd %~dp0

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=python -msphinx
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
Expand Down Expand Up @@ -54,7 +54,7 @@ if "%1" == "clean" (

REM Check if sphinx-build is available
%SPHINXBUILD% 1>NUL 2>NUL
if errorlevel 1 (
if errorlevel 9009 (
echo.
echo.The Sphinx module was not found. Make sure you have Sphinx installed,
echo.then set the SPHINXBUILD environment variable to point to the full
Expand Down
2 changes: 2 additions & 0 deletions docs/modules/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The following functions are used to retrieve specific functional datasets:
skfda.datasets.fetch_medflies
skfda.datasets.fetch_weather
skfda.datasets.fetch_aemet
skfda.datasets.fetch_octane
skfda.datasets.fetch_gait

Those functions return a dictionary with at least a "data" field containing the
instance data, and a "target" field containing the class labels or regression values,
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/exploratory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ and visualize functional data.

exploratory/visualization
exploratory/depth
exploratory/outliers
exploratory/outliers
Loading

0 comments on commit f16ffb3

Please sign in to comment.