From 6b58a27c8df19a74c08c4020d2893cb553a30b5f Mon Sep 17 00:00:00 2001 From: Filipe Date: Wed, 16 May 2018 16:27:18 -0400 Subject: [PATCH] Install docs (#47) * add pytest cache dir to .gitignore * installing instructions * move cython to development instructions * review actions * sytle changes to index.html --- .gitignore | 1 + docs/api.rst | 7 +++++++ docs/index.rst | 11 ++++++----- docs/installing.rst | 42 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 56 insertions(+), 5 deletions(-) create mode 100644 docs/api.rst create mode 100644 docs/installing.rst diff --git a/.gitignore b/.gitignore index 03aedb61..3c7e5510 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ build/ *.egg-info _build/ __pycache__ +.pytest_cache/ diff --git a/docs/api.rst b/docs/api.rst new file mode 100644 index 00000000..c5167932 --- /dev/null +++ b/docs/api.rst @@ -0,0 +1,7 @@ +API +=== + +.. automodule:: cftime + :members: datetime, date2num, date2index, num2date, JulianDayFromDate, DatetimeJulian, DatetimeProlepticGregorian, DatetimeNoLeap, DatetimeAllLeap, DatetimeGregorian + :show-inheritance: + :noindex: \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 5da4d384..b0fbf9b4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,16 +4,17 @@ cftime Python library for decoding time units and variable values in a netCDF file conforming to the Climate and Forecasting (CF) netCDF conventions. +Contents +-------- + .. toctree:: :maxdepth: 2 - :caption: Contents: -.. automodule:: cftime - :members: datetime, date2num, date2index, num2date, JulianDayFromDate, DatetimeJulian, DatetimeProlepticGregorian, DatetimeNoLeap, DatetimeAllLeap, DatetimeGregorian - :show-inheritance: + installing + api Indices and tables -================== +------------------ * :ref:`genindex` * :ref:`modindex` diff --git a/docs/installing.rst b/docs/installing.rst new file mode 100644 index 00000000..06fd7c57 --- /dev/null +++ b/docs/installing.rst @@ -0,0 +1,42 @@ +Installation +============ + +Required dependencies +--------------------- + +- Python 2.7, 3.4, 3.5, or 3.6 +- `numpy `__ (1.7 or later) + + +Instructions +------------ + +The easiest way to get everything installed is to use conda_ command line tool:: + + $ conda install cftime + +.. _conda: http://conda.io/ + +We recommend using the community maintained `conda-forge `__ channel if you need difficult\-to\-build dependencies such as cartopy or pynio:: + + $ conda install -c conda-forge cftime + +New releases may also appear in conda-forge before being updated in the default +channel. + +If you don't use conda, be sure you have the required dependencies (numpy and +cython) installed first. Then, install cftime with pip:: + + $ pip install cftime + + +Developing +---------- + + +When developing we recommend cloning the GitHub repository, +building the extension in-place with `cython `__ 0.19 or later +``python setup.py build_ext --inplace`` + +and running the test suite to check if the changes are passing the tests +``pytest --pyargs test``