Coder Social home page Coder Social logo

aircraft-operations-lab / metintos Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 8.55 MB

Meteorological Interpolation Toolbox for Optimization and Simulation

Home Page: https://metintos.readthedocs.io/en/latest/

License: GNU Lesser General Public License v3.0

Python 100.00%
fmp-met meteo interpolation

metintos's People

Contributors

javiergarciaheras avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

metintos's Issues

Add aditional information in every function

The documentation has to include more description en every function or at least the main ones like this (https://thomas-cokelaer.info/tutorials/sphinx/docstring_python.html):

``python
"""This module illustrates how to write your docstring in OpenAlea
and other projects related to OpenAlea."""

license = "Cecill-C"
revision = " $Id: actor.py 1586 2009-01-30 15:56:25Z cokelaer $ "
docformat = 'reStructuredText'

class MainClass1(object):
"""This class docstring shows how to use sphinx and rst syntax

The first line is brief explanation, which may be completed with 
a longer one. For instance to discuss about its methods. The only
method here is :func:`function1`'s. The main idea is to document
the class and methods's arguments with 

- **parameters**, **types**, **return** and **return types**::

      :param arg1: description
      :param arg2: description
      :type arg1: type description
      :type arg1: type description
      :return: return description
      :rtype: the return type description

- and to provide sections such as **Example** using the double commas syntax::

      :Example:

      followed by a blank line !

  which appears as follow:

  :Example:

  followed by a blank line

- Finally special sections such as **See Also**, **Warnings**, **Notes**
  use the sphinx syntax (*paragraph directives*)::

      .. seealso:: blabla
      .. warnings also:: blabla
      .. note:: blabla
      .. todo:: blabla

.. note::
    There are many other Info fields but they may be redundant:
        * param, parameter, arg, argument, key, keyword: Description of a
          parameter.
        * type: Type of a parameter.
        * raises, raise, except, exception: That (and when) a specific
          exception is raised.
        * var, ivar, cvar: Description of a variable.
        * returns, return: Description of the return value.
        * rtype: Return type.

.. note::
    There are many other directives such as versionadded, versionchanged,
    rubric, centered, ... See the sphinx documentation for more details.

Here below is the results of the :func:`function1` docstring.

"""

def function1(self, arg1, arg2, arg3):
    """returns (arg1 / arg2) + arg3

    This is a longer explanation, which may include math with latex syntax
    :math:`\\alpha`.
    Then, you need to provide optional subsection in this order (just to be
    consistent and have a uniform documentation. Nothing prevent you to
    switch the order):

      - parameters using ``:param <name>: <description>``
      - type of the parameters ``:type <name>: <description>``
      - returns using ``:returns: <description>``
      - examples (doctest)
      - seealso using ``.. seealso:: text``
      - notes using ``.. note:: text``
      - warning using ``.. warning:: text``
      - todo ``.. todo:: text``

    **Advantages**:
     - Uses sphinx markups, which will certainly be improved in future
       version
     - Nice HTML output with the See Also, Note, Warnings directives


    **Drawbacks**:
     - Just looking at the docstring, the parameter, type and  return
       sections do not appear nicely

    :param arg1: the first value
    :param arg2: the first value
    :param arg3: the first value
    :type arg1: int, float,...
    :type arg2: int, float,...
    :type arg3: int, float,...
    :returns: arg1/arg2 +arg3
    :rtype: int, float

    :Example:

    >>> import template
    >>> a = template.MainClass1()
    >>> a.function1(1,1,1)
    2

    .. note:: can be useful to emphasize
        important feature
    .. seealso:: :class:`MainClass2`
    .. warning:: arg2 must be non-zero.
    .. todo:: check that arg2 is non zero.
    """
    return arg1/arg2 + arg3

if name == "main":
import doctest
doctest.testmod()
``

Add cv2 dependency to the project

opencv-python should be added as a dependency, now if you run pip install metintos you cannot use it because optical flow needs cv2 and so you have to install it.

Add some description before calling the function to read the comment in py files

Add description before presenting the comment in the functions in documentation/code.md

Optical Flow

include here some description about optical flow

.. automodule:: metintos.flow_tuning
:members: add_times_to_steps_sources_targets, add_steps_to_times_sources_targets, filter_dims, evaluate_flow_on_dataset, evaluate_flow_on_dataset_norms, optimize_flow

.. autodata:: metintos.flow_tuning.TimeSelector

.. automodule:: metintos.optiflow
:members:
:special-members: init, call

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.