Commit 29572529 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

Chinese does not get along well with rtfd.io

parent 536ff8d4
Loading
Loading
Loading
Loading
+13 −13
Original line number Original line Diff line number Diff line
csster的自我修养
Guidelines to developers
==============
========================


docstring
docstring
---------
---------


`csst`将使用numpy风格的docstring,参考链接: https://numpydoc.readthedocs.io/en/latest/format.html
We adopt the *numpy* style docstring (see: https://numpydoc.readthedocs.io/en/latest/format.html)


例如numpy.cos()函数的文档
An example: the docstring of numpy.cos()


.. code-block:: python
.. code-block:: python


@@ -33,11 +33,13 @@ docstring
        **kwargs
        **kwargs
            For other keyword-only arguments, see the
            For other keyword-only arguments, see the
            :ref:`ufunc docs <ufuncs.kwargs>`.
            :ref:`ufunc docs <ufuncs.kwargs>`.

        Returns
        Returns
        -------
        -------
        y : ndarray
        y : ndarray
            The corresponding cosine values.
            The corresponding cosine values.
            This is a scalar if `x` is a scalar.
            This is a scalar if `x` is a scalar.

        Notes
        Notes
        -----
        -----
        If `out` is provided, the function writes the result into it,
        If `out` is provided, the function writes the result into it,
@@ -46,6 +48,7 @@ docstring
        ----------
        ----------
        M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions.
        M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions.
        New York, NY: Dover, 1972.
        New York, NY: Dover, 1972.

        Examples
        Examples
        --------
        --------
         np.cos(np.array([0, np.pi/2, np.pi]))
         np.cos(np.array([0, np.pi/2, np.pi]))
@@ -73,6 +76,7 @@ docstring
        The broadcasting rules are:
        The broadcasting rules are:
        * Dimensions of length 1 may be prepended to either array.
        * Dimensions of length 1 may be prepended to either array.
        * Arrays may be repeated along dimensions of length 1.
        * Arrays may be repeated along dimensions of length 1.

        Parameters
        Parameters
        ----------
        ----------
        *x : array_like
        *x : array_like
@@ -92,6 +96,7 @@ docstring
            remain uninitialized.
            remain uninitialized.
        **kwargs
        **kwargs
            For other keyword-only arguments, see the :ref:`ufunc docs <ufuncs.kwargs>`.
            For other keyword-only arguments, see the :ref:`ufunc docs <ufuncs.kwargs>`.

        Returns
        Returns
        -------
        -------
        r : ndarray or tuple of ndarray
        r : ndarray or tuple of ndarray
@@ -107,14 +112,9 @@ docstring
`logging`
`logging`
---------
---------


利用 `logging` 模块代替print进行输出提示
Use `logging` module to print verbose info.



环境变量
-------

规定程序运行的环境变量



Environment variables
---------------------


Define some environment variables for testing.